From a94734177174d3f45de40328b41affce82cdef73 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 9 Nov 2022 19:27:15 +0000 Subject: [PATCH] Regenerated Clients --- .../150e5cd0bd2445e4a6b28770cb7e16b9.json | 8 + .../18d40157ebc44b86a67410905024f850.json | 8 + .../9f47503e6ffe4d96afc82715b4578f98.json | 8 + .../a46f8d20d9594b898fa29d843e602250.json | 8 + .../da271392dc0a48b4912a5aef5b1b4e5e.json | 8 + .../ff4735c292da42248bf6a973ecfa1db2.json | 8 + service/connect/api_op_ClaimPhoneNumber.go | 1 + service/connect/api_op_GetFederationToken.go | 9 + service/connect/api_op_ReplicateInstance.go | 2 +- service/connect/deserializers.go | 27 + service/connectcases/api_op_CreateCase.go | 5 +- service/connectcases/api_op_CreateTemplate.go | 9 +- service/connectcases/api_op_GetTemplate.go | 5 + service/connectcases/api_op_ListTemplates.go | 3 + service/connectcases/api_op_UpdateTemplate.go | 10 +- service/connectcases/deserializers.go | 21 + service/connectcases/serializers.go | 16 + service/connectcases/types/enums.go | 18 + service/connectcases/types/types.go | 5 + service/ec2/types/enums.go | 12 + .../groundstation/api_op_CreateEphemeris.go | 150 ++ .../groundstation/api_op_DeleteEphemeris.go | 120 ++ .../groundstation/api_op_DescribeContact.go | 4 +- .../groundstation/api_op_DescribeEphemeris.go | 153 ++ service/groundstation/api_op_GetSatellite.go | 4 + service/groundstation/api_op_ListContacts.go | 4 +- .../groundstation/api_op_ListEphemerides.go | 237 +++ .../groundstation/api_op_ReserveContact.go | 4 +- .../groundstation/api_op_UpdateEphemeris.go | 135 ++ service/groundstation/deserializers.go | 1856 ++++++++++++++--- service/groundstation/generated.json | 5 + service/groundstation/serializers.go | 562 +++++ service/groundstation/types/enums.go | 73 + service/groundstation/types/types.go | 220 +- .../types/types_exported_test.go | 43 + service/groundstation/validators.go | 308 +++ service/mediapackagevod/deserializers.go | 9 + service/mediapackagevod/serializers.go | 5 + service/mediapackagevod/types/types.go | 3 + .../api_op_StartMedicalStreamTranscription.go | 104 +- .../api_op_StartStreamTranscription.go | 285 ++- service/transcribestreaming/doc.go | 11 +- service/transcribestreaming/types/enums.go | 4 + service/transcribestreaming/types/errors.go | 19 +- service/transcribestreaming/types/types.go | 307 +-- 45 files changed, 4178 insertions(+), 638 deletions(-) create mode 100644 .changelog/150e5cd0bd2445e4a6b28770cb7e16b9.json create mode 100644 .changelog/18d40157ebc44b86a67410905024f850.json create mode 100644 .changelog/9f47503e6ffe4d96afc82715b4578f98.json create mode 100644 .changelog/a46f8d20d9594b898fa29d843e602250.json create mode 100644 .changelog/da271392dc0a48b4912a5aef5b1b4e5e.json create mode 100644 .changelog/ff4735c292da42248bf6a973ecfa1db2.json create mode 100644 service/groundstation/api_op_CreateEphemeris.go create mode 100644 service/groundstation/api_op_DeleteEphemeris.go create mode 100644 service/groundstation/api_op_DescribeEphemeris.go create mode 100644 service/groundstation/api_op_ListEphemerides.go create mode 100644 service/groundstation/api_op_UpdateEphemeris.go diff --git a/.changelog/150e5cd0bd2445e4a6b28770cb7e16b9.json b/.changelog/150e5cd0bd2445e4a6b28770cb7e16b9.json new file mode 100644 index 00000000000..51293fff724 --- /dev/null +++ b/.changelog/150e5cd0bd2445e4a6b28770cb7e16b9.json @@ -0,0 +1,8 @@ +{ + "id": "150e5cd0-bd24-45e4-a6b2-8770cb7e16b9", + "type": "feature", + "description": "This release adds \"IncludeIframeOnlyStream\" for Dash endpoints.", + "modules": [ + "service/mediapackagevod" + ] +} \ No newline at end of file diff --git a/.changelog/18d40157ebc44b86a67410905024f850.json b/.changelog/18d40157ebc44b86a67410905024f850.json new file mode 100644 index 00000000000..8864ba1445c --- /dev/null +++ b/.changelog/18d40157ebc44b86a67410905024f850.json @@ -0,0 +1,8 @@ +{ + "id": "18d40157-ebc4-4b86-a674-10905024f850", + "type": "feature", + "description": "This release adds new fields SignInUrl, UserArn, and UserId to GetFederationToken response payload.", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/9f47503e6ffe4d96afc82715b4578f98.json b/.changelog/9f47503e6ffe4d96afc82715b4578f98.json new file mode 100644 index 00000000000..f1fb1987320 --- /dev/null +++ b/.changelog/9f47503e6ffe4d96afc82715b4578f98.json @@ -0,0 +1,8 @@ +{ + "id": "9f47503e-6ffe-4d96-afc8-2715b4578f98", + "type": "feature", + "description": "This release adds the ability to disable templates through the UpdateTemplate API. Disabling templates prevents customers from creating cases using the template. For more information see https://docs.aws.amazon.com/cases/latest/APIReference/Welcome.html", + "modules": [ + "service/connectcases" + ] +} \ No newline at end of file diff --git a/.changelog/a46f8d20d9594b898fa29d843e602250.json b/.changelog/a46f8d20d9594b898fa29d843e602250.json new file mode 100644 index 00000000000..d60fad0d2a7 --- /dev/null +++ b/.changelog/a46f8d20d9594b898fa29d843e602250.json @@ -0,0 +1,8 @@ +{ + "id": "a46f8d20-d959-4b89-8fa2-9d843e602250", + "type": "feature", + "description": "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.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/da271392dc0a48b4912a5aef5b1b4e5e.json b/.changelog/da271392dc0a48b4912a5aef5b1b4e5e.json new file mode 100644 index 00000000000..b5e635b7efc --- /dev/null +++ b/.changelog/da271392dc0a48b4912a5aef5b1b4e5e.json @@ -0,0 +1,8 @@ +{ + "id": "da271392-dc0a-48b4-912a-5aef5b1b4e5e", + "type": "feature", + "description": "This will release hi-IN and th-TH", + "modules": [ + "service/transcribestreaming" + ] +} \ No newline at end of file diff --git a/.changelog/ff4735c292da42248bf6a973ecfa1db2.json b/.changelog/ff4735c292da42248bf6a973ecfa1db2.json new file mode 100644 index 00000000000..6ee6015c0f9 --- /dev/null +++ b/.changelog/ff4735c292da42248bf6a973ecfa1db2.json @@ -0,0 +1,8 @@ +{ + "id": "ff4735c2-92da-4224-8bf6-a973ecfa1db2", + "type": "feature", + "description": "This release adds the preview of customer-provided ephemeris support for AWS Ground Station, allowing space vehicle owners to provide their own position and trajectory information for a satellite.", + "modules": [ + "service/groundstation" + ] +} \ No newline at end of file diff --git a/service/connect/api_op_ClaimPhoneNumber.go b/service/connect/api_op_ClaimPhoneNumber.go index 24f62b5575d..a38dc0b53cb 100644 --- a/service/connect/api_op_ClaimPhoneNumber.go +++ b/service/connect/api_op_ClaimPhoneNumber.go @@ -53,6 +53,7 @@ type ClaimPhoneNumberInput struct { // field. For more information about idempotency, see Making retries safe with // idempotent APIs // (https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/). + // Pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$ ClientToken *string // The description of the phone number. diff --git a/service/connect/api_op_GetFederationToken.go b/service/connect/api_op_GetFederationToken.go index e68300b4f77..19982fb41c4 100644 --- a/service/connect/api_op_GetFederationToken.go +++ b/service/connect/api_op_GetFederationToken.go @@ -46,6 +46,15 @@ type GetFederationTokenOutput struct { // The credentials to use for federation. Credentials *types.Credentials + // The URL to sign into the user's instance. + SignInUrl *string + + // The Amazon Resource Name (ARN) of the user. + UserArn *string + + // The identifier for the user. + UserId *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/connect/api_op_ReplicateInstance.go b/service/connect/api_op_ReplicateInstance.go index b7f58eae860..f5c97fba212 100644 --- a/service/connect/api_op_ReplicateInstance.go +++ b/service/connect/api_op_ReplicateInstance.go @@ -34,7 +34,7 @@ func (c *Client) ReplicateInstance(ctx context.Context, params *ReplicateInstanc type ReplicateInstanceInput struct { // The identifier of the Amazon Connect instance. You can find the instanceId in - // the ARN of the instance. + // the ARN of the instance. You can provide the InstanceId, or the entire ARN. // // This member is required. InstanceId *string diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index 8e349a2b2e3..aa1bb31d1a6 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -10116,6 +10116,33 @@ func awsRestjson1_deserializeOpDocumentGetFederationTokenOutput(v **GetFederatio return err } + case "SignInUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.SignInUrl = ptr.String(jtv) + } + + case "UserArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.UserArn = ptr.String(jtv) + } + + case "UserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentResourceId to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + default: _, _ = key, value diff --git a/service/connectcases/api_op_CreateCase.go b/service/connectcases/api_op_CreateCase.go index 26b1877e327..b5f7a939a54 100644 --- a/service/connectcases/api_op_CreateCase.go +++ b/service/connectcases/api_op_CreateCase.go @@ -49,7 +49,10 @@ type CreateCaseInput struct { TemplateId *string // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // of the request. If not provided, the Amazon Web Services SDK populates this + // field. For more information about idempotency, see Making retries safe with + // idempotent APIs + // (https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/). ClientToken *string noSmithyDocumentSerde diff --git a/service/connectcases/api_op_CreateTemplate.go b/service/connectcases/api_op_CreateTemplate.go index 688e1348a19..c4a86120163 100644 --- a/service/connectcases/api_op_CreateTemplate.go +++ b/service/connectcases/api_op_CreateTemplate.go @@ -12,10 +12,12 @@ import ( ) // Creates a template in the Cases domain. This template is used to define the case -// object model (that is, define what data can be captured on cases) in a Cases +// object model (that is, to define what data can be captured on cases) in a Cases // domain. A template must have a unique name within a domain, and it must // reference existing field IDs and layout IDs. Additionally, multiple fields with -// same IDs are not allowed within the same Template. +// same IDs are not allowed within the same Template. A template can be either +// Active or Inactive, as indicated by its status. Inactive templates cannot be +// used to create cases. func (c *Client) CreateTemplate(ctx context.Context, params *CreateTemplateInput, optFns ...func(*Options)) (*CreateTemplateOutput, error) { if params == nil { params = &CreateTemplateInput{} @@ -53,6 +55,9 @@ type CreateTemplateInput struct { // with this template. RequiredFields []types.RequiredField + // The status of the template. + Status types.TemplateStatus + noSmithyDocumentSerde } diff --git a/service/connectcases/api_op_GetTemplate.go b/service/connectcases/api_op_GetTemplate.go index 5c7c8172530..79c1695ee73 100644 --- a/service/connectcases/api_op_GetTemplate.go +++ b/service/connectcases/api_op_GetTemplate.go @@ -49,6 +49,11 @@ type GetTemplateOutput struct { // This member is required. Name *string + // The status of the template. + // + // This member is required. + Status types.TemplateStatus + // The Amazon Resource Name (ARN) of the template. // // This member is required. diff --git a/service/connectcases/api_op_ListTemplates.go b/service/connectcases/api_op_ListTemplates.go index e2d033ab6ae..3b32943c227 100644 --- a/service/connectcases/api_op_ListTemplates.go +++ b/service/connectcases/api_op_ListTemplates.go @@ -43,6 +43,9 @@ type ListTemplatesInput struct { // response in the next request to retrieve the next set of results. NextToken *string + // A list of status values to filter on. + Status []types.TemplateStatus + noSmithyDocumentSerde } diff --git a/service/connectcases/api_op_UpdateTemplate.go b/service/connectcases/api_op_UpdateTemplate.go index ad34f2ee873..ff5a563ab6a 100644 --- a/service/connectcases/api_op_UpdateTemplate.go +++ b/service/connectcases/api_op_UpdateTemplate.go @@ -12,9 +12,10 @@ import ( ) // Updates the attributes of an existing template. The template attributes that can -// be modified include name, description, layouts, and requiredFields. At least one -// of these attributes must not be null. If a null value is provided for a given -// attribute, that attribute is ignored and its current value is preserved. +// be modified include name, description, layoutConfiguration, requiredFields, and +// status. At least one of these attributes must not be null. If a null value is +// provided for a given attribute, that attribute is ignored and its current value +// is preserved. func (c *Client) UpdateTemplate(ctx context.Context, params *UpdateTemplateInput, optFns ...func(*Options)) (*UpdateTemplateOutput, error) { if params == nil { params = &UpdateTemplateInput{} @@ -55,6 +56,9 @@ type UpdateTemplateInput struct { // with this template. RequiredFields []types.RequiredField + // The status of the template. + Status types.TemplateStatus + noSmithyDocumentSerde } diff --git a/service/connectcases/deserializers.go b/service/connectcases/deserializers.go index cb8b893c156..a0c600d304d 100644 --- a/service/connectcases/deserializers.go +++ b/service/connectcases/deserializers.go @@ -2329,6 +2329,15 @@ func awsRestjson1_deserializeOpDocumentGetTemplateOutput(v **GetTemplateOutput, return err } + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateStatus to be of type string, got %T instead", value) + } + sv.Status = types.TemplateStatus(jtv) + } + case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err @@ -4433,6 +4442,9 @@ func awsRestjson1_deserializeOpErrorUpdateLayout(response *smithyhttp.Response, case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -7078,6 +7090,15 @@ func awsRestjson1_deserializeDocumentTemplateSummary(v **types.TemplateSummary, sv.Name = ptr.String(jtv) } + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateStatus to be of type string, got %T instead", value) + } + sv.Status = types.TemplateStatus(jtv) + } + case "templateArn": if value != nil { jtv, ok := value.(string) diff --git a/service/connectcases/serializers.go b/service/connectcases/serializers.go index 164bccef505..149260474e2 100644 --- a/service/connectcases/serializers.go +++ b/service/connectcases/serializers.go @@ -724,6 +724,11 @@ func awsRestjson1_serializeOpDocumentCreateTemplateInput(v *CreateTemplateInput, } } + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + return nil } @@ -1556,6 +1561,12 @@ func awsRestjson1_serializeOpHttpBindingsListTemplatesInput(v *ListTemplatesInpu encoder.SetQuery("nextToken").String(*v.NextToken) } + if v.Status != nil { + for i := range v.Status { + encoder.AddQuery("status").String(string(v.Status[i])) + } + } + return nil } @@ -2393,6 +2404,11 @@ func awsRestjson1_serializeOpDocumentUpdateTemplateInput(v *UpdateTemplateInput, } } + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + return nil } diff --git a/service/connectcases/types/enums.go b/service/connectcases/types/enums.go index 4f8974b9d0d..069f8479b32 100644 --- a/service/connectcases/types/enums.go +++ b/service/connectcases/types/enums.go @@ -115,3 +115,21 @@ func (RelatedItemType) Values() []RelatedItemType { "Comment", } } + +type TemplateStatus string + +// Enum values for TemplateStatus +const ( + TemplateStatusActive TemplateStatus = "Active" + TemplateStatusInactive TemplateStatus = "Inactive" +) + +// Values returns all known values for TemplateStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (TemplateStatus) Values() []TemplateStatus { + return []TemplateStatus{ + "Active", + "Inactive", + } +} diff --git a/service/connectcases/types/types.go b/service/connectcases/types/types.go index 4826a26d461..4b690d8b141 100644 --- a/service/connectcases/types/types.go +++ b/service/connectcases/types/types.go @@ -754,6 +754,11 @@ type TemplateSummary struct { // This member is required. Name *string + // The status of the template. + // + // This member is required. + Status TemplateStatus + // The Amazon Resource Name (ARN) of the template. // // This member is required. diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index 0d2467650f4..14aef38807e 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -316,6 +316,7 @@ const ( 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 @@ -327,6 +328,7 @@ func (ArchitectureType) Values() []ArchitectureType { "x86_64", "arm64", "x86_64_mac", + "arm64_mac", } } @@ -338,6 +340,7 @@ const ( 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 @@ -349,6 +352,7 @@ func (ArchitectureValues) Values() []ArchitectureValues { "x86_64", "arm64", "x86_64_mac", + "arm64_mac", } } @@ -3247,6 +3251,10 @@ const ( 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" ) // Values returns all known values for InstanceType. Note that this can be expanded @@ -3823,6 +3831,10 @@ func (InstanceType) Values() []InstanceType { "r6a.metal", "p4de.24xlarge", "u-3tb1.56xlarge", + "u-18tb1.112xlarge", + "u-24tb1.112xlarge", + "trn1.2xlarge", + "trn1.32xlarge", } } diff --git a/service/groundstation/api_op_CreateEphemeris.go b/service/groundstation/api_op_CreateEphemeris.go new file mode 100644 index 00000000000..cf50d9b3315 --- /dev/null +++ b/service/groundstation/api_op_CreateEphemeris.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package groundstation + +import ( + "context" + 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/groundstation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates an Ephemeris with the specified EphemerisData. +func (c *Client) CreateEphemeris(ctx context.Context, params *CreateEphemerisInput, optFns ...func(*Options)) (*CreateEphemerisOutput, error) { + if params == nil { + params = &CreateEphemerisInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateEphemeris", params, optFns, c.addOperationCreateEphemerisMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateEphemerisOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateEphemerisInput struct { + + // A name string associated with the ephemeris. Used as a human-readable identifier + // for the ephemeris. + // + // This member is required. + Name *string + + // AWS Ground Station satellite ID for this ephemeris. + // + // This member is required. + SatelliteId *string + + // Whether to set the ephemeris status to ENABLED after validation. Setting this to + // false will set the ephemeris status to DISABLED after validation. + Enabled *bool + + // Ephemeris data. + Ephemeris types.EphemerisData + + // An overall expiration time for the ephemeris in UTC, after which it will become + // EXPIRED. + ExpirationTime *time.Time + + // The ARN of a KMS key used to encrypt the ephemeris in Ground Station. + KmsKeyArn *string + + // Customer-provided priority score to establish the order in which overlapping + // ephemerides should be used. The default for customer-provided ephemeris priority + // is 1, and higher numbers take precedence. Priority must be 1 or greater + Priority *int32 + + // Tags assigned to an ephemeris. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateEphemerisOutput struct { + + // The AWS Ground Station ephemeris ID. + EphemerisId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateEphemerisMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEphemeris{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEphemeris{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateEphemerisValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEphemeris(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateEphemeris(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "groundstation", + OperationName: "CreateEphemeris", + } +} diff --git a/service/groundstation/api_op_DeleteEphemeris.go b/service/groundstation/api_op_DeleteEphemeris.go new file mode 100644 index 00000000000..128a4e9b866 --- /dev/null +++ b/service/groundstation/api_op_DeleteEphemeris.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package groundstation + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an ephemeris +func (c *Client) DeleteEphemeris(ctx context.Context, params *DeleteEphemerisInput, optFns ...func(*Options)) (*DeleteEphemerisOutput, error) { + if params == nil { + params = &DeleteEphemerisInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteEphemeris", params, optFns, c.addOperationDeleteEphemerisMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteEphemerisOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteEphemerisInput struct { + + // The AWS Ground Station ephemeris ID. + // + // This member is required. + EphemerisId *string + + noSmithyDocumentSerde +} + +type DeleteEphemerisOutput struct { + + // The AWS Ground Station ephemeris ID. + EphemerisId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteEphemerisMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEphemeris{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEphemeris{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteEphemerisValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEphemeris(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteEphemeris(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "groundstation", + OperationName: "DeleteEphemeris", + } +} diff --git a/service/groundstation/api_op_DescribeContact.go b/service/groundstation/api_op_DescribeContact.go index 8a76022a4a0..8b89343efd6 100644 --- a/service/groundstation/api_op_DescribeContact.go +++ b/service/groundstation/api_op_DescribeContact.go @@ -49,7 +49,7 @@ type DescribeContactOutput struct { // List describing source and destination details for each dataflow edge. DataflowList []types.DataflowDetail - // End time of a contact. + // End time of a contact in UTC. EndTime *time.Time // Error message for a contact. @@ -78,7 +78,7 @@ type DescribeContactOutput struct { // ARN of a satellite. SatelliteArn *string - // Start time of a contact. + // Start time of a contact in UTC. StartTime *time.Time // Tags assigned to a contact. diff --git a/service/groundstation/api_op_DescribeEphemeris.go b/service/groundstation/api_op_DescribeEphemeris.go new file mode 100644 index 00000000000..95d5e16fb36 --- /dev/null +++ b/service/groundstation/api_op_DescribeEphemeris.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package groundstation + +import ( + "context" + 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/groundstation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Describes an existing ephemeris. +func (c *Client) DescribeEphemeris(ctx context.Context, params *DescribeEphemerisInput, optFns ...func(*Options)) (*DescribeEphemerisOutput, error) { + if params == nil { + params = &DescribeEphemerisInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeEphemeris", params, optFns, c.addOperationDescribeEphemerisMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeEphemerisOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeEphemerisInput struct { + + // The AWS Ground Station ephemeris ID. + // + // This member is required. + EphemerisId *string + + noSmithyDocumentSerde +} + +type DescribeEphemerisOutput struct { + + // The time the ephemeris was uploaded in UTC. + CreationTime *time.Time + + // Whether or not the ephemeris is enabled. + Enabled *bool + + // The AWS Ground Station ephemeris ID. + EphemerisId *string + + // Reason that an ephemeris failed validation. Only provided for ephemerides with + // INVALID status. + InvalidReason types.EphemerisInvalidReason + + // A name string associated with the ephemeris. Used as a human-readable identifier + // for the ephemeris. + Name *string + + // Customer-provided priority score to establish the order in which overlapping + // ephemerides should be used. The default for customer-provided ephemeris priority + // is 1, and higher numbers take precedence. Priority must be 1 or greater + Priority *int32 + + // The AWS Ground Station satellite ID associated with ephemeris. + SatelliteId *string + + // The status of the ephemeris. + Status types.EphemerisStatus + + // Supplied ephemeris data. + SuppliedData types.EphemerisTypeDescription + + // Tags assigned to an ephemeris. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeEphemerisMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeEphemeris{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeEphemeris{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeEphemerisValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEphemeris(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeEphemeris(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "groundstation", + OperationName: "DescribeEphemeris", + } +} diff --git a/service/groundstation/api_op_GetSatellite.go b/service/groundstation/api_op_GetSatellite.go index 639615bcccb..6e93219442f 100644 --- a/service/groundstation/api_op_GetSatellite.go +++ b/service/groundstation/api_op_GetSatellite.go @@ -6,6 +6,7 @@ import ( "context" 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/groundstation/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -38,6 +39,9 @@ type GetSatelliteInput struct { type GetSatelliteOutput struct { + // The current ephemeris being used to compute the trajectory of the satellite. + CurrentEphemeris *types.EphemerisMetaData + // A list of ground stations to which the satellite is on-boarded. GroundStations []string diff --git a/service/groundstation/api_op_ListContacts.go b/service/groundstation/api_op_ListContacts.go index 3fec3215b3d..fdf5ba87f4d 100644 --- a/service/groundstation/api_op_ListContacts.go +++ b/service/groundstation/api_op_ListContacts.go @@ -32,12 +32,12 @@ func (c *Client) ListContacts(ctx context.Context, params *ListContactsInput, op type ListContactsInput struct { - // End time of a contact. + // End time of a contact in UTC. // // This member is required. EndTime *time.Time - // Start time of a contact. + // Start time of a contact in UTC. // // This member is required. StartTime *time.Time diff --git a/service/groundstation/api_op_ListEphemerides.go b/service/groundstation/api_op_ListEphemerides.go new file mode 100644 index 00000000000..e096156d074 --- /dev/null +++ b/service/groundstation/api_op_ListEphemerides.go @@ -0,0 +1,237 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package groundstation + +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/groundstation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// List existing ephemerides. +func (c *Client) ListEphemerides(ctx context.Context, params *ListEphemeridesInput, optFns ...func(*Options)) (*ListEphemeridesOutput, error) { + if params == nil { + params = &ListEphemeridesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEphemerides", params, optFns, c.addOperationListEphemeridesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEphemeridesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEphemeridesInput struct { + + // The end time to list in UTC. The operation will return an ephemeris if its + // expiration time is within the time range defined by the startTime and endTime. + // + // This member is required. + EndTime *time.Time + + // The AWS Ground Station satellite ID to list ephemeris for. + // + // This member is required. + SatelliteId *string + + // The start time to list in UTC. The operation will return an ephemeris if its + // expiration time is within the time range defined by the startTime and endTime. + // + // This member is required. + StartTime *time.Time + + // Maximum number of ephemerides to return. + MaxResults *int32 + + // Pagination token. + NextToken *string + + // The list of ephemeris status to return. + StatusList []types.EphemerisStatus + + noSmithyDocumentSerde +} + +type ListEphemeridesOutput struct { + + // List of ephemerides. + Ephemerides []types.EphemerisItem + + // Pagination token. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEphemeridesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListEphemerides{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEphemerides{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListEphemeridesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEphemerides(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListEphemeridesAPIClient is a client that implements the ListEphemerides +// operation. +type ListEphemeridesAPIClient interface { + ListEphemerides(context.Context, *ListEphemeridesInput, ...func(*Options)) (*ListEphemeridesOutput, error) +} + +var _ ListEphemeridesAPIClient = (*Client)(nil) + +// ListEphemeridesPaginatorOptions is the paginator options for ListEphemerides +type ListEphemeridesPaginatorOptions struct { + // Maximum number of ephemerides to return. + 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 +} + +// ListEphemeridesPaginator is a paginator for ListEphemerides +type ListEphemeridesPaginator struct { + options ListEphemeridesPaginatorOptions + client ListEphemeridesAPIClient + params *ListEphemeridesInput + nextToken *string + firstPage bool +} + +// NewListEphemeridesPaginator returns a new ListEphemeridesPaginator +func NewListEphemeridesPaginator(client ListEphemeridesAPIClient, params *ListEphemeridesInput, optFns ...func(*ListEphemeridesPaginatorOptions)) *ListEphemeridesPaginator { + if params == nil { + params = &ListEphemeridesInput{} + } + + options := ListEphemeridesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEphemeridesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEphemeridesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEphemerides page. +func (p *ListEphemeridesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEphemeridesOutput, 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.ListEphemerides(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_opListEphemerides(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "groundstation", + OperationName: "ListEphemerides", + } +} diff --git a/service/groundstation/api_op_ReserveContact.go b/service/groundstation/api_op_ReserveContact.go index 551f49100df..5dbee1172ae 100644 --- a/service/groundstation/api_op_ReserveContact.go +++ b/service/groundstation/api_op_ReserveContact.go @@ -29,7 +29,7 @@ func (c *Client) ReserveContact(ctx context.Context, params *ReserveContactInput type ReserveContactInput struct { - // End time of a contact. + // End time of a contact in UTC. // // This member is required. EndTime *time.Time @@ -49,7 +49,7 @@ type ReserveContactInput struct { // This member is required. SatelliteArn *string - // Start time of a contact. + // Start time of a contact in UTC. // // This member is required. StartTime *time.Time diff --git a/service/groundstation/api_op_UpdateEphemeris.go b/service/groundstation/api_op_UpdateEphemeris.go new file mode 100644 index 00000000000..5a0deb24f77 --- /dev/null +++ b/service/groundstation/api_op_UpdateEphemeris.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package groundstation + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing ephemeris +func (c *Client) UpdateEphemeris(ctx context.Context, params *UpdateEphemerisInput, optFns ...func(*Options)) (*UpdateEphemerisOutput, error) { + if params == nil { + params = &UpdateEphemerisInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateEphemeris", params, optFns, c.addOperationUpdateEphemerisMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateEphemerisOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateEphemerisInput struct { + + // Whether the ephemeris is enabled or not. Changing this value will not require + // the ephemeris to be re-validated. + // + // This member is required. + Enabled *bool + + // The AWS Ground Station ephemeris ID. + // + // This member is required. + EphemerisId *string + + // A name string associated with the ephemeris. Used as a human-readable identifier + // for the ephemeris. + Name *string + + // Customer-provided priority score to establish the order in which overlapping + // ephemerides should be used. The default for customer-provided ephemeris priority + // is 1, and higher numbers take precedence. Priority must be 1 or greater + Priority *int32 + + noSmithyDocumentSerde +} + +type UpdateEphemerisOutput struct { + + // The AWS Ground Station ephemeris ID. + EphemerisId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateEphemerisMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateEphemeris{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateEphemeris{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateEphemerisValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEphemeris(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateEphemeris(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "groundstation", + OperationName: "UpdateEphemeris", + } +} diff --git a/service/groundstation/deserializers.go b/service/groundstation/deserializers.go index 2acf92edff1..42e48554934 100644 --- a/service/groundstation/deserializers.go +++ b/service/groundstation/deserializers.go @@ -163,7 +163,7 @@ func awsRestjson1_deserializeOpDocumentCancelContactOutput(v **CancelContactOutp if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.ContactId = ptr.String(jtv) } @@ -498,7 +498,7 @@ func awsRestjson1_deserializeOpDocumentCreateDataflowEndpointGroupOutput(v **Cre if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.DataflowEndpointGroupId = ptr.String(jtv) } @@ -512,6 +512,163 @@ func awsRestjson1_deserializeOpDocumentCreateDataflowEndpointGroupOutput(v **Cre return nil } +type awsRestjson1_deserializeOpCreateEphemeris struct { +} + +func (*awsRestjson1_deserializeOpCreateEphemeris) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateEphemeris) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateEphemeris(response, &metadata) + } + output := &CreateEphemerisOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateEphemerisOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateEphemeris(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("DependencyException", errorCode): + return awsRestjson1_deserializeErrorDependencyException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateEphemerisOutput(v **CreateEphemerisOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateEphemerisOutput + if *v == nil { + sv = &CreateEphemerisOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ephemerisId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.EphemerisId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateMissionProfile struct { } @@ -655,7 +812,7 @@ func awsRestjson1_deserializeOpDocumentCreateMissionProfileOutput(v **CreateMiss if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.MissionProfileId = ptr.String(jtv) } @@ -987,7 +1144,7 @@ func awsRestjson1_deserializeOpDocumentDeleteDataflowEndpointGroupOutput(v **Del if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.DataflowEndpointGroupId = ptr.String(jtv) } @@ -1001,14 +1158,14 @@ func awsRestjson1_deserializeOpDocumentDeleteDataflowEndpointGroupOutput(v **Del return nil } -type awsRestjson1_deserializeOpDeleteMissionProfile struct { +type awsRestjson1_deserializeOpDeleteEphemeris struct { } -func (*awsRestjson1_deserializeOpDeleteMissionProfile) ID() string { +func (*awsRestjson1_deserializeOpDeleteEphemeris) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteMissionProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteEphemeris) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1022,9 +1179,9 @@ func (m *awsRestjson1_deserializeOpDeleteMissionProfile) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteMissionProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteEphemeris(response, &metadata) } - output := &DeleteMissionProfileOutput{} + output := &DeleteEphemerisOutput{} out.Result = output var buff [1024]byte @@ -1045,7 +1202,7 @@ func (m *awsRestjson1_deserializeOpDeleteMissionProfile) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteMissionProfileOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteEphemerisOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1058,7 +1215,7 @@ func (m *awsRestjson1_deserializeOpDeleteMissionProfile) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteMissionProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteEphemeris(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1118,7 +1275,7 @@ func awsRestjson1_deserializeOpErrorDeleteMissionProfile(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentDeleteMissionProfileOutput(v **DeleteMissionProfileOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteEphemerisOutput(v **DeleteEphemerisOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1131,22 +1288,22 @@ func awsRestjson1_deserializeOpDocumentDeleteMissionProfileOutput(v **DeleteMiss return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteMissionProfileOutput + var sv *DeleteEphemerisOutput if *v == nil { - sv = &DeleteMissionProfileOutput{} + sv = &DeleteEphemerisOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "missionProfileId": + case "ephemerisId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } - sv.MissionProfileId = ptr.String(jtv) + sv.EphemerisId = ptr.String(jtv) } default: @@ -1158,14 +1315,14 @@ func awsRestjson1_deserializeOpDocumentDeleteMissionProfileOutput(v **DeleteMiss return nil } -type awsRestjson1_deserializeOpDescribeContact struct { +type awsRestjson1_deserializeOpDeleteMissionProfile struct { } -func (*awsRestjson1_deserializeOpDescribeContact) ID() string { +func (*awsRestjson1_deserializeOpDeleteMissionProfile) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteMissionProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1179,9 +1336,9 @@ func (m *awsRestjson1_deserializeOpDescribeContact) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeContact(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteMissionProfile(response, &metadata) } - output := &DescribeContactOutput{} + output := &DeleteMissionProfileOutput{} out.Result = output var buff [1024]byte @@ -1202,7 +1359,7 @@ func (m *awsRestjson1_deserializeOpDescribeContact) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeContactOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteMissionProfileOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1215,7 +1372,7 @@ func (m *awsRestjson1_deserializeOpDescribeContact) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteMissionProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1275,7 +1432,7 @@ func awsRestjson1_deserializeOpErrorDescribeContact(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentDescribeContactOutput(v **DescribeContactOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteMissionProfileOutput(v **DeleteMissionProfileOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1288,70 +1445,227 @@ func awsRestjson1_deserializeOpDocumentDescribeContactOutput(v **DescribeContact return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeContactOutput + var sv *DeleteMissionProfileOutput if *v == nil { - sv = &DescribeContactOutput{} + sv = &DeleteMissionProfileOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "contactId": + case "missionProfileId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } - sv.ContactId = ptr.String(jtv) + sv.MissionProfileId = ptr.String(jtv) } - case "contactStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ContactStatus to be of type string, got %T instead", value) - } - sv.ContactStatus = types.ContactStatus(jtv) - } + default: + _, _ = key, value - case "dataflowList": - if err := awsRestjson1_deserializeDocumentDataflowList(&sv.DataflowList, value); err != nil { - return err - } + } + } + *v = sv + return nil +} - case "endTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) +type awsRestjson1_deserializeOpDescribeContact struct { +} - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) +func (*awsRestjson1_deserializeOpDescribeContact) ID() string { + return "OperationDeserializer" +} - } - } +func (m *awsRestjson1_deserializeOpDescribeContact) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } - case "errorMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ErrorMessage = ptr.String(jtv) - } + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - case "groundStation": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.GroundStation = ptr.String(jtv) + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeContact(response, &metadata) + } + output := &DescribeContactOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeContactOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("DependencyException", errorCode): + return awsRestjson1_deserializeErrorDependencyException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeContactOutput(v **DescribeContactOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeContactOutput + if *v == nil { + sv = &DescribeContactOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "contactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.ContactId = ptr.String(jtv) + } + + case "contactStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactStatus to be of type string, got %T instead", value) + } + sv.ContactStatus = types.ContactStatus(jtv) + } + + case "dataflowList": + if err := awsRestjson1_deserializeDocumentDataflowList(&sv.DataflowList, value); err != nil { + return err + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "groundStation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.GroundStation = ptr.String(jtv) } case "maximumElevation": @@ -1448,14 +1762,14 @@ func awsRestjson1_deserializeOpDocumentDescribeContactOutput(v **DescribeContact return nil } -type awsRestjson1_deserializeOpGetConfig struct { +type awsRestjson1_deserializeOpDescribeEphemeris struct { } -func (*awsRestjson1_deserializeOpGetConfig) ID() string { +func (*awsRestjson1_deserializeOpDescribeEphemeris) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeEphemeris) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1469,9 +1783,9 @@ func (m *awsRestjson1_deserializeOpGetConfig) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeEphemeris(response, &metadata) } - output := &GetConfigOutput{} + output := &DescribeEphemerisOutput{} out.Result = output var buff [1024]byte @@ -1492,7 +1806,7 @@ func (m *awsRestjson1_deserializeOpGetConfig) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeEphemerisOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1505,7 +1819,7 @@ func (m *awsRestjson1_deserializeOpGetConfig) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeEphemeris(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1565,7 +1879,7 @@ func awsRestjson1_deserializeOpErrorGetConfig(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentGetConfigOutput(v **GetConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeEphemerisOutput(v **DescribeEphemerisOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1578,56 +1892,103 @@ func awsRestjson1_deserializeOpDocumentGetConfigOutput(v **GetConfigOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetConfigOutput + var sv *DescribeEphemerisOutput if *v == nil { - sv = &GetConfigOutput{} + sv = &DescribeEphemerisOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "configArn": + case "creationTime": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ConfigArn to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.ConfigArn = ptr.String(jtv) } - case "configData": - if err := awsRestjson1_deserializeDocumentConfigTypeData(&sv.ConfigData, value); err != nil { - return err + case "enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) } - case "configId": + case "ephemerisId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } - sv.ConfigId = ptr.String(jtv) + sv.EphemerisId = ptr.String(jtv) } - case "configType": + case "invalidReason": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ConfigCapabilityType to be of type string, got %T instead", value) + return fmt.Errorf("expected EphemerisInvalidReason to be of type string, got %T instead", value) } - sv.ConfigType = types.ConfigCapabilityType(jtv) + sv.InvalidReason = types.EphemerisInvalidReason(jtv) } case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected SafeName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } + case "priority": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EphemerisPriority to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Priority = ptr.Int32(int32(i64)) + } + + case "satelliteId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.SatelliteId = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EphemerisStatus to be of type string, got %T instead", value) + } + sv.Status = types.EphemerisStatus(jtv) + } + + case "suppliedData": + if err := awsRestjson1_deserializeDocumentEphemerisTypeDescription(&sv.SuppliedData, value); err != nil { + return err + } + case "tags": if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { return err @@ -1642,14 +2003,14 @@ func awsRestjson1_deserializeOpDocumentGetConfigOutput(v **GetConfigOutput, valu return nil } -type awsRestjson1_deserializeOpGetDataflowEndpointGroup struct { +type awsRestjson1_deserializeOpGetConfig struct { } -func (*awsRestjson1_deserializeOpGetDataflowEndpointGroup) ID() string { +func (*awsRestjson1_deserializeOpGetConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDataflowEndpointGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1663,9 +2024,203 @@ func (m *awsRestjson1_deserializeOpGetDataflowEndpointGroup) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDataflowEndpointGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetConfig(response, &metadata) } - output := &GetDataflowEndpointGroupOutput{} + output := &GetConfigOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("DependencyException", errorCode): + return awsRestjson1_deserializeErrorDependencyException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetConfigOutput(v **GetConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetConfigOutput + if *v == nil { + sv = &GetConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "configArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConfigArn to be of type string, got %T instead", value) + } + sv.ConfigArn = ptr.String(jtv) + } + + case "configData": + if err := awsRestjson1_deserializeDocumentConfigTypeData(&sv.ConfigData, value); err != nil { + return err + } + + case "configId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConfigId = ptr.String(jtv) + } + + case "configType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConfigCapabilityType to be of type string, got %T instead", value) + } + sv.ConfigType = types.ConfigCapabilityType(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetDataflowEndpointGroup struct { +} + +func (*awsRestjson1_deserializeOpGetDataflowEndpointGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetDataflowEndpointGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetDataflowEndpointGroup(response, &metadata) + } + output := &GetDataflowEndpointGroupOutput{} out.Result = output var buff [1024]byte @@ -1794,7 +2349,7 @@ func awsRestjson1_deserializeOpDocumentGetDataflowEndpointGroupOutput(v **GetDat if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.DataflowEndpointGroupId = ptr.String(jtv) } @@ -2201,7 +2756,7 @@ func awsRestjson1_deserializeOpDocumentGetMissionProfileOutput(v **GetMissionPro if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected DurationInSeconds to be json.Number, got %T instead", value) + return fmt.Errorf("expected PositiveDurationInSeconds to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { @@ -2223,7 +2778,7 @@ func awsRestjson1_deserializeOpDocumentGetMissionProfileOutput(v **GetMissionPro if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.MissionProfileId = ptr.String(jtv) } @@ -2232,7 +2787,7 @@ func awsRestjson1_deserializeOpDocumentGetMissionProfileOutput(v **GetMissionPro if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected SafeName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } @@ -2241,7 +2796,7 @@ func awsRestjson1_deserializeOpDocumentGetMissionProfileOutput(v **GetMissionPro if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected AWSRegion to be of type string, got %T instead", value) } sv.Region = ptr.String(jtv) } @@ -2408,6 +2963,11 @@ func awsRestjson1_deserializeOpDocumentGetSatelliteOutput(v **GetSatelliteOutput for key, value := range shape { switch key { + case "currentEphemeris": + if err := awsRestjson1_deserializeDocumentEphemerisMetaData(&sv.CurrentEphemeris, value); err != nil { + return err + } + case "groundStations": if err := awsRestjson1_deserializeDocumentGroundStationIdList(&sv.GroundStations, value); err != nil { return err @@ -2601,7 +3161,7 @@ func awsRestjson1_deserializeOpDocumentListConfigsOutput(v **ListConfigsOutput, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -2763,7 +3323,7 @@ func awsRestjson1_deserializeOpDocumentListContactsOutput(v **ListContactsOutput if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -2925,7 +3485,7 @@ func awsRestjson1_deserializeOpDocumentListDataflowEndpointGroupsOutput(v **List if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -2939,14 +3499,14 @@ func awsRestjson1_deserializeOpDocumentListDataflowEndpointGroupsOutput(v **List return nil } -type awsRestjson1_deserializeOpListGroundStations struct { +type awsRestjson1_deserializeOpListEphemerides struct { } -func (*awsRestjson1_deserializeOpListGroundStations) ID() string { +func (*awsRestjson1_deserializeOpListEphemerides) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListGroundStations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEphemerides) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2960,9 +3520,9 @@ func (m *awsRestjson1_deserializeOpListGroundStations) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListGroundStations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEphemerides(response, &metadata) } - output := &ListGroundStationsOutput{} + output := &ListEphemeridesOutput{} out.Result = output var buff [1024]byte @@ -2983,7 +3543,7 @@ func (m *awsRestjson1_deserializeOpListGroundStations) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListGroundStationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEphemeridesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2996,7 +3556,7 @@ func (m *awsRestjson1_deserializeOpListGroundStations) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListGroundStations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEphemerides(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3056,7 +3616,7 @@ func awsRestjson1_deserializeOpErrorListGroundStations(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentListGroundStationsOutput(v **ListGroundStationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEphemeridesOutput(v **ListEphemeridesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3069,17 +3629,17 @@ func awsRestjson1_deserializeOpDocumentListGroundStationsOutput(v **ListGroundSt return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListGroundStationsOutput + var sv *ListEphemeridesOutput if *v == nil { - sv = &ListGroundStationsOutput{} + sv = &ListEphemeridesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "groundStationList": - if err := awsRestjson1_deserializeDocumentGroundStationList(&sv.GroundStationList, value); err != nil { + case "ephemerides": + if err := awsRestjson1_deserializeDocumentEphemeridesList(&sv.Ephemerides, value); err != nil { return err } @@ -3087,7 +3647,7 @@ func awsRestjson1_deserializeOpDocumentListGroundStationsOutput(v **ListGroundSt if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -3101,14 +3661,14 @@ func awsRestjson1_deserializeOpDocumentListGroundStationsOutput(v **ListGroundSt return nil } -type awsRestjson1_deserializeOpListMissionProfiles struct { +type awsRestjson1_deserializeOpListGroundStations struct { } -func (*awsRestjson1_deserializeOpListMissionProfiles) ID() string { +func (*awsRestjson1_deserializeOpListGroundStations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMissionProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListGroundStations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3122,9 +3682,9 @@ func (m *awsRestjson1_deserializeOpListMissionProfiles) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMissionProfiles(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListGroundStations(response, &metadata) } - output := &ListMissionProfilesOutput{} + output := &ListGroundStationsOutput{} out.Result = output var buff [1024]byte @@ -3145,7 +3705,7 @@ func (m *awsRestjson1_deserializeOpListMissionProfiles) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMissionProfilesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListGroundStationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3158,7 +3718,7 @@ func (m *awsRestjson1_deserializeOpListMissionProfiles) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMissionProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListGroundStations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3218,7 +3778,7 @@ func awsRestjson1_deserializeOpErrorListMissionProfiles(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListMissionProfilesOutput(v **ListMissionProfilesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListGroundStationsOutput(v **ListGroundStationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3231,17 +3791,17 @@ func awsRestjson1_deserializeOpDocumentListMissionProfilesOutput(v **ListMission return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMissionProfilesOutput + var sv *ListGroundStationsOutput if *v == nil { - sv = &ListMissionProfilesOutput{} + sv = &ListGroundStationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "missionProfileList": - if err := awsRestjson1_deserializeDocumentMissionProfileList(&sv.MissionProfileList, value); err != nil { + case "groundStationList": + if err := awsRestjson1_deserializeDocumentGroundStationList(&sv.GroundStationList, value); err != nil { return err } @@ -3249,7 +3809,7 @@ func awsRestjson1_deserializeOpDocumentListMissionProfilesOutput(v **ListMission if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -3263,14 +3823,14 @@ func awsRestjson1_deserializeOpDocumentListMissionProfilesOutput(v **ListMission return nil } -type awsRestjson1_deserializeOpListSatellites struct { +type awsRestjson1_deserializeOpListMissionProfiles struct { } -func (*awsRestjson1_deserializeOpListSatellites) ID() string { +func (*awsRestjson1_deserializeOpListMissionProfiles) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSatellites) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListMissionProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3284,9 +3844,171 @@ func (m *awsRestjson1_deserializeOpListSatellites) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSatellites(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListMissionProfiles(response, &metadata) } - output := &ListSatellitesOutput{} + output := &ListMissionProfilesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListMissionProfilesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListMissionProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("DependencyException", errorCode): + return awsRestjson1_deserializeErrorDependencyException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListMissionProfilesOutput(v **ListMissionProfilesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListMissionProfilesOutput + if *v == nil { + sv = &ListMissionProfilesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "missionProfileList": + if err := awsRestjson1_deserializeDocumentMissionProfileList(&sv.MissionProfileList, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListSatellites struct { +} + +func (*awsRestjson1_deserializeOpListSatellites) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListSatellites) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListSatellites(response, &metadata) + } + output := &ListSatellitesOutput{} out.Result = output var buff [1024]byte @@ -3406,7 +4128,7 @@ func awsRestjson1_deserializeOpDocumentListSatellitesOutput(v **ListSatellitesOu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -3721,7 +4443,7 @@ func awsRestjson1_deserializeOpDocumentReserveContactOutput(v **ReserveContactOu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.ContactId = ptr.String(jtv) } @@ -4088,14 +4810,14 @@ func awsRestjson1_deserializeOpDocumentUpdateConfigOutput(v **UpdateConfigOutput return nil } -type awsRestjson1_deserializeOpUpdateMissionProfile struct { +type awsRestjson1_deserializeOpUpdateEphemeris struct { } -func (*awsRestjson1_deserializeOpUpdateMissionProfile) ID() string { +func (*awsRestjson1_deserializeOpUpdateEphemeris) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateMissionProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateEphemeris) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4109,9 +4831,9 @@ func (m *awsRestjson1_deserializeOpUpdateMissionProfile) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateMissionProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateEphemeris(response, &metadata) } - output := &UpdateMissionProfileOutput{} + output := &UpdateEphemerisOutput{} out.Result = output var buff [1024]byte @@ -4132,7 +4854,7 @@ func (m *awsRestjson1_deserializeOpUpdateMissionProfile) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateMissionProfileOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateEphemerisOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4145,7 +4867,7 @@ func (m *awsRestjson1_deserializeOpUpdateMissionProfile) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateMissionProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateEphemeris(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4205,7 +4927,7 @@ func awsRestjson1_deserializeOpErrorUpdateMissionProfile(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentUpdateMissionProfileOutput(v **UpdateMissionProfileOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateEphemerisOutput(v **UpdateEphemerisOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4218,22 +4940,22 @@ func awsRestjson1_deserializeOpDocumentUpdateMissionProfileOutput(v **UpdateMiss return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateMissionProfileOutput + var sv *UpdateEphemerisOutput if *v == nil { - sv = &UpdateMissionProfileOutput{} + sv = &UpdateEphemerisOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "missionProfileId": + case "ephemerisId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } - sv.MissionProfileId = ptr.String(jtv) + sv.EphemerisId = ptr.String(jtv) } default: @@ -4245,12 +4967,37 @@ func awsRestjson1_deserializeOpDocumentUpdateMissionProfileOutput(v **UpdateMiss return nil } -func awsRestjson1_deserializeErrorDependencyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DependencyException{} +type awsRestjson1_deserializeOpUpdateMissionProfile struct { +} + +func (*awsRestjson1_deserializeOpUpdateMissionProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateMissionProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateMissionProfile(response, &metadata) + } + output := &UpdateMissionProfileOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4261,47 +5008,44 @@ func awsRestjson1_deserializeErrorDependencyException(response *smithyhttp.Respo Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentDependencyException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentUpdateMissionProfileOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidParameterException{} +func awsRestjson1_deserializeOpErrorUpdateMissionProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInvalidParameterException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4313,7 +5057,142 @@ func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("DependencyException", errorCode): + return awsRestjson1_deserializeErrorDependencyException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateMissionProfileOutput(v **UpdateMissionProfileOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateMissionProfileOutput + if *v == nil { + sv = &UpdateMissionProfileOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "missionProfileId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.MissionProfileId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorDependencyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DependencyException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentDependencyException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidParameterException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInvalidParameterException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output } @@ -4848,7 +5727,7 @@ func awsRestjson1_deserializeDocumentContactData(v **types.ContactData, value in if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.ContactId = ptr.String(jtv) } @@ -5327,7 +6206,7 @@ func awsRestjson1_deserializeDocumentDataflowEndpointListItem(v **types.Dataflow if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.DataflowEndpointGroupId = ptr.String(jtv) } @@ -5535,27 +6414,329 @@ func awsRestjson1_deserializeDocumentDestination(v **types.Destination, value in if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.ConfigId = ptr.String(jtv) } - case "configType": + case "configType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConfigCapabilityType to be of type string, got %T instead", value) + } + sv.ConfigType = types.ConfigCapabilityType(jtv) + } + + case "dataflowDestinationRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DataflowDestinationRegion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEirp(v **types.Eirp, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Eirp + if *v == nil { + sv = &types.Eirp{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "units": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EirpUnits to be of type string, got %T instead", value) + } + sv.Units = types.EirpUnits(jtv) + } + + case "value": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Value = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Value = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentElevation(v **types.Elevation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Elevation + if *v == nil { + sv = &types.Elevation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "unit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AngleUnits to be of type string, got %T instead", value) + } + sv.Unit = types.AngleUnits(jtv) + } + + case "value": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Value = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Value = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEndpointDetails(v **types.EndpointDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EndpointDetails + if *v == nil { + sv = &types.EndpointDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "endpoint": + if err := awsRestjson1_deserializeDocumentDataflowEndpoint(&sv.Endpoint, value); err != nil { + return err + } + + case "securityDetails": + if err := awsRestjson1_deserializeDocumentSecurityDetails(&sv.SecurityDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEndpointDetailsList(v *[]types.EndpointDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EndpointDetails + if *v == nil { + cv = []types.EndpointDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EndpointDetails + destAddr := &col + if err := awsRestjson1_deserializeDocumentEndpointDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEphemeridesList(v *[]types.EphemerisItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EphemerisItem + if *v == nil { + cv = []types.EphemerisItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EphemerisItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentEphemerisItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEphemerisDescription(v **types.EphemerisDescription, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EphemerisDescription + if *v == nil { + sv = &types.EphemerisDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ephemerisData": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ConfigCapabilityType to be of type string, got %T instead", value) + return fmt.Errorf("expected UnboundedString to be of type string, got %T instead", value) } - sv.ConfigType = types.ConfigCapabilityType(jtv) + sv.EphemerisData = ptr.String(jtv) } - case "dataflowDestinationRegion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.DataflowDestinationRegion = ptr.String(jtv) + case "sourceS3Object": + if err := awsRestjson1_deserializeDocumentS3Object(&sv.SourceS3Object, value); err != nil { + return err } default: @@ -5567,7 +6748,7 @@ func awsRestjson1_deserializeDocumentDestination(v **types.Destination, value in return nil } -func awsRestjson1_deserializeDocumentEirp(v **types.Eirp, value interface{}) error { +func awsRestjson1_deserializeDocumentEphemerisItem(v **types.EphemerisItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5580,25 +6761,16 @@ func awsRestjson1_deserializeDocumentEirp(v **types.Eirp, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Eirp + var sv *types.EphemerisItem if *v == nil { - sv = &types.Eirp{} + sv = &types.EphemerisItem{} } else { sv = *v } for key, value := range shape { switch key { - case "units": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EirpUnits to be of type string, got %T instead", value) - } - sv.Units = types.EirpUnits(jtv) - } - - case "value": + case "creationTime": if value != nil { switch jtv := value.(type) { case json.Number: @@ -5606,30 +6778,66 @@ func awsRestjson1_deserializeDocumentEirp(v **types.Eirp, value interface{}) err if err != nil { return err } - sv.Value = ptr.Float64(f64) + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) + } + } - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + case "enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + case "ephemerisId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.EphemerisId = ptr.String(jtv) + } - } - sv.Value = ptr.Float64(f64) + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SafeName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } - default: - return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + case "priority": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EphemerisPriority to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Priority = ptr.Int32(int32(i64)) + } + + case "sourceS3Object": + if err := awsRestjson1_deserializeDocumentS3Object(&sv.SourceS3Object, value); err != nil { + return err + } + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EphemerisStatus to be of type string, got %T instead", value) } + sv.Status = types.EphemerisStatus(jtv) } default: @@ -5641,7 +6849,7 @@ func awsRestjson1_deserializeDocumentEirp(v **types.Eirp, value interface{}) err return nil } -func awsRestjson1_deserializeDocumentElevation(v **types.Elevation, value interface{}) error { +func awsRestjson1_deserializeDocumentEphemerisMetaData(v **types.EphemerisMetaData, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5654,25 +6862,25 @@ func awsRestjson1_deserializeDocumentElevation(v **types.Elevation, value interf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Elevation + var sv *types.EphemerisMetaData if *v == nil { - sv = &types.Elevation{} + sv = &types.EphemerisMetaData{} } else { sv = *v } for key, value := range shape { switch key { - case "unit": + case "ephemerisId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AngleUnits to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } - sv.Unit = types.AngleUnits(jtv) + sv.EphemerisId = ptr.String(jtv) } - case "value": + case "epoch": if value != nil { switch jtv := value.(type) { case json.Number: @@ -5680,30 +6888,30 @@ func awsRestjson1_deserializeDocumentElevation(v **types.Elevation, value interf if err != nil { return err } - sv.Value = ptr.Float64(f64) - - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() - - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) + sv.Epoch = ptr.Time(smithytime.ParseEpochSeconds(f64)) - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) - - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - } - sv.Value = ptr.Float64(f64) + } + } - default: - return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SafeName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EphemerisSource to be of type string, got %T instead", value) } + sv.Source = types.EphemerisSource(jtv) } default: @@ -5715,7 +6923,7 @@ func awsRestjson1_deserializeDocumentElevation(v **types.Elevation, value interf return nil } -func awsRestjson1_deserializeDocumentEndpointDetails(v **types.EndpointDetails, value interface{}) error { +func awsRestjson1_deserializeDocumentEphemerisTypeDescription(v *types.EphemerisTypeDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5728,65 +6936,40 @@ func awsRestjson1_deserializeDocumentEndpointDetails(v **types.EndpointDetails, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EndpointDetails - if *v == nil { - sv = &types.EndpointDetails{} - } else { - sv = *v - } - + var uv types.EphemerisTypeDescription +loop: for key, value := range shape { + if value == nil { + continue + } switch key { - case "endpoint": - if err := awsRestjson1_deserializeDocumentDataflowEndpoint(&sv.Endpoint, value); err != nil { + case "oem": + var mv types.EphemerisDescription + destAddr := &mv + if err := awsRestjson1_deserializeDocumentEphemerisDescription(&destAddr, value); err != nil { return err } + mv = *destAddr + uv = &types.EphemerisTypeDescriptionMemberOem{Value: mv} + break loop - case "securityDetails": - if err := awsRestjson1_deserializeDocumentSecurityDetails(&sv.SecurityDetails, value); err != nil { + case "tle": + var mv types.EphemerisDescription + destAddr := &mv + if err := awsRestjson1_deserializeDocumentEphemerisDescription(&destAddr, value); err != nil { return err } + mv = *destAddr + uv = &types.EphemerisTypeDescriptionMemberTle{Value: mv} + break loop default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentEndpointDetailsList(v *[]types.EndpointDetails, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.EndpointDetails - if *v == nil { - cv = []types.EndpointDetails{} - } else { - cv = *v - } + uv = &types.UnknownUnionMember{Tag: key} + break loop - for _, value := range shape { - var col types.EndpointDetails - destAddr := &col - if err := awsRestjson1_deserializeDocumentEndpointDetails(&destAddr, value); err != nil { - return err } - col = *destAddr - cv = append(cv, col) - } - *v = cv + *v = uv return nil } @@ -5964,7 +7147,7 @@ func awsRestjson1_deserializeDocumentGroundStationData(v **types.GroundStationDa if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GroundStationName to be of type string, got %T instead", value) } sv.GroundStationId = ptr.String(jtv) } @@ -5973,7 +7156,7 @@ func awsRestjson1_deserializeDocumentGroundStationData(v **types.GroundStationDa if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GroundStationName to be of type string, got %T instead", value) } sv.GroundStationName = ptr.String(jtv) } @@ -5982,7 +7165,7 @@ func awsRestjson1_deserializeDocumentGroundStationData(v **types.GroundStationDa if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected AWSRegion to be of type string, got %T instead", value) } sv.Region = ptr.String(jtv) } @@ -6021,7 +7204,7 @@ func awsRestjson1_deserializeDocumentGroundStationIdList(v *[]string, value inte if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GroundStationName to be of type string, got %T instead", value) } col = jtv } @@ -6184,7 +7367,7 @@ func awsRestjson1_deserializeDocumentMissionProfileListItem(v **types.MissionPro if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) } sv.MissionProfileId = ptr.String(jtv) } @@ -6193,7 +7376,7 @@ func awsRestjson1_deserializeDocumentMissionProfileListItem(v **types.MissionPro if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected SafeName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } @@ -6202,7 +7385,7 @@ func awsRestjson1_deserializeDocumentMissionProfileListItem(v **types.MissionPro if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected AWSRegion to be of type string, got %T instead", value) } sv.Region = ptr.String(jtv) } @@ -6305,6 +7488,64 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentS3Object(v **types.S3Object, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3Object + if *v == nil { + sv = &types.S3Object{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.Bucket = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3ObjectKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3VersionId to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentS3RecordingConfig(v **types.S3RecordingConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6468,6 +7709,11 @@ func awsRestjson1_deserializeDocumentSatelliteListItem(v **types.SatelliteListIt for key, value := range shape { switch key { + case "currentEphemeris": + if err := awsRestjson1_deserializeDocumentEphemerisMetaData(&sv.CurrentEphemeris, value); err != nil { + return err + } + case "groundStations": if err := awsRestjson1_deserializeDocumentGroundStationIdList(&sv.GroundStations, value); err != nil { return err diff --git a/service/groundstation/generated.json b/service/groundstation/generated.json index 94f4577c375..791c4463839 100644 --- a/service/groundstation/generated.json +++ b/service/groundstation/generated.json @@ -11,11 +11,14 @@ "api_op_CancelContact.go", "api_op_CreateConfig.go", "api_op_CreateDataflowEndpointGroup.go", + "api_op_CreateEphemeris.go", "api_op_CreateMissionProfile.go", "api_op_DeleteConfig.go", "api_op_DeleteDataflowEndpointGroup.go", + "api_op_DeleteEphemeris.go", "api_op_DeleteMissionProfile.go", "api_op_DescribeContact.go", + "api_op_DescribeEphemeris.go", "api_op_GetConfig.go", "api_op_GetDataflowEndpointGroup.go", "api_op_GetMinuteUsage.go", @@ -24,6 +27,7 @@ "api_op_ListConfigs.go", "api_op_ListContacts.go", "api_op_ListDataflowEndpointGroups.go", + "api_op_ListEphemerides.go", "api_op_ListGroundStations.go", "api_op_ListMissionProfiles.go", "api_op_ListSatellites.go", @@ -32,6 +36,7 @@ "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateConfig.go", + "api_op_UpdateEphemeris.go", "api_op_UpdateMissionProfile.go", "deserializers.go", "doc.go", diff --git a/service/groundstation/serializers.go b/service/groundstation/serializers.go index 7790ac4776f..46a4fc406d9 100644 --- a/service/groundstation/serializers.go +++ b/service/groundstation/serializers.go @@ -233,6 +233,113 @@ func awsRestjson1_serializeOpDocumentCreateDataflowEndpointGroupInput(v *CreateD return nil } +type awsRestjson1_serializeOpCreateEphemeris struct { +} + +func (*awsRestjson1_serializeOpCreateEphemeris) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateEphemeris) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateEphemerisInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ephemeris") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateEphemerisInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateEphemerisInput(v *CreateEphemerisInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateEphemerisInput(v *CreateEphemerisInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("enabled") + ok.Boolean(*v.Enabled) + } + + if v.Ephemeris != nil { + ok := object.Key("ephemeris") + if err := awsRestjson1_serializeDocumentEphemerisData(v.Ephemeris, ok); err != nil { + return err + } + } + + if v.ExpirationTime != nil { + ok := object.Key("expirationTime") + ok.Double(smithytime.FormatEpochSeconds(*v.ExpirationTime)) + } + + if v.KmsKeyArn != nil { + ok := object.Key("kmsKeyArn") + ok.String(*v.KmsKeyArn) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Priority != nil { + ok := object.Key("priority") + ok.Integer(*v.Priority) + } + + if v.SatelliteId != nil { + ok := object.Key("satelliteId") + ok.String(*v.SatelliteId) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagsMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateMissionProfile struct { } @@ -460,6 +567,64 @@ func awsRestjson1_serializeOpHttpBindingsDeleteDataflowEndpointGroupInput(v *Del return nil } +type awsRestjson1_serializeOpDeleteEphemeris struct { +} + +func (*awsRestjson1_serializeOpDeleteEphemeris) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteEphemeris) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteEphemerisInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ephemeris/{ephemerisId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteEphemerisInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteEphemerisInput(v *DeleteEphemerisInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EphemerisId == nil || len(*v.EphemerisId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ephemerisId must not be empty")} + } + if v.EphemerisId != nil { + if err := encoder.SetURI("ephemerisId").String(*v.EphemerisId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteMissionProfile struct { } @@ -576,6 +741,64 @@ func awsRestjson1_serializeOpHttpBindingsDescribeContactInput(v *DescribeContact return nil } +type awsRestjson1_serializeOpDescribeEphemeris struct { +} + +func (*awsRestjson1_serializeOpDescribeEphemeris) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeEphemeris) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeEphemerisInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ephemeris/{ephemerisId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeEphemerisInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeEphemerisInput(v *DescribeEphemerisInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EphemerisId == nil || len(*v.EphemerisId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ephemerisId must not be empty")} + } + if v.EphemerisId != nil { + if err := encoder.SetURI("ephemerisId").String(*v.EphemerisId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetConfig struct { } @@ -1109,6 +1332,103 @@ func awsRestjson1_serializeOpHttpBindingsListDataflowEndpointGroupsInput(v *List return nil } +type awsRestjson1_serializeOpListEphemerides struct { +} + +func (*awsRestjson1_serializeOpListEphemerides) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListEphemerides) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListEphemeridesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ephemerides") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListEphemeridesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListEphemeridesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListEphemeridesInput(v *ListEphemeridesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListEphemeridesInput(v *ListEphemeridesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndTime != nil { + ok := object.Key("endTime") + ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) + } + + if v.SatelliteId != nil { + ok := object.Key("satelliteId") + ok.String(*v.SatelliteId) + } + + if v.StartTime != nil { + ok := object.Key("startTime") + ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) + } + + if v.StatusList != nil { + ok := object.Key("statusList") + if err := awsRestjson1_serializeDocumentEphemerisStatusList(v.StatusList, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListGroundStations struct { } @@ -1681,6 +2001,97 @@ func awsRestjson1_serializeOpDocumentUpdateConfigInput(v *UpdateConfigInput, val return nil } +type awsRestjson1_serializeOpUpdateEphemeris struct { +} + +func (*awsRestjson1_serializeOpUpdateEphemeris) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateEphemeris) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateEphemerisInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ephemeris/{ephemerisId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateEphemerisInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateEphemerisInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateEphemerisInput(v *UpdateEphemerisInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EphemerisId == nil || len(*v.EphemerisId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ephemerisId must not be empty")} + } + if v.EphemerisId != nil { + if err := encoder.SetURI("ephemerisId").String(*v.EphemerisId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateEphemerisInput(v *UpdateEphemerisInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("enabled") + ok.Boolean(*v.Enabled) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Priority != nil { + ok := object.Key("priority") + ok.Integer(*v.Priority) + } + + return nil +} + type awsRestjson1_serializeOpUpdateMissionProfile struct { } @@ -2072,6 +2483,41 @@ func awsRestjson1_serializeDocumentEndpointDetailsList(v []types.EndpointDetails return nil } +func awsRestjson1_serializeDocumentEphemerisData(v types.EphemerisData, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.EphemerisDataMemberOem: + av := object.Key("oem") + if err := awsRestjson1_serializeDocumentOEMEphemeris(&uv.Value, av); err != nil { + return err + } + + case *types.EphemerisDataMemberTle: + av := object.Key("tle") + if err := awsRestjson1_serializeDocumentTLEEphemeris(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentEphemerisStatusList(v []types.EphemerisStatus, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsRestjson1_serializeDocumentFrequency(v *types.Frequency, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2132,6 +2578,47 @@ func awsRestjson1_serializeDocumentFrequencyBandwidth(v *types.FrequencyBandwidt return nil } +func awsRestjson1_serializeDocumentOEMEphemeris(v *types.OEMEphemeris, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OemData != nil { + ok := object.Key("oemData") + ok.String(*v.OemData) + } + + if v.S3Object != nil { + ok := object.Key("s3Object") + if err := awsRestjson1_serializeDocumentS3Object(v.S3Object, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentS3Object(v *types.S3Object, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Bucket != nil { + ok := object.Key("bucket") + ok.String(*v.Bucket) + } + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.Version != nil { + ok := object.Key("version") + ok.String(*v.Version) + } + + return nil +} + func awsRestjson1_serializeDocumentS3RecordingConfig(v *types.S3RecordingConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2267,6 +2754,81 @@ func awsRestjson1_serializeDocumentTagsMap(v map[string]string, value smithyjson return nil } +func awsRestjson1_serializeDocumentTimeRange(v *types.TimeRange, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndTime != nil { + ok := object.Key("endTime") + ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) + } + + if v.StartTime != nil { + ok := object.Key("startTime") + ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) + } + + return nil +} + +func awsRestjson1_serializeDocumentTLEData(v *types.TLEData, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TleLine1 != nil { + ok := object.Key("tleLine1") + ok.String(*v.TleLine1) + } + + if v.TleLine2 != nil { + ok := object.Key("tleLine2") + ok.String(*v.TleLine2) + } + + if v.ValidTimeRange != nil { + ok := object.Key("validTimeRange") + if err := awsRestjson1_serializeDocumentTimeRange(v.ValidTimeRange, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentTLEDataList(v []types.TLEData, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentTLEData(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentTLEEphemeris(v *types.TLEEphemeris, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Object != nil { + ok := object.Key("s3Object") + if err := awsRestjson1_serializeDocumentS3Object(v.S3Object, ok); err != nil { + return err + } + } + + if v.TleData != nil { + ok := object.Key("tleData") + if err := awsRestjson1_serializeDocumentTLEDataList(v.TleData, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentTrackingConfig(v *types.TrackingConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/groundstation/types/enums.go b/service/groundstation/types/enums.go index 48f02b313b9..5a8769c2663 100644 --- a/service/groundstation/types/enums.go +++ b/service/groundstation/types/enums.go @@ -168,6 +168,79 @@ func (EndpointStatus) Values() []EndpointStatus { } } +type EphemerisInvalidReason string + +// Enum values for EphemerisInvalidReason +const ( + // Provided spacecraft identifiers such as spacecraft NORAD Id are invalid + EphemerisInvalidReasonMetadataInvalid EphemerisInvalidReason = "METADATA_INVALID" + // Start, end, or expiration time(s) are invalid for the provided ephemeris + EphemerisInvalidReasonTimeRangeInvalid EphemerisInvalidReason = "TIME_RANGE_INVALID" + // Provided ephemeris defines invalid spacecraft trajectory + EphemerisInvalidReasonTrajectoryInvalid EphemerisInvalidReason = "TRAJECTORY_INVALID" + // Provided KMS key is invalid + EphemerisInvalidReasonKmsKeyInvalid EphemerisInvalidReason = "KMS_KEY_INVALID" + // Internal Service Error occurred while processing ephemeris + EphemerisInvalidReasonValidationError EphemerisInvalidReason = "VALIDATION_ERROR" +) + +// Values returns all known values for EphemerisInvalidReason. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (EphemerisInvalidReason) Values() []EphemerisInvalidReason { + return []EphemerisInvalidReason{ + "METADATA_INVALID", + "TIME_RANGE_INVALID", + "TRAJECTORY_INVALID", + "KMS_KEY_INVALID", + "VALIDATION_ERROR", + } +} + +type EphemerisSource string + +// Enum values for EphemerisSource +const ( + EphemerisSourceCustomerProvided EphemerisSource = "CUSTOMER_PROVIDED" + EphemerisSourceSpaceTrack EphemerisSource = "SPACE_TRACK" +) + +// Values returns all known values for EphemerisSource. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (EphemerisSource) Values() []EphemerisSource { + return []EphemerisSource{ + "CUSTOMER_PROVIDED", + "SPACE_TRACK", + } +} + +type EphemerisStatus string + +// Enum values for EphemerisStatus +const ( + EphemerisStatusValidating EphemerisStatus = "VALIDATING" + EphemerisStatusInvalid EphemerisStatus = "INVALID" + EphemerisStatusError EphemerisStatus = "ERROR" + EphemerisStatusEnabled EphemerisStatus = "ENABLED" + EphemerisStatusDisabled EphemerisStatus = "DISABLED" + EphemerisStatusExpired EphemerisStatus = "EXPIRED" +) + +// Values returns all known values for EphemerisStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (EphemerisStatus) Values() []EphemerisStatus { + return []EphemerisStatus{ + "VALIDATING", + "INVALID", + "ERROR", + "ENABLED", + "DISABLED", + "EXPIRED", + } +} + type FrequencyUnits string // Enum values for FrequencyUnits diff --git a/service/groundstation/types/types.go b/service/groundstation/types/types.go index b6f0a4c86ce..b49fb50a118 100644 --- a/service/groundstation/types/types.go +++ b/service/groundstation/types/types.go @@ -219,7 +219,7 @@ type ContactData struct { // Status of a contact. ContactStatus ContactStatus - // End time of a contact. + // End time of a contact in UTC. EndTime *time.Time // Error message of a contact. @@ -248,7 +248,7 @@ type ContactData struct { // ARN of a satellite. SatelliteArn *string - // Start time of a contact. + // Start time of a contact in UTC. StartTime *time.Time // Tags assigned to a contact. @@ -395,12 +395,133 @@ type EndpointDetails struct { // A dataflow endpoint. Endpoint *DataflowEndpoint - // Endpoint security details. + // Endpoint security details including a list of subnets, a list of security groups + // and a role to connect streams to instances. SecurityDetails *SecurityDetails noSmithyDocumentSerde } +// Ephemeris data. +// +// The following types satisfy this interface: +// +// EphemerisDataMemberOem +// EphemerisDataMemberTle +type EphemerisData interface { + isEphemerisData() +} + +// Ephemeris data in Orbit Ephemeris Message (OEM) format. +type EphemerisDataMemberOem struct { + Value OEMEphemeris + + noSmithyDocumentSerde +} + +func (*EphemerisDataMemberOem) isEphemerisData() {} + +// Two-line element set (TLE) ephemeris. +type EphemerisDataMemberTle struct { + Value TLEEphemeris + + noSmithyDocumentSerde +} + +func (*EphemerisDataMemberTle) isEphemerisData() {} + +// Description of ephemeris. +type EphemerisDescription struct { + + // Supplied ephemeris data. + EphemerisData *string + + // Source S3 object used for the ephemeris. + SourceS3Object *S3Object + + noSmithyDocumentSerde +} + +// Ephemeris item. +type EphemerisItem struct { + + // The time the ephemeris was uploaded in UTC. + CreationTime *time.Time + + // Whether or not the ephemeris is enabled. + Enabled *bool + + // The AWS Ground Station ephemeris ID. + EphemerisId *string + + // A name string associated with the ephemeris. Used as a human-readable identifier + // for the ephemeris. + Name *string + + // Customer-provided priority score to establish the order in which overlapping + // ephemerides should be used. The default for customer-provided ephemeris priority + // is 1, and higher numbers take precedence. Priority must be 1 or greater + Priority *int32 + + // Source S3 object used for the ephemeris. + SourceS3Object *S3Object + + // The status of the ephemeris. + Status EphemerisStatus + + noSmithyDocumentSerde +} + +// Metadata describing a particular ephemeris. +type EphemerisMetaData struct { + + // The EphemerisSource that generated a given ephemeris. + // + // This member is required. + Source EphemerisSource + + // UUID of a customer-provided ephemeris. This field is not populated for default + // ephemerides from Space Track. + EphemerisId *string + + // The epoch of a default, ephemeris from Space Track in UTC. This field is not + // populated for customer-provided ephemerides. + Epoch *time.Time + + // A name string associated with the ephemeris. Used as a human-readable identifier + // for the ephemeris. A name is only returned for customer-provider ephemerides + // that have a name associated. + Name *string + + noSmithyDocumentSerde +} + +// The following types satisfy this interface: +// +// EphemerisTypeDescriptionMemberOem +// EphemerisTypeDescriptionMemberTle +type EphemerisTypeDescription interface { + isEphemerisTypeDescription() +} + +// Description of ephemeris. +type EphemerisTypeDescriptionMemberOem struct { + Value EphemerisDescription + + noSmithyDocumentSerde +} + +func (*EphemerisTypeDescriptionMemberOem) isEphemerisTypeDescription() {} + +// Description of ephemeris. +type EphemerisTypeDescriptionMemberTle struct { + Value EphemerisDescription + + noSmithyDocumentSerde +} + +func (*EphemerisTypeDescriptionMemberTle) isEphemerisTypeDescription() {} + // Object that describes the frequency. type Frequency struct { @@ -477,6 +598,34 @@ type MissionProfileListItem struct { noSmithyDocumentSerde } +// Ephemeris data in Orbit Ephemeris Message (OEM) format. +type OEMEphemeris struct { + + // The data for an OEM ephemeris, supplied directly in the request rather than + // through an S3 object. + OemData *string + + // Identifies the S3 object to be used as the ephemeris. + S3Object *S3Object + + noSmithyDocumentSerde +} + +// Object stored in S3 containing ephemeris data. +type S3Object struct { + + // An Amazon S3 Bucket name. + Bucket *string + + // An Amazon S3 key for the ephemeris. + Key *string + + // For versioned S3 objects, the version to use for the ephemeris. + Version *string + + noSmithyDocumentSerde +} + // Information about an S3 recording Config. type S3RecordingConfig struct { @@ -502,7 +651,7 @@ type S3RecordingDetails struct { // ARN of the bucket used. BucketArn *string - // Template of the S3 key used. + // Key template used for the S3 Recording Configuration KeyTemplate *string noSmithyDocumentSerde @@ -511,6 +660,9 @@ type S3RecordingDetails struct { // Item in a list of satellites. type SatelliteListItem struct { + // The current ephemeris being used to compute the trajectory of the satellite. + CurrentEphemeris *EphemerisMetaData + // A list of ground stations to which the satellite is on-boarded. GroundStations []string @@ -567,8 +719,8 @@ type SocketAddress struct { // Dataflow details for the source side. type Source struct { - // Additional details for a Config, if type is dataflow endpoint or antenna demod - // decode. + // Additional details for a Config, if type is dataflow-endpoint or + // antenna-downlink-demod-decode ConfigDetails ConfigDetails // UUID of a Config. @@ -614,6 +766,56 @@ type SpectrumConfig struct { noSmithyDocumentSerde } +// A time range with a start and end time. +type TimeRange struct { + + // Time in UTC at which the time range ends. + // + // This member is required. + EndTime *time.Time + + // Time in UTC at which the time range starts. + // + // This member is required. + StartTime *time.Time + + noSmithyDocumentSerde +} + +// Two-line element set (TLE) data. +type TLEData struct { + + // First line of two-line element set (TLE) data. + // + // This member is required. + TleLine1 *string + + // Second line of two-line element set (TLE) data. + // + // This member is required. + TleLine2 *string + + // The valid time range for the TLE. Gaps or overlap are not permitted. + // + // This member is required. + ValidTimeRange *TimeRange + + noSmithyDocumentSerde +} + +// Two-line element set (TLE) ephemeris. +type TLEEphemeris struct { + + // Identifies the S3 object to be used as the ephemeris. + S3Object *S3Object + + // The data for a TLE ephemeris, supplied directly in the request rather than + // through an S3 object. + TleData []TLEData + + noSmithyDocumentSerde +} + // Object that determines whether tracking should be used during a contact executed // with this Config in the mission profile. type TrackingConfig struct { @@ -671,5 +873,7 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } -func (*UnknownUnionMember) isConfigDetails() {} -func (*UnknownUnionMember) isConfigTypeData() {} +func (*UnknownUnionMember) isConfigDetails() {} +func (*UnknownUnionMember) isConfigTypeData() {} +func (*UnknownUnionMember) isEphemerisData() {} +func (*UnknownUnionMember) isEphemerisTypeDescription() {} diff --git a/service/groundstation/types/types_exported_test.go b/service/groundstation/types/types_exported_test.go index bf179367635..f88fce9ca38 100644 --- a/service/groundstation/types/types_exported_test.go +++ b/service/groundstation/types/types_exported_test.go @@ -74,3 +74,46 @@ var _ *types.S3RecordingConfig var _ *types.AntennaUplinkConfig var _ *types.AntennaDownlinkConfig var _ *types.DataflowEndpointConfig + +func ExampleEphemerisData_outputUsage() { + var union types.EphemerisData + // type switches can be used to check the union value + switch v := union.(type) { + case *types.EphemerisDataMemberOem: + _ = v.Value // Value is types.OEMEphemeris + + case *types.EphemerisDataMemberTle: + _ = v.Value // Value is types.TLEEphemeris + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.TLEEphemeris +var _ *types.OEMEphemeris + +func ExampleEphemerisTypeDescription_outputUsage() { + var union types.EphemerisTypeDescription + // type switches can be used to check the union value + switch v := union.(type) { + case *types.EphemerisTypeDescriptionMemberOem: + _ = v.Value // Value is types.EphemerisDescription + + case *types.EphemerisTypeDescriptionMemberTle: + _ = v.Value // Value is types.EphemerisDescription + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.EphemerisDescription diff --git a/service/groundstation/validators.go b/service/groundstation/validators.go index 51f497d8912..1545e5a7ab9 100644 --- a/service/groundstation/validators.go +++ b/service/groundstation/validators.go @@ -70,6 +70,26 @@ func (m *validateOpCreateDataflowEndpointGroup) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpCreateEphemeris struct { +} + +func (*validateOpCreateEphemeris) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateEphemeris) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateEphemerisInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateEphemerisInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateMissionProfile struct { } @@ -130,6 +150,26 @@ func (m *validateOpDeleteDataflowEndpointGroup) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpDeleteEphemeris struct { +} + +func (*validateOpDeleteEphemeris) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteEphemeris) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteEphemerisInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteEphemerisInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteMissionProfile struct { } @@ -170,6 +210,26 @@ func (m *validateOpDescribeContact) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpDescribeEphemeris struct { +} + +func (*validateOpDescribeEphemeris) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeEphemeris) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeEphemerisInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeEphemerisInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetConfig struct { } @@ -290,6 +350,26 @@ func (m *validateOpListContacts) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpListEphemerides struct { +} + +func (*validateOpListEphemerides) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListEphemerides) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListEphemeridesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListEphemeridesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -390,6 +470,26 @@ func (m *validateOpUpdateConfig) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpUpdateEphemeris struct { +} + +func (*validateOpUpdateEphemeris) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateEphemeris) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateEphemerisInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateEphemerisInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateMissionProfile struct { } @@ -422,6 +522,10 @@ func addOpCreateDataflowEndpointGroupValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpCreateDataflowEndpointGroup{}, middleware.After) } +func addOpCreateEphemerisValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateEphemeris{}, middleware.After) +} + func addOpCreateMissionProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateMissionProfile{}, middleware.After) } @@ -434,6 +538,10 @@ func addOpDeleteDataflowEndpointGroupValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpDeleteDataflowEndpointGroup{}, middleware.After) } +func addOpDeleteEphemerisValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteEphemeris{}, middleware.After) +} + func addOpDeleteMissionProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteMissionProfile{}, middleware.After) } @@ -442,6 +550,10 @@ func addOpDescribeContactValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeContact{}, middleware.After) } +func addOpDescribeEphemerisValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeEphemeris{}, middleware.After) +} + func addOpGetConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetConfig{}, middleware.After) } @@ -466,6 +578,10 @@ func addOpListContactsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListContacts{}, middleware.After) } +func addOpListEphemeridesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEphemerides{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } @@ -486,6 +602,10 @@ func addOpUpdateConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateConfig{}, middleware.After) } +func addOpUpdateEphemerisValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateEphemeris{}, middleware.After) +} + func addOpUpdateMissionProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateMissionProfile{}, middleware.After) } @@ -736,6 +856,25 @@ func validateEndpointDetailsList(v []types.EndpointDetails) error { } } +func validateEphemerisData(v types.EphemerisData) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EphemerisData"} + switch uv := v.(type) { + case *types.EphemerisDataMemberTle: + if err := validateTLEEphemeris(&uv.Value); err != nil { + invalidParams.AddNested("[tle]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateFrequency(v *types.Frequency) error { if v == nil { return nil @@ -855,6 +994,83 @@ func validateSpectrumConfig(v *types.SpectrumConfig) error { } } +func validateTimeRange(v *types.TimeRange) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TimeRange"} + if v.StartTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("StartTime")) + } + if v.EndTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("EndTime")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTLEData(v *types.TLEData) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TLEData"} + if v.TleLine1 == nil { + invalidParams.Add(smithy.NewErrParamRequired("TleLine1")) + } + if v.TleLine2 == nil { + invalidParams.Add(smithy.NewErrParamRequired("TleLine2")) + } + if v.ValidTimeRange == nil { + invalidParams.Add(smithy.NewErrParamRequired("ValidTimeRange")) + } else if v.ValidTimeRange != nil { + if err := validateTimeRange(v.ValidTimeRange); err != nil { + invalidParams.AddNested("ValidTimeRange", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTLEDataList(v []types.TLEData) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TLEDataList"} + for i := range v { + if err := validateTLEData(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTLEEphemeris(v *types.TLEEphemeris) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TLEEphemeris"} + if v.TleData != nil { + if err := validateTLEDataList(v.TleData); err != nil { + invalidParams.AddNested("TleData", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTrackingConfig(v *types.TrackingConfig) error { if v == nil { return nil @@ -963,6 +1179,29 @@ func validateOpCreateDataflowEndpointGroupInput(v *CreateDataflowEndpointGroupIn } } +func validateOpCreateEphemerisInput(v *CreateEphemerisInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateEphemerisInput"} + if v.SatelliteId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SatelliteId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Ephemeris != nil { + if err := validateEphemerisData(v.Ephemeris); err != nil { + invalidParams.AddNested("Ephemeris", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateMissionProfileInput(v *CreateMissionProfileInput) error { if v == nil { return nil @@ -1020,6 +1259,21 @@ func validateOpDeleteDataflowEndpointGroupInput(v *DeleteDataflowEndpointGroupIn } } +func validateOpDeleteEphemerisInput(v *DeleteEphemerisInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteEphemerisInput"} + if v.EphemerisId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EphemerisId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteMissionProfileInput(v *DeleteMissionProfileInput) error { if v == nil { return nil @@ -1050,6 +1304,21 @@ func validateOpDescribeContactInput(v *DescribeContactInput) error { } } +func validateOpDescribeEphemerisInput(v *DescribeEphemerisInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeEphemerisInput"} + if v.EphemerisId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EphemerisId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetConfigInput(v *GetConfigInput) error { if v == nil { return nil @@ -1152,6 +1421,27 @@ func validateOpListContactsInput(v *ListContactsInput) error { } } +func validateOpListEphemeridesInput(v *ListEphemeridesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListEphemeridesInput"} + if v.SatelliteId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SatelliteId")) + } + if v.StartTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("StartTime")) + } + if v.EndTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("EndTime")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil @@ -1258,6 +1548,24 @@ func validateOpUpdateConfigInput(v *UpdateConfigInput) error { } } +func validateOpUpdateEphemerisInput(v *UpdateEphemerisInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateEphemerisInput"} + if v.EphemerisId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EphemerisId")) + } + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateMissionProfileInput(v *UpdateMissionProfileInput) error { if v == nil { return nil diff --git a/service/mediapackagevod/deserializers.go b/service/mediapackagevod/deserializers.go index 707ca6a822d..49fe1a35e27 100644 --- a/service/mediapackagevod/deserializers.go +++ b/service/mediapackagevod/deserializers.go @@ -3796,6 +3796,15 @@ func awsRestjson1_deserializeDocumentDashPackage(v **types.DashPackage, value in sv.IncludeEncoderConfigurationInSegments = jtv } + case "includeIframeOnlyStream": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) + } + sv.IncludeIframeOnlyStream = jtv + } + case "periodTriggers": if err := awsRestjson1_deserializeDocument__listOf__PeriodTriggersElement(&sv.PeriodTriggers, value); err != nil { return err diff --git a/service/mediapackagevod/serializers.go b/service/mediapackagevod/serializers.go index 9b2dbc74d86..914dc313173 100644 --- a/service/mediapackagevod/serializers.go +++ b/service/mediapackagevod/serializers.go @@ -1419,6 +1419,11 @@ func awsRestjson1_serializeDocumentDashPackage(v *types.DashPackage, value smith ok.Boolean(v.IncludeEncoderConfigurationInSegments) } + if v.IncludeIframeOnlyStream { + ok := object.Key("includeIframeOnlyStream") + ok.Boolean(v.IncludeIframeOnlyStream) + } + if v.PeriodTriggers != nil { ok := object.Key("periodTriggers") if err := awsRestjson1_serializeDocument__listOf__PeriodTriggersElement(v.PeriodTriggers, ok); err != nil { diff --git a/service/mediapackagevod/types/types.go b/service/mediapackagevod/types/types.go index 6874d94e5d2..74b9368a530 100644 --- a/service/mediapackagevod/types/types.go +++ b/service/mediapackagevod/types/types.go @@ -157,6 +157,9 @@ type DashPackage struct { // during content playback. IncludeEncoderConfigurationInSegments bool + // When enabled, an I-Frame only stream will be included in the output. + IncludeIframeOnlyStream bool + // A list of triggers that controls when the outgoing Dynamic Adaptive Streaming // over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into // multiple periods. If empty, the content will not be partitioned into more than diff --git a/service/transcribestreaming/api_op_StartMedicalStreamTranscription.go b/service/transcribestreaming/api_op_StartMedicalStreamTranscription.go index 795f598156e..f719b932a6a 100644 --- a/service/transcribestreaming/api_op_StartMedicalStreamTranscription.go +++ b/service/transcribestreaming/api_op_StartMedicalStreamTranscription.go @@ -15,9 +15,11 @@ import ( "time" ) -// Starts a bidirectional HTTP/2 stream where audio is streamed to Amazon -// Transcribe Medical and the transcription results are streamed to your -// application. +// Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to +// Amazon Transcribe Medical and the transcription results are streamed to your +// application. For more information on streaming with Amazon Transcribe Medical, +// see Transcribing streaming audio +// (https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html). func (c *Client) StartMedicalStreamTranscription(ctx context.Context, params *StartMedicalStreamTranscriptionInput, optFns ...func(*Options)) (*StartMedicalStreamTranscriptionOutput, error) { if params == nil { params = &StartMedicalStreamTranscriptionInput{} @@ -35,62 +37,81 @@ func (c *Client) StartMedicalStreamTranscription(ctx context.Context, params *St type StartMedicalStreamTranscriptionInput struct { - // Indicates the source language used in the input audio stream. For Amazon - // Transcribe Medical, this is US English (en-US). + // Specify the language code that represents the language spoken in your audio. + // Amazon Transcribe Medical only supports US English (en-US). // // This member is required. LanguageCode types.LanguageCode - // The encoding used for the input audio. + // Specify the encoding used for the input audio. Supported formats are: + // + // * FLAC + // + // * + // OPUS-encoded audio in an Ogg container + // + // * PCM (only signed 16-bit little-endian + // audio formats, which does not include WAV) + // + // For more information, see Media + // formats + // (https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio). // // This member is required. MediaEncoding types.MediaEncoding - // The sample rate of the input audio (in Hertz). Amazon Transcribe medical + // The sample rate of the input audio (in hertz). Amazon Transcribe Medical // supports a range from 16,000 Hz to 48,000 Hz. Note that the sample rate you // specify must match that of your audio. // // This member is required. MediaSampleRateHertz *int32 - // The medical specialty of the clinician or provider. + // Specify the medical specialty contained in your audio. // // This member is required. Specialty types.Specialty - // The type of input audio. Choose DICTATION for a provider dictating patient - // notes. Choose CONVERSATION for a dialogue between a patient and one or more - // medical professionanls. + // Specify the type of input audio. For example, choose DICTATION for a provider + // dictating patient notes and CONVERSATION for a dialogue between a patient and a + // medical professional. // // This member is required. Type types.Type - // Set this field to PHI to identify personal health information in the - // transcription output. + // Labels all personal health information (PHI) identified in your transcript. + // Content identification is performed at the segment level; PHI is flagged upon + // complete transcription of an audio segment. For more information, see + // Identifying personal health information (PHI) in a transcription + // (https://docs.aws.amazon.com/transcribe/latest/dg/phi-id.html). ContentIdentificationType types.MedicalContentIdentificationType - // When true, instructs Amazon Transcribe Medical to process each audio channel - // separately and then merge the transcription output of each channel into a single - // transcription. Amazon Transcribe Medical also produces a transcription of each - // item. An item includes the start time, end time, and any alternative - // transcriptions. You can't set both ShowSpeakerLabel and - // EnableChannelIdentification in the same request. If you set both, your request - // returns a BadRequestException. + // Enables channel identification in multi-channel audio. Channel identification + // transcribes the audio on each channel independently, then appends the output for + // each channel into one transcript. If you have multi-channel audio and do not + // enable channel identification, your audio is transcribed in a continuous manner + // and your transcript is not separated by channel. For more information, see + // Transcribing multi-channel audio + // (https://docs.aws.amazon.com/transcribe/latest/dg/channel-id.html). EnableChannelIdentification bool - // The number of channels that are in your audio stream. + // Specify the number of channels in your audio stream. Up to two channels are + // supported. NumberOfChannels *int32 - // Optional. An identifier for the transcription session. If you don't provide a - // session ID, Amazon Transcribe generates one for you and returns it in the - // response. + // Specify a name for your transcription session. If you don't include this + // parameter in your request, Amazon Transcribe Medical generates an ID and returns + // it in the response. You can use a session ID to retry a streaming session. SessionId *string - // When true, enables speaker identification in your real-time stream. + // Enables speaker partitioning (diarization) in your transcription output. Speaker + // partitioning labels the speech from individual speakers in your media file. For + // more information, see Partitioning speakers (diarization) + // (https://docs.aws.amazon.com/transcribe/latest/dg/diarization.html). ShowSpeakerLabel bool - // The name of the medical custom vocabulary to use when processing the real-time - // stream. + // Specify the name of the custom vocabulary that you want to use when processing + // your transcription. Note that vocabulary names are case sensitive. VocabularyName *string noSmithyDocumentSerde @@ -98,44 +119,41 @@ type StartMedicalStreamTranscriptionInput struct { type StartMedicalStreamTranscriptionOutput struct { - // If the value is PHI, indicates that you've configured your stream to identify - // personal health information. + // Shows whether content identification was enabled for your transcription. ContentIdentificationType types.MedicalContentIdentificationType - // Shows whether channel identification has been enabled in the stream. + // Shows whether channel identification was enabled for your transcription. EnableChannelIdentification bool - // The language code for the response transcript. For Amazon Transcribe Medical, - // this is US English (en-US). + // Provides the language code that you specified in your request. This must be + // en-US. LanguageCode types.LanguageCode - // The encoding used for the input audio stream. + // Provides the media encoding you specified in your request. MediaEncoding types.MediaEncoding - // The sample rate of the input audio, in Hertz (Hz). + // Provides the sample rate that you specified in your request. MediaSampleRateHertz *int32 - // The number of channels identified in the stream. + // Provides the number of channels that you specified in your request. NumberOfChannels *int32 - // An identifier for the streaming transcription. + // Provides the identifier for your streaming request. RequestId *string - // Optional. An identifier for the transcription session. If you don't provide a - // session ID, Amazon Transcribe generates one for you and returns it in the - // response. + // Provides the identifier for your transcription session. SessionId *string - // Shows whether speaker identification was enabled in the stream. + // Shows whether speaker partitioning was enabled for your transcription. ShowSpeakerLabel bool - // The specialty in the medical domain. + // Provides the medical specialty that you specified in your request. Specialty types.Specialty - // The type of audio that was transcribed. + // Provides the type of audio you specified in your request. Type types.Type - // The name of the vocabulary used when processing the stream. + // Provides the name of the custom vocabulary that you specified in your request. VocabularyName *string eventStream *StartMedicalStreamTranscriptionEventStream diff --git a/service/transcribestreaming/api_op_StartStreamTranscription.go b/service/transcribestreaming/api_op_StartStreamTranscription.go index 7bd8d4e9d33..df1f04f98a1 100644 --- a/service/transcribestreaming/api_op_StartStreamTranscription.go +++ b/service/transcribestreaming/api_op_StartStreamTranscription.go @@ -15,23 +15,22 @@ import ( "time" ) -// Starts a bidirectional HTTP/2 stream where audio is streamed to Amazon -// Transcribe and the transcription results are streamed to your application. The -// following are encoded as HTTP/2 headers: +// Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to +// Amazon Transcribe and the transcription results are streamed to your +// application. The following are encoded as headers: // -// * x-amzn-transcribe-language-code +// * language-code // // * -// x-amzn-transcribe-media-encoding +// media-encoding // -// * x-amzn-transcribe-sample-rate +// * sample-rate // -// * -// x-amzn-transcribe-session-id +// * session-id // -// See the SDK for Go API Reference -// (https://docs.aws.amazon.com/sdk-for-go/api/service/transcribestreamingservice/#TranscribeStreamingService.StartStreamTranscription) -// for more detail. +// For more information on streaming +// with Amazon Transcribe, see Transcribing streaming audio +// (https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html). func (c *Client) StartStreamTranscription(ctx context.Context, params *StartStreamTranscriptionInput, optFns ...func(*Options)) (*StartStreamTranscriptionOutput, error) { if params == nil { params = &StartStreamTranscriptionInput{} @@ -49,12 +48,24 @@ func (c *Client) StartStreamTranscription(ctx context.Context, params *StartStre type StartStreamTranscriptionInput struct { - // The encoding used for the input audio. + // Specify the encoding used for the input audio. Supported formats are: + // + // * FLAC + // + // * + // OPUS-encoded audio in an Ogg container + // + // * PCM (only signed 16-bit little-endian + // audio formats, which does not include WAV) + // + // For more information, see Media + // formats + // (https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio). // // This member is required. MediaEncoding types.MediaEncoding - // The sample rate of the input audio (in Hertz). Low-quality audio, such as + // The sample rate of the input audio (in hertz). Low-quality audio, such as // telephone audio, is typically around 8,000 Hz. High-quality audio typically // ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must // match that of your audio. @@ -62,116 +73,167 @@ type StartStreamTranscriptionInput struct { // This member is required. MediaSampleRateHertz *int32 - // Set this field to PII to identify personally identifiable information (PII) in - // the transcription output. Content identification is performed only upon complete - // transcription of the audio segments. You can’t set both - // ContentIdentificationType and ContentRedactionType in the same request. If you - // set both, your request returns a BadRequestException. + // Labels all personally identifiable information (PII) identified in your + // transcript. Content identification is performed at the segment level; PII + // specified in PiiEntityTypes is flagged upon complete transcription of an audio + // segment. You can’t set ContentIdentificationType and ContentRedactionType in the + // same request. If you set both, your request returns a BadRequestException. For + // more information, see Redacting or identifying personally identifiable + // information + // (https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html). ContentIdentificationType types.ContentIdentificationType - // Set this field to PII to redact personally identifiable information (PII) in the - // transcription output. Content redaction is performed only upon complete - // transcription of the audio segments. You can’t set both ContentRedactionType and - // ContentIdentificationType in the same request. If you set both, your request - // returns a BadRequestException. + // Redacts all personally identifiable information (PII) identified in your + // transcript. Content redaction is performed at the segment level; PII specified + // in PiiEntityTypes is redacted upon complete transcription of an audio segment. + // You can’t set ContentRedactionType and ContentIdentificationType in the same + // request. If you set both, your request returns a BadRequestException. For more + // information, see Redacting or identifying personally identifiable information + // (https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html). ContentRedactionType types.ContentRedactionType - // When true, instructs Amazon Transcribe to process each audio channel separately, - // then merges the transcription output of each channel into a single - // transcription. Amazon Transcribe also produces a transcription of each item. An - // item includes the start time, end time, and any alternative transcriptions. + // Enables channel identification in multi-channel audio. Channel identification + // transcribes the audio on each channel independently, then appends the output for + // each channel into one transcript. If you have multi-channel audio and do not + // enable channel identification, your audio is transcribed in a continuous manner + // and your transcript is not separated by channel. For more information, see + // Transcribing multi-channel audio + // (https://docs.aws.amazon.com/transcribe/latest/dg/channel-id.html). EnableChannelIdentification bool - // When true, instructs Amazon Transcribe to present transcription results that - // have the partial results stabilized. Normally, any word or phrase from one - // partial result can change in a subsequent partial result. With partial results - // stabilization enabled, only the last few words of one partial result can change - // in another partial result. + // Enables partial result stabilization for your transcription. Partial result + // stabilization can reduce latency in your output, but may impact accuracy. For + // more information, see Partial-result stabilization + // (https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization). EnablePartialResultsStabilization bool - // Optional. Set this value to true to enable language identification for your - // media stream. + // Enables automatic language identification for your transcription. If you include + // IdentifyLanguage, you can optionally include a list of language codes, using + // LanguageOptions, that you think may be present in your audio stream. Including + // language options can improve transcription accuracy. You can also include a + // preferred language using PreferredLanguage. Adding a preferred language can help + // Amazon Transcribe identify the language faster than if you omit this parameter. + // If you have multi-channel audio that contains different languages on each + // channel, and you've enabled channel identification, automatic language + // identification identifies the dominant language on each audio channel. Note that + // you must include either LanguageCode or IdentifyLanguage in your request. If you + // include both parameters, your request fails. Streaming language identification + // can't be combined with custom language models or redaction. IdentifyLanguage bool - // The language code of the input audio stream. + // Specify the language code that represents the language spoken in your audio. If + // you're unsure of the language spoken in your audio, consider using + // IdentifyLanguage to enable automatic language identification. For a list of + // languages supported with Amazon Transcribe streaming, refer to the Supported + // languages + // (https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) + // table. LanguageCode types.LanguageCode - // The name of the language model you want to use. + // Specify the name of the custom language model that you want to use when + // processing your transcription. Note that language model names are case + // sensitive. The language of the specified language model must match the language + // code you specify in your transcription request. If the languages don't match, + // the language model isn't applied. There are no errors or warnings associated + // with a language mismatch. For more information, see Custom language models + // (https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html). LanguageModelName *string - // An object containing a list of languages that might be present in your audio. - // You must provide two or more language codes to help Amazon Transcribe identify - // the correct language of your media stream with the highest possible accuracy. - // You can only select one variant per language; for example, you can't include - // both en-US and en-UK in the same request. You can only use this parameter if - // you've set IdentifyLanguage to truein your request. + // Specify two or more language codes that represent the languages you think may be + // present in your media; including more than five is not recommended. If you're + // unsure what languages are present, do not include this parameter. Including + // language options can improve the accuracy of language identification. If you + // include LanguageOptions in your request, you must also include IdentifyLanguage. + // For a list of languages supported with Amazon Transcribe streaming, refer to the + // Supported languages + // (https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) + // table. You can only include one language dialect per language per stream. For + // example, you cannot include en-US and en-AU in the same request. LanguageOptions *string - // The number of channels that are in your audio stream. + // Specify the number of channels in your audio stream. Up to two channels are + // supported. NumberOfChannels *int32 - // You can use this field to set the stability level of the transcription results. - // A higher stability level means that the transcription results are less likely to - // change. Higher stability levels can come with lower overall transcription - // accuracy. + // Specify the level of stability to use when you enable partial results + // stabilization (EnablePartialResultsStabilization). Low stability provides the + // highest accuracy. High stability transcribes faster, but with slightly lower + // accuracy. For more information, see Partial-result stabilization + // (https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization). PartialResultsStability types.PartialResultsStability - // List the PII entity types you want to identify or redact. In order to specify - // entity types, you must have either ContentIdentificationType or - // ContentRedactionType enabled. PIIEntityTypes must be comma-separated; the - // available values are: BANK_ACCOUNT_NUMBER, BANK_ROUTING, CREDIT_DEBIT_NUMBER, - // CREDIT_DEBIT_CVV, CREDIT_DEBIT_EXPIRY, PIN, EMAIL, ADDRESS, NAME, PHONE, SSN, - // and ALL. PiiEntityTypes is an optional parameter with a default value of ALL. + // Specify which types of personally identifiable information (PII) you want to + // redact in your transcript. You can include as many types as you'd like, or you + // can select ALL. To include PiiEntityTypes in your request, you must also include + // either ContentIdentificationType or ContentRedactionType. Values must be + // comma-separated and can include: BANK_ACCOUNT_NUMBER, BANK_ROUTING, + // CREDIT_DEBIT_NUMBER, CREDIT_DEBIT_CVV, CREDIT_DEBIT_EXPIRY, PIN, EMAIL, ADDRESS, + // NAME, PHONE, SSN, or ALL. PiiEntityTypes *string - // Optional. From the subset of languages codes you provided for LanguageOptions, - // you can select one preferred language for your transcription. You can only use - // this parameter if you've set IdentifyLanguage to truein your request. + // Specify a preferred language from the subset of languages codes you specified in + // LanguageOptions. You can only use this parameter if you've included + // IdentifyLanguage and LanguageOptions in your request. PreferredLanguage types.LanguageCode - // A identifier for the transcription session. Use this parameter when you want to - // retry a session. If you don't provide a session ID, Amazon Transcribe will - // generate one for you and return it in the response. + // Specify a name for your transcription session. If you don't include this + // parameter in your request, Amazon Transcribe generates an ID and returns it in + // the response. You can use a session ID to retry a streaming session. SessionId *string - // When true, enables speaker identification in your media stream. + // Enables speaker partitioning (diarization) in your transcription output. Speaker + // partitioning labels the speech from individual speakers in your media file. For + // more information, see Partitioning speakers (diarization) + // (https://docs.aws.amazon.com/transcribe/latest/dg/diarization.html). ShowSpeakerLabel bool - // The manner in which you use your vocabulary filter to filter words in your - // transcript. Remove removes filtered words from your transcription results. Mask - // masks filtered words with a *** in your transcription results. Tag keeps the - // filtered words in your transcription results and tags them. The tag appears as - // VocabularyFilterMatch equal to True. + // Specify how you want your vocabulary filter applied to your transcript. To + // replace words with ***, choose mask. To delete words, choose remove. To flag + // words without changing them, choose tag. VocabularyFilterMethod types.VocabularyFilterMethod - // The name of the vocabulary filter you want to use with your transcription. This - // operation is not intended for use in conjunction with the IdentifyLanguage - // operation. If you're using IdentifyLanguage in your request and want to use one - // or more vocabulary filters with your transcription, use the - // VocabularyFilterNames operation instead. + // Specify the name of the custom vocabulary filter that you want to use when + // processing your transcription. Note that vocabulary filter names are case + // sensitive. If the language of the specified custom vocabulary filter doesn't + // match the language identified in your media, your job fails. This parameter is + // not intended for use with the IdentifyLanguage parameter. If you're including + // IdentifyLanguage in your request and want to use one or more vocabulary filters + // with your transcription, use the VocabularyFilterNames parameter instead. For + // more information, see Using vocabulary filtering with unwanted words + // (https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html). VocabularyFilterName *string - // The names of the vocabulary filters you want to use with your transcription. - // Note that if the vocabulary filters you specify are in languages that don't - // match the language identified in your media, your job fails. This operation is - // only intended for use in conjunction with the IdentifyLanguage operation. If - // you're not using IdentifyLanguage in your request and want to use a vocabulary - // filter with your transcription, use the VocabularyFilterName operation instead. + // Specify the names of the custom vocabulary filters that you want to use when + // processing your transcription. Note that vocabulary filter names are case + // sensitive. If none of the languages of the specified custom vocabulary filters + // match the language identified in your media, your job fails. This parameter is + // only intended for use with the IdentifyLanguage parameter. If you're not + // including IdentifyLanguage in your request and want to use a custom vocabulary + // filter with your transcription, use the VocabularyFilterName parameter instead. + // For more information, see Using vocabulary filtering with unwanted words + // (https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html). VocabularyFilterNames *string - // The name of the custom vocabulary you want to use with your transcription. This - // operation is not intended for use in conjunction with the IdentifyLanguage - // operation. If you're using IdentifyLanguage in your request and want to use one - // or more custom vocabularies with your transcription, use the VocabularyNames - // operation instead. + // Specify the name of the custom vocabulary that you want to use when processing + // your transcription. Note that vocabulary names are case sensitive. If the + // language of the specified custom vocabulary doesn't match the language + // identified in your media, your job fails. This parameter is not intended for use + // with the IdentifyLanguage parameter. If you're including IdentifyLanguage in + // your request and want to use one or more custom vocabularies with your + // transcription, use the VocabularyNames parameter instead. For more information, + // see Custom vocabularies + // (https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html). VocabularyName *string - // The names of the custom vocabularies you want to use with your transcription. - // Note that if the custom vocabularies you specify are in languages that don't - // match the language identified in your media, your job fails. This operation is - // only intended for use in conjunction with the IdentifyLanguage operation. If - // you're not using IdentifyLanguage in your request and want to use a custom - // vocabulary with your transcription, use the VocabularyName operation instead. + // Specify the names of the custom vocabularies that you want to use when + // processing your transcription. Note that vocabulary names are case sensitive. If + // none of the languages of the specified custom vocabularies match the language + // identified in your media, your job fails. This parameter is only intended for + // use with the IdentifyLanguage parameter. If you're not including + // IdentifyLanguage in your request and want to use a custom vocabulary with your + // transcription, use the VocabularyName parameter instead. For more information, + // see Custom vocabularies + // (https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html). VocabularyNames *string noSmithyDocumentSerde @@ -179,72 +241,75 @@ type StartStreamTranscriptionInput struct { type StartStreamTranscriptionOutput struct { - // Shows whether content identification was enabled in this stream. + // Shows whether content identification was enabled for your transcription. ContentIdentificationType types.ContentIdentificationType - // Shows whether content redaction was enabled in this stream. + // Shows whether content redaction was enabled for your transcription. ContentRedactionType types.ContentRedactionType - // Shows whether channel identification was enabled in the stream. + // Shows whether channel identification was enabled for your transcription. EnableChannelIdentification bool - // Shows whether partial results stabilization was enabled in the transcription. + // Shows whether partial results stabilization was enabled for your transcription. EnablePartialResultsStabilization bool - // The language code of the language identified in your media stream. + // Shows whether automatic language identification was enabled for your + // transcription. IdentifyLanguage bool - // The language code of the input audio stream. + // Provides the language code that you specified in your request. LanguageCode types.LanguageCode - // The name of the custom language model used in the transcription. + // Provides the name of the custom language model that you specified in your + // request. LanguageModelName *string - // The language codes used in the identification of your media stream's predominant - // language. + // Provides the language codes that you specified in your request. LanguageOptions *string - // The encoding used for the input audio stream. + // Provides the media encoding you specified in your request. MediaEncoding types.MediaEncoding - // The sample rate, in Hertz (Hz), for the input audio stream. + // Provides the sample rate that you specified in your request. MediaSampleRateHertz *int32 - // The number of channels identified in the stream. + // Provides the number of channels that you specified in your request. NumberOfChannels *int32 - // If partial results stabilization has been enabled in the stream, shows the - // stability level. + // Provides the stabilization level used for your transcription. PartialResultsStability types.PartialResultsStability // Lists the PII entity types you specified in your request. PiiEntityTypes *string - // The preferred language you specified in your request. + // Provides the preferred language that you specified in your request. PreferredLanguage types.LanguageCode - // An identifier for the transcription. + // Provides the identifier for your streaming request. RequestId *string - // An identifier for a specific transcription session. + // Provides the identifier for your transcription session. SessionId *string - // Shows whether speaker identification was enabled in the transcription. + // Shows whether speaker partitioning was enabled for your transcription. ShowSpeakerLabel bool - // The vocabulary filtering method used when processing the stream. + // Provides the vocabulary filtering method used in your transcription. VocabularyFilterMethod types.VocabularyFilterMethod - // The name of the vocabulary filter used when processing the stream. + // Provides the name of the custom vocabulary filter that you specified in your + // request. VocabularyFilterName *string - // The name of the vocabulary filter used when processing the stream. + // Provides the names of the custom vocabulary filters that you specified in your + // request. VocabularyFilterNames *string - // The name of the custom vocabulary used when processing the stream. + // Provides the name of the custom vocabulary that you specified in your request. VocabularyName *string - // The name of the custom vocabulary used when processing the stream. + // Provides the names of the custom vocabularies that you specified in your + // request. VocabularyNames *string eventStream *StartStreamTranscriptionEventStream diff --git a/service/transcribestreaming/doc.go b/service/transcribestreaming/doc.go index a4829573b5f..6f4c709f5db 100644 --- a/service/transcribestreaming/doc.go +++ b/service/transcribestreaming/doc.go @@ -3,5 +3,14 @@ // Package transcribestreaming provides the API client, operations, and parameter // types for Amazon Transcribe Streaming Service. // -// Operations and objects for transcribing streaming speech to text. +// Amazon Transcribe streaming offers two types of real-time transcription: +// Standard and Medical. +// +// * Standard transcriptions are the most common option. +// Refer to for details. +// +// * Medical transcriptions are tailored to medical +// professionals and incorporate medical terms. A common use case for this service +// is transcribing doctor-patient dialogue in real time, so doctors can focus on +// their patient instead of taking notes. Refer to for details. package transcribestreaming diff --git a/service/transcribestreaming/types/enums.go b/service/transcribestreaming/types/enums.go index ed316641ed3..88c7fa04b33 100644 --- a/service/transcribestreaming/types/enums.go +++ b/service/transcribestreaming/types/enums.go @@ -68,6 +68,8 @@ const ( LanguageCodeJaJp LanguageCode = "ja-JP" LanguageCodeKoKr LanguageCode = "ko-KR" LanguageCodeZhCn LanguageCode = "zh-CN" + LanguageCodeHiIn LanguageCode = "hi-IN" + LanguageCodeThTh LanguageCode = "th-TH" ) // Values returns all known values for LanguageCode. Note that this can be expanded @@ -87,6 +89,8 @@ func (LanguageCode) Values() []LanguageCode { "ja-JP", "ko-KR", "zh-CN", + "hi-IN", + "th-TH", } } diff --git a/service/transcribestreaming/types/errors.go b/service/transcribestreaming/types/errors.go index 09ace54887a..ae595a8a55a 100644 --- a/service/transcribestreaming/types/errors.go +++ b/service/transcribestreaming/types/errors.go @@ -8,9 +8,9 @@ import ( ) // One or more arguments to the StartStreamTranscription or -// StartMedicalStreamTranscription operation was invalid. For example, -// MediaEncoding was not set to a valid encoding, or LanguageCode was not set to a -// valid code. Check the parameters and try your request again. +// StartMedicalStreamTranscription operation was not valid. For example, +// MediaEncoding or LanguageCode used not valid values. Check the specified +// parameters and try your request again. type BadRequestException struct { Message *string @@ -49,8 +49,8 @@ func (e *ConflictException) ErrorMessage() string { func (e *ConflictException) ErrorCode() string { return "ConflictException" } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// A problem occurred while processing the audio. Amazon Transcribe or Amazon -// Transcribe Medical terminated processing. Try your request again. +// A problem occurred while processing the audio. Amazon Transcribe terminated +// processing. type InternalFailureException struct { Message *string @@ -69,10 +69,9 @@ func (e *InternalFailureException) ErrorMessage() string { func (e *InternalFailureException) ErrorCode() string { return "InternalFailureException" } func (e *InternalFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// You have exceeded the maximum number of concurrent transcription streams, are -// starting transcription streams too quickly, or the maximum audio length of 4 -// hours. Wait until a stream has finished processing, or break your audio stream -// into smaller chunks and try your request again. +// Your client has exceeded one of the Amazon Transcribe limits. This is typically +// the audio length limit. Break your audio stream into smaller chunks and try your +// request again. type LimitExceededException struct { Message *string @@ -91,7 +90,7 @@ func (e *LimitExceededException) ErrorMessage() string { func (e *LimitExceededException) ErrorCode() string { return "LimitExceededException" } func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// Service is currently unavailable. Try your request later. +// The service is currently unavailable. Try your request later. type ServiceUnavailableException struct { Message *string diff --git a/service/transcribestreaming/types/types.go b/service/transcribestreaming/types/types.go index b80aa05feae..f983f634e6a 100644 --- a/service/transcribestreaming/types/types.go +++ b/service/transcribestreaming/types/types.go @@ -6,27 +6,27 @@ import ( smithydocument "github.com/aws/smithy-go/document" ) -// A list of possible transcriptions for the audio. +// A list of possible alternative transcriptions for the input audio. Each +// alternative may contain one or more of Items, Entities, or Transcript. type Alternative struct { - // Contains the entities identified as personally identifiable information (PII) in - // the transcription output. + // Contains entities identified as personally identifiable information (PII) in + // your transcription output. Entities []Entity - // One or more alternative interpretations of the input audio. + // Contains words, phrases, or punctuation marks in your transcription output. Items []Item - // The text that was transcribed from the audio. + // Contains transcribed text. Transcript *string noSmithyDocumentSerde } -// Provides a wrapper for the audio chunks that you are sending. For information on -// audio encoding in Amazon Transcribe, see Speech input -// (https://docs.aws.amazon.com/transcribe/latest/dg/input.html). For information -// on audio encoding formats in Amazon Transcribe Medical, see Speech input -// (https://docs.aws.amazon.com/transcribe/latest/dg/input-med.html). +// A wrapper for your audio chunks. Your audio stream consists of one or more audio +// events, which consist of one or more audio chunks. For more information, see +// Event stream encoding +// (https://docs.aws.amazon.com/transcribe/latest/dg/event-stream.html). type AudioEvent struct { // An audio blob that contains the next part of the audio that you want to @@ -36,7 +36,9 @@ type AudioEvent struct { noSmithyDocumentSerde } -// Represents the audio stream from your application to Amazon Transcribe. +// An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or +// WebSocket data frames. For more information, see Transcribing streaming audio +// (https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html). // // The following types satisfy this interface: // @@ -45,16 +47,9 @@ type AudioStream interface { isAudioStream() } -// A blob of audio from your application. You audio stream consists of one or more -// audio events. For information on audio encoding formats in Amazon Transcribe, -// see Speech input (https://docs.aws.amazon.com/transcribe/latest/dg/input.html). -// For information on audio encoding formats in Amazon Transcribe Medical, see -// Speech input (https://docs.aws.amazon.com/transcribe/latest/dg/input-med.html). -// For more information on stream encoding in Amazon Transcribe, see Event stream -// encoding (https://docs.aws.amazon.com/transcribe/latest/dg/event-stream.html). -// For information on stream encoding in Amazon Transcribe Medical, see Event -// stream encoding -// (https://docs.aws.amazon.com/transcribe/latest/dg/event-stream-med.html). +// A blob of audio from your application. Your audio stream consists of one or more +// audio events. For more information, see Event stream encoding +// (https://docs.aws.amazon.com/transcribe/latest/dg/event-stream.html). type AudioStreamMemberAudioEvent struct { Value AudioEvent @@ -63,220 +58,228 @@ type AudioStreamMemberAudioEvent struct { func (*AudioStreamMemberAudioEvent) isAudioStream() {} -// The entity identified as personally identifiable information (PII). +// Contains entities identified as personally identifiable information (PII) in +// your transcription output, along with various associated attributes. Examples +// include category, confidence score, type, stability score, and start and end +// times. type Entity struct { - // The category of information identified in this entity; for example, PII. + // The category of information identified. The only category is PII. Category *string - // A value between zero and one that Amazon Transcribe assigns to PII identified in - // the source audio. Larger values indicate a higher confidence in PII - // identification. + // The confidence score associated with the identified PII entity in your audio. + // Confidence scores are values between 0 and 1. A larger value indicates a higher + // probability that the identified entity correctly matches the entity spoken in + // your media. Confidence *float64 - // The words in the transcription output that have been identified as a PII entity. + // The word or words identified as PII. Content *string - // The end time of speech that was identified as PII. + // The end time, in milliseconds, of the utterance that was identified as PII. EndTime float64 - // The start time of speech that was identified as PII. + // The start time, in milliseconds, of the utterance that was identified as PII. StartTime float64 - // The type of PII identified in this entity; for example, name or credit card - // number. + // The type of PII identified. For example, NAME or CREDIT_DEBIT_NUMBER. Type *string noSmithyDocumentSerde } -// A word, phrase, or punctuation mark that is transcribed from the input audio. +// A word, phrase, or punctuation mark in your transcription output, along with +// various associated attributes, such as confidence score, type, and start and end +// times. type Item struct { - // A value between zero and one for an item that is a confidence score that Amazon - // Transcribe assigns to each word or phrase that it transcribes. + // The confidence score associated with a word or phrase in your transcript. + // Confidence scores are values between 0 and 1. A larger value indicates a higher + // probability that the identified item correctly matches the item spoken in your + // media. Confidence *float64 - // The word or punctuation that was recognized in the input audio. + // The word or punctuation that was transcribed. Content *string - // The offset from the beginning of the audio stream to the end of the audio that - // resulted in the item. + // The end time, in milliseconds, of the transcribed item. EndTime float64 - // If speaker identification is enabled, shows the speakers identified in the media - // stream. + // If speaker partitioning is enabled, Speaker labels the speaker of the specified + // item. Speaker *string - // If partial result stabilization has been enabled, indicates whether the word or - // phrase in the item is stable. If Stable is true, the result is stable. + // If partial result stabilization is enabled, Stable indicates whether the + // specified item is stable (true) or if it may change when the segment is complete + // (false). Stable *bool - // The offset from the beginning of the audio stream to the beginning of the audio - // that resulted in the item. + // The start time, in milliseconds, of the transcribed item. StartTime float64 - // The type of the item. PRONUNCIATION indicates that the item is a word that was - // recognized in the input audio. PUNCTUATION indicates that the item was - // interpreted as a pause in the input audio. + // The type of item identified. Options are: PRONUNCIATION (spoken words) and + // PUNCTUATION. Type ItemType - // Indicates whether a word in the item matches a word in the vocabulary filter - // you've chosen for your media stream. If true then a word in the item matches - // your vocabulary filter. + // Indicates whether the specified item matches a word in the vocabulary filter + // included in your request. If true, there is a vocabulary filter match. VocabularyFilterMatch bool noSmithyDocumentSerde } -// The language codes of the identified languages and their associated confidence -// scores. The confidence score is a value between zero and one; a larger value -// indicates a higher confidence in the identified language. +// The language code that represents the language identified in your audio, +// including the associated confidence score. If you enabled channel identification +// in your request and each channel contained a different language, you will have +// more than one LanguageWithScore result. type LanguageWithScore struct { - // The language code of the language identified by Amazon Transcribe. + // The language code of the identified language. LanguageCode LanguageCode - // The confidence score for the associated language code. Confidence scores are - // values between zero and one; larger values indicate a higher confidence in the - // identified language. + // The confidence score associated with the identified language code. Confidence + // scores are values between zero and one; larger values indicate a higher + // confidence in the identified language. Score float64 noSmithyDocumentSerde } -// A list of possible transcriptions for the audio. +// A list of possible alternative transcriptions for the input audio. Each +// alternative may contain one or more of Items, Entities, or Transcript. type MedicalAlternative struct { - // Contains the medical entities identified as personal health information in the + // Contains entities identified as personal health information (PHI) in your // transcription output. Entities []MedicalEntity - // A list of objects that contains words and punctuation marks that represents one - // or more interpretations of the input audio. + // Contains words, phrases, or punctuation marks in your transcription output. Items []MedicalItem - // The text that was transcribed from the audio. + // Contains transcribed text. Transcript *string noSmithyDocumentSerde } -// The medical entity identified as personal health information. +// Contains entities identified as personal health information (PHI) in your +// transcription output, along with various associated attributes. Examples include +// category, confidence score, type, stability score, and start and end times. type MedicalEntity struct { - // The type of personal health information of the medical entity. + // The category of information identified. The only category is PHI. Category *string - // A value between zero and one that Amazon Transcribe Medical assigned to the - // personal health information that it identified in the source audio. Larger - // values indicate that Amazon Transcribe Medical has higher confidence in the - // personal health information that it identified. + // The confidence score associated with the identified PHI entity in your audio. + // Confidence scores are values between 0 and 1. A larger value indicates a higher + // probability that the identified entity correctly matches the entity spoken in + // your media. Confidence *float64 - // The word or words in the transcription output that have been identified as a - // medical entity. + // The word or words identified as PHI. Content *string - // The end time of the speech that was identified as a medical entity. + // The end time, in milliseconds, of the utterance that was identified as PHI. EndTime float64 - // The start time of the speech that was identified as a medical entity. + // The start time, in milliseconds, of the utterance that was identified as PHI. StartTime float64 noSmithyDocumentSerde } -// A word, phrase, or punctuation mark that is transcribed from the input audio. +// A word, phrase, or punctuation mark in your transcription output, along with +// various associated attributes, such as confidence score, type, and start and end +// times. type MedicalItem struct { - // A value between 0 and 1 for an item that is a confidence score that Amazon - // Transcribe Medical assigns to each word that it transcribes. + // The confidence score associated with a word or phrase in your transcript. + // Confidence scores are values between 0 and 1. A larger value indicates a higher + // probability that the identified item correctly matches the item spoken in your + // media. Confidence *float64 - // The word or punctuation mark that was recognized in the input audio. + // The word or punctuation that was transcribed. Content *string - // The number of seconds into an audio stream that indicates the creation time of - // an item. + // The end time, in milliseconds, of the transcribed item. EndTime float64 - // If speaker identification is enabled, shows the integer values that correspond - // to the different speakers identified in the stream. For example, if the value of - // Speaker in the stream is either a 0 or a 1, that indicates that Amazon - // Transcribe Medical has identified two speakers in the stream. The value of 0 - // corresponds to one speaker and the value of 1 corresponds to the other speaker. + // If speaker partitioning is enabled, Speaker labels the speaker of the specified + // item. Speaker *string - // The number of seconds into an audio stream that indicates the creation time of - // an item. + // The start time, in milliseconds, of the transcribed item. StartTime float64 - // The type of the item. PRONUNCIATION indicates that the item is a word that was - // recognized in the input audio. PUNCTUATION indicates that the item was - // interpreted as a pause in the input audio, such as a period to indicate the end - // of a sentence. + // The type of item identified. Options are: PRONUNCIATION (spoken words) and + // PUNCTUATION. Type ItemType noSmithyDocumentSerde } -// The results of transcribing a portion of the input audio stream. +// The Result associated with a . Contains a set of transcription results from one +// or more audio segments, along with additional information per your request +// parameters. This can include information relating to alternative transcriptions, +// channel identification, partial result stabilization, language identification, +// and other transcription-related data. type MedicalResult struct { - // A list of possible transcriptions of the audio. Each alternative typically - // contains one Item that contains the result of the transcription. + // A list of possible alternative transcriptions for the input audio. Each + // alternative may contain one or more of Items, Entities, or Transcript. Alternatives []MedicalAlternative - // When channel identification is enabled, Amazon Transcribe Medical transcribes - // the speech from each audio channel separately. You can use ChannelId to retrieve - // the transcription results for a single channel in your audio stream. + // Indicates the channel identified for the Result. ChannelId *string - // The time, in seconds, from the beginning of the audio stream to the end of the - // result. + // The end time, in milliseconds, of the Result. EndTime float64 - // Amazon Transcribe Medical divides the incoming audio stream into segments at - // natural points in the audio. Transcription results are returned based on these - // segments. The IsPartial field is true to indicate that Amazon Transcribe Medical - // has additional transcription data to send. The IsPartial field is false to - // indicate that this is the last transcription result for the segment. + // Indicates if the segment is complete. If IsPartial is true, the segment is not + // complete. If IsPartial is false, the segment is complete. IsPartial bool - // A unique identifier for the result. + // Provides a unique identifier for the Result. ResultId *string - // The time, in seconds, from the beginning of the audio stream to the beginning of - // the result. + // The start time, in milliseconds, of the Result. StartTime float64 noSmithyDocumentSerde } -// The medical transcript in a MedicalTranscriptEvent. +// The MedicalTranscript associated with a . MedicalTranscript contains Results, +// which contains a set of transcription results from one or more audio segments, +// along with additional information per your request parameters. type MedicalTranscript struct { - // MedicalResult objects that contain the results of transcribing a portion of the - // input audio stream. The array can be empty. + // Contains a set of transcription results from one or more audio segments, along + // with additional information per your request parameters. This can include + // information relating to alternative transcriptions, channel identification, + // partial result stabilization, language identification, and other + // transcription-related data. Results []MedicalResult noSmithyDocumentSerde } -// Represents a set of transcription results from the server to the client. It -// contains one or more segments of the transcription. +// The MedicalTranscriptEvent associated with a MedicalTranscriptResultStream. +// Contains a set of transcription results from one or more audio segments, along +// with additional information per your request parameters. type MedicalTranscriptEvent struct { - // The transcription of the audio stream. The transcription is composed of all of - // the items in the results list. + // Contains Results, which contains a set of transcription results from one or more + // audio segments, along with additional information per your request parameters. + // This can include information relating to alternative transcriptions, channel + // identification, partial result stabilization, language identification, and other + // transcription-related data. Transcript *MedicalTranscript noSmithyDocumentSerde } -// Represents the transcription result stream from Amazon Transcribe Medical to -// your application. +// Contains detailed information about your streaming session. // // The following types satisfy this interface: // @@ -285,10 +288,12 @@ type MedicalTranscriptResultStream interface { isMedicalTranscriptResultStream() } -// A portion of the transcription of the audio stream. Events are sent periodically -// from Amazon Transcribe Medical to your application. The event can be a partial -// transcription of a section of the audio stream, or it can be the entire -// transcription of that portion of the audio stream. +// The MedicalTranscriptEvent associated with a MedicalTranscriptResultStream. +// Contains a set of transcription results from one or more audio segments, along +// with additional information per your request parameters. This can include +// information relating to alternative transcriptions, channel identification, +// partial result stabilization, language identification, and other +// transcription-related data. type MedicalTranscriptResultStreamMemberTranscriptEvent struct { Value MedicalTranscriptEvent @@ -297,68 +302,75 @@ type MedicalTranscriptResultStreamMemberTranscriptEvent struct { func (*MedicalTranscriptResultStreamMemberTranscriptEvent) isMedicalTranscriptResultStream() {} -// The result of transcribing a portion of the input audio stream. +// The Result associated with a . Contains a set of transcription results from one +// or more audio segments, along with additional information per your request +// parameters. This can include information relating to alternative transcriptions, +// channel identification, partial result stabilization, language identification, +// and other transcription-related data. type Result struct { - // A list of possible transcriptions for the audio. Each alternative typically - // contains one item that contains the result of the transcription. + // A list of possible alternative transcriptions for the input audio. Each + // alternative may contain one or more of Items, Entities, or Transcript. Alternatives []Alternative - // When channel identification is enabled, Amazon Transcribe transcribes the speech - // from each audio channel separately. You can use ChannelId to retrieve the - // transcription results for a single channel in your audio stream. + // Indicates the channel identified for the Result. ChannelId *string - // The offset in seconds from the beginning of the audio stream to the end of the - // result. + // The end time, in milliseconds, of the Result. EndTime float64 - // Amazon Transcribe divides the incoming audio stream into segments at natural - // points in the audio. Transcription results are returned based on these segments. - // The IsPartial field is true to indicate that Amazon Transcribe has additional - // transcription data to send, false to indicate that this is the last - // transcription result for the segment. + // Indicates if the segment is complete. If IsPartial is true, the segment is not + // complete. If IsPartial is false, the segment is complete. IsPartial bool - // The language code of the identified language in your media stream. + // The language code that represents the language spoken in your audio stream. LanguageCode LanguageCode - // The language code of the dominant language identified in your media. + // The language code of the dominant language identified in your stream. If you + // enabled channel identification and each channel of your audio contains a + // different language, you may have more than one result. LanguageIdentification []LanguageWithScore - // A unique identifier for the result. + // Provides a unique identifier for the Result. ResultId *string - // The offset in seconds from the beginning of the audio stream to the beginning of - // the result. + // The start time, in milliseconds, of the Result. StartTime float64 noSmithyDocumentSerde } -// The transcription in a TranscriptEvent. +// The Transcript associated with a . Transcript contains Results, which contains a +// set of transcription results from one or more audio segments, along with +// additional information per your request parameters. type Transcript struct { - // Result objects that contain the results of transcribing a portion of the input - // audio stream. The array can be empty. + // Contains a set of transcription results from one or more audio segments, along + // with additional information per your request parameters. This can include + // information relating to alternative transcriptions, channel identification, + // partial result stabilization, language identification, and other + // transcription-related data. Results []Result noSmithyDocumentSerde } -// Represents a set of transcription results from the server to the client. It -// contains one or more segments of the transcription. +// The TranscriptEvent associated with a TranscriptResultStream. Contains a set of +// transcription results from one or more audio segments, along with additional +// information per your request parameters. type TranscriptEvent struct { - // The transcription of the audio stream. The transcription is composed of all of - // the items in the results list. + // Contains Results, which contains a set of transcription results from one or more + // audio segments, along with additional information per your request parameters. + // This can include information relating to alternative transcriptions, channel + // identification, partial result stabilization, language identification, and other + // transcription-related data. Transcript *Transcript noSmithyDocumentSerde } -// Represents the transcription result stream from Amazon Transcribe to your -// application. +// Contains detailed information about your streaming session. // // The following types satisfy this interface: // @@ -367,10 +379,9 @@ type TranscriptResultStream interface { isTranscriptResultStream() } -// A portion of the transcription of the audio stream. Events are sent periodically -// from Amazon Transcribe to your application. The event can be a partial -// transcription of a section of the audio stream, or it can be the entire -// transcription of that portion of the audio stream. +// Contains Transcript, which contains Results. The object contains a set of +// transcription results from one or more audio segments, along with additional +// information per your request parameters. type TranscriptResultStreamMemberTranscriptEvent struct { Value TranscriptEvent