diff --git a/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.api.json b/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.api.json index 19133cfa2e94..851713043276 100644 --- a/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.api.json +++ b/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.api.json @@ -206,6 +206,22 @@ {"shape":"InternalServerException"} ] }, + "ListInferenceEvents":{ + "name":"ListInferenceEvents", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListInferenceEventsRequest"}, + "output":{"shape":"ListInferenceEventsResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InternalServerException"} + ] + }, "ListInferenceExecutions":{ "name":"ListInferenceExecutions", "http":{ @@ -789,6 +805,10 @@ "TotalNumberOfDuplicateTimestamps":{"shape":"Integer"} } }, + "EventDurationInSeconds":{ + "type":"long", + "min":0 + }, "FileNameTimestampFormat":{ "type":"string", "pattern":"^EPOCH|yyyy-MM-dd-HH-mm-ss|yyyyMMddHHmmss$" @@ -806,6 +826,21 @@ "min":1, "pattern":"\\p{ASCII}{1,256}" }, + "InferenceEventSummaries":{ + "type":"list", + "member":{"shape":"InferenceEventSummary"} + }, + "InferenceEventSummary":{ + "type":"structure", + "members":{ + "InferenceSchedulerArn":{"shape":"InferenceSchedulerArn"}, + "InferenceSchedulerName":{"shape":"InferenceSchedulerName"}, + "EventStartTime":{"shape":"Timestamp"}, + "EventEndTime":{"shape":"Timestamp"}, + "Diagnostics":{"shape":"ModelMetrics"}, + "EventDurationInSeconds":{"shape":"EventDurationInSeconds"} + } + }, "InferenceExecutionStatus":{ "type":"string", "enum":[ @@ -1061,6 +1096,28 @@ "DatasetSummaries":{"shape":"DatasetSummaries"} } }, + "ListInferenceEventsRequest":{ + "type":"structure", + "required":[ + "InferenceSchedulerName", + "IntervalStartTime", + "IntervalEndTime" + ], + "members":{ + "NextToken":{"shape":"NextToken"}, + "MaxResults":{"shape":"MaxResults"}, + "InferenceSchedulerName":{"shape":"InferenceSchedulerIdentifier"}, + "IntervalStartTime":{"shape":"Timestamp"}, + "IntervalEndTime":{"shape":"Timestamp"} + } + }, + "ListInferenceEventsResponse":{ + "type":"structure", + "members":{ + "NextToken":{"shape":"NextToken"}, + "InferenceEventSummaries":{"shape":"InferenceEventSummaries"} + } + }, "ListInferenceExecutionsRequest":{ "type":"structure", "required":["InferenceSchedulerName"], @@ -1285,7 +1342,7 @@ "type":"string", "max":1024, "min":0, - "pattern":"(^$)|([\\P{M}\\p{M}]{1,1023}/$)" + "pattern":"(^$)|([\\u0009\\u000A\\u000D\\u0020-\\u00FF]{1,1023}/$)" }, "SensorName":{ "type":"string", diff --git a/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.docs.json b/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.docs.json index 54561cf613c4..0d6912ec0cdc 100644 --- a/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.docs.json +++ b/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.docs.json @@ -14,6 +14,7 @@ "DescribeModel": "

Provides a JSON containing the overall information about a specific ML model, including model name and ARN, dataset, training and evaluation information, status, and so on.

", "ListDataIngestionJobs": "

Provides a list of all data ingestion jobs, including dataset name and ARN, S3 location of the input data, status, and so on.

", "ListDatasets": "

Lists all datasets currently available in your account, filtering on the dataset name.

", + "ListInferenceEvents": "

Lists all inference events that have been found for the specified inference scheduler.

", "ListInferenceExecutions": "

Lists all inference executions that have been performed by the specified inference scheduler.

", "ListInferenceSchedulers": "

Retrieves a list of all inference schedulers currently available for your account.

", "ListModels": "

Generates a list of all models in the account, including model name and ARN, dataset, and status.

", @@ -299,6 +300,12 @@ "DataQualitySummary$DuplicateTimestamps": "

Parameter that gives information about duplicate timestamps in the input data.

" } }, + "EventDurationInSeconds": { + "base": null, + "refs": { + "InferenceEventSummary$EventDurationInSeconds": "

Indicates the size of an inference event in seconds.

" + } + }, "FileNameTimestampFormat": { "base": null, "refs": { @@ -333,6 +340,18 @@ "StartDataIngestionJobRequest$ClientToken": "

A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.

" } }, + "InferenceEventSummaries": { + "base": null, + "refs": { + "ListInferenceEventsResponse$InferenceEventSummaries": "

Provides an array of information about the individual inference events returned from the ListInferenceEvents operation, including scheduler used, event start time, event end time, diagnostics, and so on.

" + } + }, + "InferenceEventSummary": { + "base": "

Contains information about the specific inference event, including start and end time, diagnostics information, event duration and so on.

", + "refs": { + "InferenceEventSummaries$member": null + } + }, "InferenceExecutionStatus": { "base": null, "refs": { @@ -393,6 +412,7 @@ "refs": { "CreateInferenceSchedulerResponse$InferenceSchedulerArn": "

The Amazon Resource Name (ARN) of the inference scheduler being created.

", "DescribeInferenceSchedulerResponse$InferenceSchedulerArn": "

The Amazon Resource Name (ARN) of the inference scheduler being described.

", + "InferenceEventSummary$InferenceSchedulerArn": "

The Amazon Resource Name (ARN) of the inference scheduler being used for the inference event.

", "InferenceExecutionSummary$InferenceSchedulerArn": "

The Amazon Resource Name (ARN) of the inference scheduler being used for the inference execution.

", "InferenceSchedulerSummary$InferenceSchedulerArn": "

The Amazon Resource Name (ARN) of the inference scheduler.

", "StartInferenceSchedulerResponse$InferenceSchedulerArn": "

The Amazon Resource Name (ARN) of the inference scheduler being started.

", @@ -404,6 +424,7 @@ "refs": { "DeleteInferenceSchedulerRequest$InferenceSchedulerName": "

The name of the inference scheduler to be deleted.

", "DescribeInferenceSchedulerRequest$InferenceSchedulerName": "

The name of the inference scheduler being described.

", + "ListInferenceEventsRequest$InferenceSchedulerName": "

The name of the inference scheduler for the inference events listed.

", "ListInferenceExecutionsRequest$InferenceSchedulerName": "

The name of the inference scheduler for the inference execution listed.

", "ListInferenceSchedulersRequest$InferenceSchedulerNameBeginsWith": "

The beginning of the name of the inference schedulers to be listed.

", "StartInferenceSchedulerRequest$InferenceSchedulerName": "

The name of the inference scheduler to be started.

", @@ -417,6 +438,7 @@ "CreateInferenceSchedulerRequest$InferenceSchedulerName": "

The name of the inference scheduler being created.

", "CreateInferenceSchedulerResponse$InferenceSchedulerName": "

The name of inference scheduler being created.

", "DescribeInferenceSchedulerResponse$InferenceSchedulerName": "

The name of the inference scheduler being described.

", + "InferenceEventSummary$InferenceSchedulerName": "

The name of the inference scheduler being used for the inference events.

", "InferenceExecutionSummary$InferenceSchedulerName": "

The name of the inference scheduler being used for the inference execution.

", "InferenceSchedulerSummary$InferenceSchedulerName": "

The name of the inference scheduler.

", "StartInferenceSchedulerResponse$InferenceSchedulerName": "

The name of the inference scheduler being started.

", @@ -583,6 +605,16 @@ "refs": { } }, + "ListInferenceEventsRequest": { + "base": null, + "refs": { + } + }, + "ListInferenceEventsResponse": { + "base": null, + "refs": { + } + }, "ListInferenceExecutionsRequest": { "base": null, "refs": { @@ -644,6 +676,7 @@ "refs": { "ListDataIngestionJobsRequest$MaxResults": "

Specifies the maximum number of data ingestion jobs to list.

", "ListDatasetsRequest$MaxResults": "

Specifies the maximum number of datasets to list.

", + "ListInferenceEventsRequest$MaxResults": "

Specifies the maximum number of inference events to list.

", "ListInferenceExecutionsRequest$MaxResults": "

Specifies the maximum number of inference executions to list.

", "ListInferenceSchedulersRequest$MaxResults": "

Specifies the maximum number of inference schedulers to list.

", "ListModelsRequest$MaxResults": "

Specifies the maximum number of ML models to list.

", @@ -678,7 +711,8 @@ "ModelMetrics": { "base": null, "refs": { - "DescribeModelResponse$ModelMetrics": "

The Model Metrics show an aggregated summary of the model's performance within the evaluation time range. This is the JSON content of the metrics created when evaluating the model.

" + "DescribeModelResponse$ModelMetrics": "

The Model Metrics show an aggregated summary of the model's performance within the evaluation time range. This is the JSON content of the metrics created when evaluating the model.

", + "InferenceEventSummary$Diagnostics": "

An array which specifies the names and values of all sensors contributing to an inference event.

" } }, "ModelName": { @@ -754,6 +788,8 @@ "ListDataIngestionJobsResponse$NextToken": "

An opaque pagination token indicating where to continue the listing of data ingestion jobs.

", "ListDatasetsRequest$NextToken": "

An opaque pagination token indicating where to continue the listing of datasets.

", "ListDatasetsResponse$NextToken": "

An opaque pagination token indicating where to continue the listing of datasets.

", + "ListInferenceEventsRequest$NextToken": "

An opaque pagination token indicating where to continue the listing of inference events.

", + "ListInferenceEventsResponse$NextToken": "

An opaque pagination token indicating where to continue the listing of inference executions.

", "ListInferenceExecutionsRequest$NextToken": "

An opaque pagination token indicating where to continue the listing of inference executions.

", "ListInferenceExecutionsResponse$NextToken": "

An opaque pagination token indicating where to continue the listing of inference executions.

", "ListInferenceSchedulersRequest$NextToken": "

An opaque pagination token indicating where to continue the listing of inference schedulers.

", @@ -949,7 +985,7 @@ "DescribeDataIngestionJobResponse$CreatedAt": "

The time at which the data ingestion job was created.

", "DescribeDataIngestionJobResponse$DataStartTime": "

Indicates the earliest timestamp corresponding to data that was successfully ingested during this specific ingestion job.

", "DescribeDataIngestionJobResponse$DataEndTime": "

Indicates the latest timestamp corresponding to data that was successfully ingested during this specific ingestion job.

", - "DescribeDatasetResponse$CreatedAt": "

Specifies the time the dataset was created in Amazon Lookout for Equipment.

", + "DescribeDatasetResponse$CreatedAt": "

Specifies the time the dataset was created in Lookout for Equipment.

", "DescribeDatasetResponse$LastUpdatedAt": "

Specifies the time the dataset was last updated, if it was.

", "DescribeDatasetResponse$DataStartTime": "

Indicates the earliest timestamp corresponding to data that was successfully ingested during the most recent ingestion of this particular dataset.

", "DescribeDatasetResponse$DataEndTime": "

Indicates the latest timestamp corresponding to data that was successfully ingested during the most recent ingestion of this particular dataset.

", @@ -963,9 +999,13 @@ "DescribeModelResponse$TrainingExecutionEndTime": "

Indicates the time at which the training of the ML model was completed.

", "DescribeModelResponse$LastUpdatedTime": "

Indicates the last time the ML model was updated. The type of update is not specified.

", "DescribeModelResponse$CreatedAt": "

Indicates the time and date at which the ML model was created.

", + "InferenceEventSummary$EventStartTime": "

Indicates the starting time of an inference event.

", + "InferenceEventSummary$EventEndTime": "

Indicates the ending time of an inference event.

", "InferenceExecutionSummary$ScheduledStartTime": "

Indicates the start time at which the inference scheduler began the specific inference execution.

", "InferenceExecutionSummary$DataStartTime": "

Indicates the time reference in the dataset at which the inference execution began.

", "InferenceExecutionSummary$DataEndTime": "

Indicates the time reference in the dataset at which the inference execution stopped.

", + "ListInferenceEventsRequest$IntervalStartTime": "

Lookout for Equipment will return all the inference events with start time equal to or greater than the start time given.

", + "ListInferenceEventsRequest$IntervalEndTime": "

Lookout for Equipment will return all the inference events with end time equal to or less than the end time given.

", "ListInferenceExecutionsRequest$DataStartTimeAfter": "

The time reference in the inferenced dataset after which Amazon Lookout for Equipment started the inference execution.

", "ListInferenceExecutionsRequest$DataEndTimeBefore": "

The time reference in the inferenced dataset before which Amazon Lookout for Equipment stopped the inference execution.

", "ModelSummary$CreatedAt": "

The time at which the specific model was created.

", diff --git a/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.normal.json b/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.normal.json index 5eb9be6ca604..9a786eea284b 100644 --- a/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.normal.json +++ b/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.normal.json @@ -218,6 +218,23 @@ ], "documentation":"

Lists all datasets currently available in your account, filtering on the dataset name.

" }, + "ListInferenceEvents":{ + "name":"ListInferenceEvents", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListInferenceEventsRequest"}, + "output":{"shape":"ListInferenceEventsResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InternalServerException"} + ], + "documentation":"

Lists all inference events that have been found for the specified inference scheduler.

" + }, "ListInferenceExecutions":{ "name":"ListInferenceExecutions", "http":{ @@ -956,7 +973,7 @@ }, "CreatedAt":{ "shape":"Timestamp", - "documentation":"

Specifies the time the dataset was created in Amazon Lookout for Equipment.

" + "documentation":"

Specifies the time the dataset was created in Lookout for Equipment.

" }, "LastUpdatedAt":{ "shape":"Timestamp", @@ -1180,6 +1197,10 @@ }, "documentation":"

Entity that comprises information abount duplicate timestamps in the dataset.

" }, + "EventDurationInSeconds":{ + "type":"long", + "min":0 + }, "FileNameTimestampFormat":{ "type":"string", "pattern":"^EPOCH|yyyy-MM-dd-HH-mm-ss|yyyyMMddHHmmss$" @@ -1197,6 +1218,40 @@ "min":1, "pattern":"\\p{ASCII}{1,256}" }, + "InferenceEventSummaries":{ + "type":"list", + "member":{"shape":"InferenceEventSummary"} + }, + "InferenceEventSummary":{ + "type":"structure", + "members":{ + "InferenceSchedulerArn":{ + "shape":"InferenceSchedulerArn", + "documentation":"

The Amazon Resource Name (ARN) of the inference scheduler being used for the inference event.

" + }, + "InferenceSchedulerName":{ + "shape":"InferenceSchedulerName", + "documentation":"

The name of the inference scheduler being used for the inference events.

" + }, + "EventStartTime":{ + "shape":"Timestamp", + "documentation":"

Indicates the starting time of an inference event.

" + }, + "EventEndTime":{ + "shape":"Timestamp", + "documentation":"

Indicates the ending time of an inference event.

" + }, + "Diagnostics":{ + "shape":"ModelMetrics", + "documentation":"

An array which specifies the names and values of all sensors contributing to an inference event.

" + }, + "EventDurationInSeconds":{ + "shape":"EventDurationInSeconds", + "documentation":"

Indicates the size of an inference event in seconds.

" + } + }, + "documentation":"

Contains information about the specific inference event, including start and end time, diagnostics information, event duration and so on.

" + }, "InferenceExecutionStatus":{ "type":"string", "enum":[ @@ -1642,6 +1697,49 @@ } } }, + "ListInferenceEventsRequest":{ + "type":"structure", + "required":[ + "InferenceSchedulerName", + "IntervalStartTime", + "IntervalEndTime" + ], + "members":{ + "NextToken":{ + "shape":"NextToken", + "documentation":"

An opaque pagination token indicating where to continue the listing of inference events.

" + }, + "MaxResults":{ + "shape":"MaxResults", + "documentation":"

Specifies the maximum number of inference events to list.

" + }, + "InferenceSchedulerName":{ + "shape":"InferenceSchedulerIdentifier", + "documentation":"

The name of the inference scheduler for the inference events listed.

" + }, + "IntervalStartTime":{ + "shape":"Timestamp", + "documentation":"

Lookout for Equipment will return all the inference events with start time equal to or greater than the start time given.

" + }, + "IntervalEndTime":{ + "shape":"Timestamp", + "documentation":"

Lookout for Equipment will return all the inference events with end time equal to or less than the end time given.

" + } + } + }, + "ListInferenceEventsResponse":{ + "type":"structure", + "members":{ + "NextToken":{ + "shape":"NextToken", + "documentation":"

An opaque pagination token indicating where to continue the listing of inference executions.

" + }, + "InferenceEventSummaries":{ + "shape":"InferenceEventSummaries", + "documentation":"

Provides an array of information about the individual inference events returned from the ListInferenceEvents operation, including scheduler used, event start time, event end time, diagnostics, and so on.

" + } + } + }, "ListInferenceExecutionsRequest":{ "type":"structure", "required":["InferenceSchedulerName"], @@ -2002,7 +2100,7 @@ "type":"string", "max":1024, "min":0, - "pattern":"(^$)|([\\P{M}\\p{M}]{1,1023}/$)" + "pattern":"(^$)|([\\u0009\\u000A\\u000D\\u0020-\\u00FF]{1,1023}/$)" }, "SensorName":{ "type":"string", diff --git a/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.paginators.json b/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.paginators.json index ec69388fc641..788aa3027e64 100644 --- a/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.paginators.json +++ b/generator/ServiceModels/lookoutequipment/lookoutequipment-2020-12-15.paginators.json @@ -10,6 +10,11 @@ "output_token": "NextToken", "limit_key": "MaxResults" }, + "ListInferenceEvents": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults" + }, "ListInferenceExecutions": { "input_token": "NextToken", "output_token": "NextToken", diff --git a/sdk/code-analysis/ServiceAnalysis/LookoutEquipment/Generated/PropertyValueRules.xml b/sdk/code-analysis/ServiceAnalysis/LookoutEquipment/Generated/PropertyValueRules.xml index d1aa74eaaafb..485dc48ae56a 100644 --- a/sdk/code-analysis/ServiceAnalysis/LookoutEquipment/Generated/PropertyValueRules.xml +++ b/sdk/code-analysis/ServiceAnalysis/LookoutEquipment/Generated/PropertyValueRules.xml @@ -354,6 +354,25 @@ Amazon.LookoutEquipment.Model.ListDatasetsResponse.NextToken 8192 + + Amazon.LookoutEquipment.Model.ListInferenceEventsRequest.InferenceSchedulerName + 1 + 200 + ^[0-9a-zA-Z_-]{1,200}$ + + + Amazon.LookoutEquipment.Model.ListInferenceEventsRequest.MaxResults + 1 + 500 + + + Amazon.LookoutEquipment.Model.ListInferenceEventsRequest.NextToken + 8192 + + + Amazon.LookoutEquipment.Model.ListInferenceEventsResponse.NextToken + 8192 + Amazon.LookoutEquipment.Model.ListInferenceExecutionsRequest.InferenceSchedulerName 1 @@ -595,6 +614,27 @@ 200 ^[0-9a-zA-Z_-]{1,200}$ + + Amazon.LookoutEquipment.Model.InferenceEventSummary.Diagnostics + 1 + 50000 + + + Amazon.LookoutEquipment.Model.InferenceEventSummary.EventDurationInSeconds + 0 + + + Amazon.LookoutEquipment.Model.InferenceEventSummary.InferenceSchedulerArn + 20 + 2048 + arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9\-]*:[0-9]{12}:inference-scheduler\/.+ + + + Amazon.LookoutEquipment.Model.InferenceEventSummary.InferenceSchedulerName + 1 + 200 + ^[0-9a-zA-Z_-]{1,200}$ + Amazon.LookoutEquipment.Model.InferenceExecutionSummary.FailedReason 1 @@ -654,7 +694,7 @@ Amazon.LookoutEquipment.Model.InferenceS3InputConfiguration.Prefix 0 1024 - (^$)|([\P{M}\p{M}]{1,1023}/$) + (^$)|([\u0009\u000A\u000D\u0020-\u00FF]{1,1023}/$) Amazon.LookoutEquipment.Model.InferenceS3OutputConfiguration.Bucket @@ -666,7 +706,7 @@ Amazon.LookoutEquipment.Model.InferenceS3OutputConfiguration.Prefix 0 1024 - (^$)|([\P{M}\p{M}]{1,1023}/$) + (^$)|([\u0009\u000A\u000D\u0020-\u00FF]{1,1023}/$) Amazon.LookoutEquipment.Model.InferenceSchedulerSummary.DataDelayOffsetInMinutes @@ -712,7 +752,7 @@ Amazon.LookoutEquipment.Model.IngestionS3InputConfiguration.Prefix 0 1024 - (^$)|([\P{M}\p{M}]{1,1023}/$) + (^$)|([\u0009\u000A\u000D\u0020-\u00FF]{1,1023}/$) Amazon.LookoutEquipment.Model.LabelsS3InputConfiguration.Bucket @@ -724,7 +764,7 @@ Amazon.LookoutEquipment.Model.LabelsS3InputConfiguration.Prefix 0 1024 - (^$)|([\P{M}\p{M}]{1,1023}/$) + (^$)|([\u0009\u000A\u000D\u0020-\u00FF]{1,1023}/$) Amazon.LookoutEquipment.Model.ModelSummary.DatasetArn diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/DescribeDatasetResponse.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/DescribeDatasetResponse.cs index 03311042b91b..d54ad06341cd 100644 --- a/sdk/src/Services/LookoutEquipment/Generated/Model/DescribeDatasetResponse.cs +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/DescribeDatasetResponse.cs @@ -50,7 +50,7 @@ public partial class DescribeDatasetResponse : AmazonWebServiceResponse /// /// Gets and sets the property CreatedAt. /// - /// Specifies the time the dataset was created in Amazon Lookout for Equipment. + /// Specifies the time the dataset was created in Lookout for Equipment. /// /// public DateTime CreatedAt diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/InferenceEventSummary.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/InferenceEventSummary.cs new file mode 100644 index 000000000000..2ab0629c5af2 --- /dev/null +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/InferenceEventSummary.cs @@ -0,0 +1,159 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the lookoutequipment-2020-12-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +namespace Amazon.LookoutEquipment.Model +{ + /// + /// Contains information about the specific inference event, including start and end time, + /// diagnostics information, event duration and so on. + /// + public partial class InferenceEventSummary + { + private string _diagnostics; + private long? _eventDurationInSeconds; + private DateTime? _eventEndTime; + private DateTime? _eventStartTime; + private string _inferenceSchedulerArn; + private string _inferenceSchedulerName; + + /// + /// Gets and sets the property Diagnostics. + /// + /// An array which specifies the names and values of all sensors contributing to an inference + /// event. + /// + /// + [AWSProperty(Min=1, Max=50000)] + public string Diagnostics + { + get { return this._diagnostics; } + set { this._diagnostics = value; } + } + + // Check to see if Diagnostics property is set + internal bool IsSetDiagnostics() + { + return this._diagnostics != null; + } + + /// + /// Gets and sets the property EventDurationInSeconds. + /// + /// Indicates the size of an inference event in seconds. + /// + /// + [AWSProperty(Min=0)] + public long EventDurationInSeconds + { + get { return this._eventDurationInSeconds.GetValueOrDefault(); } + set { this._eventDurationInSeconds = value; } + } + + // Check to see if EventDurationInSeconds property is set + internal bool IsSetEventDurationInSeconds() + { + return this._eventDurationInSeconds.HasValue; + } + + /// + /// Gets and sets the property EventEndTime. + /// + /// Indicates the ending time of an inference event. + /// + /// + public DateTime EventEndTime + { + get { return this._eventEndTime.GetValueOrDefault(); } + set { this._eventEndTime = value; } + } + + // Check to see if EventEndTime property is set + internal bool IsSetEventEndTime() + { + return this._eventEndTime.HasValue; + } + + /// + /// Gets and sets the property EventStartTime. + /// + /// Indicates the starting time of an inference event. + /// + /// + public DateTime EventStartTime + { + get { return this._eventStartTime.GetValueOrDefault(); } + set { this._eventStartTime = value; } + } + + // Check to see if EventStartTime property is set + internal bool IsSetEventStartTime() + { + return this._eventStartTime.HasValue; + } + + /// + /// Gets and sets the property InferenceSchedulerArn. + /// + /// The Amazon Resource Name (ARN) of the inference scheduler being used for the inference + /// event. + /// + /// + [AWSProperty(Min=20, Max=2048)] + public string InferenceSchedulerArn + { + get { return this._inferenceSchedulerArn; } + set { this._inferenceSchedulerArn = value; } + } + + // Check to see if InferenceSchedulerArn property is set + internal bool IsSetInferenceSchedulerArn() + { + return this._inferenceSchedulerArn != null; + } + + /// + /// Gets and sets the property InferenceSchedulerName. + /// + /// The name of the inference scheduler being used for the inference events. + /// + /// + [AWSProperty(Min=1, Max=200)] + public string InferenceSchedulerName + { + get { return this._inferenceSchedulerName; } + set { this._inferenceSchedulerName = value; } + } + + // Check to see if InferenceSchedulerName property is set + internal bool IsSetInferenceSchedulerName() + { + return this._inferenceSchedulerName != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/Internal/MarshallTransformations/InferenceEventSummaryUnmarshaller.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/Internal/MarshallTransformations/InferenceEventSummaryUnmarshaller.cs new file mode 100644 index 000000000000..94693e30c754 --- /dev/null +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/Internal/MarshallTransformations/InferenceEventSummaryUnmarshaller.cs @@ -0,0 +1,122 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the lookoutequipment-2020-12-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.LookoutEquipment.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +using ThirdParty.Json.LitJson; + +namespace Amazon.LookoutEquipment.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for InferenceEventSummary Object + /// + public class InferenceEventSummaryUnmarshaller : IUnmarshaller, IUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + InferenceEventSummary IUnmarshaller.Unmarshall(XmlUnmarshallerContext context) + { + throw new NotImplementedException(); + } + + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public InferenceEventSummary Unmarshall(JsonUnmarshallerContext context) + { + context.Read(); + if (context.CurrentTokenType == JsonToken.Null) + return null; + + InferenceEventSummary unmarshalledObject = new InferenceEventSummary(); + + int targetDepth = context.CurrentDepth; + while (context.ReadAtDepth(targetDepth)) + { + if (context.TestExpression("Diagnostics", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.Diagnostics = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("EventDurationInSeconds", targetDepth)) + { + var unmarshaller = LongUnmarshaller.Instance; + unmarshalledObject.EventDurationInSeconds = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("EventEndTime", targetDepth)) + { + var unmarshaller = DateTimeUnmarshaller.Instance; + unmarshalledObject.EventEndTime = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("EventStartTime", targetDepth)) + { + var unmarshaller = DateTimeUnmarshaller.Instance; + unmarshalledObject.EventStartTime = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("InferenceSchedulerArn", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.InferenceSchedulerArn = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("InferenceSchedulerName", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.InferenceSchedulerName = unmarshaller.Unmarshall(context); + continue; + } + } + + return unmarshalledObject; + } + + + private static InferenceEventSummaryUnmarshaller _instance = new InferenceEventSummaryUnmarshaller(); + + /// + /// Gets the singleton. + /// + public static InferenceEventSummaryUnmarshaller Instance + { + get + { + return _instance; + } + } + } +} \ No newline at end of file diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/Internal/MarshallTransformations/ListInferenceEventsRequestMarshaller.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/Internal/MarshallTransformations/ListInferenceEventsRequestMarshaller.cs new file mode 100644 index 000000000000..5bd9e4a0e0d1 --- /dev/null +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/Internal/MarshallTransformations/ListInferenceEventsRequestMarshaller.cs @@ -0,0 +1,127 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the lookoutequipment-2020-12-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Serialization; + +using Amazon.LookoutEquipment.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +using ThirdParty.Json.LitJson; + +namespace Amazon.LookoutEquipment.Model.Internal.MarshallTransformations +{ + /// + /// ListInferenceEvents Request Marshaller + /// + public class ListInferenceEventsRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((ListInferenceEventsRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(ListInferenceEventsRequest publicRequest) + { + IRequest request = new DefaultRequest(publicRequest, "Amazon.LookoutEquipment"); + string target = "AWSLookoutEquipmentFrontendService.ListInferenceEvents"; + request.Headers["X-Amz-Target"] = target; + request.Headers["Content-Type"] = "application/x-amz-json-1.0"; + request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-12-15"; + request.HttpMethod = "POST"; + + request.ResourcePath = "/"; + using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) + { + JsonWriter writer = new JsonWriter(stringWriter); + writer.WriteObjectStart(); + var context = new JsonMarshallerContext(request, writer); + if(publicRequest.IsSetInferenceSchedulerName()) + { + context.Writer.WritePropertyName("InferenceSchedulerName"); + context.Writer.Write(publicRequest.InferenceSchedulerName); + } + + if(publicRequest.IsSetIntervalEndTime()) + { + context.Writer.WritePropertyName("IntervalEndTime"); + context.Writer.Write(publicRequest.IntervalEndTime); + } + + if(publicRequest.IsSetIntervalStartTime()) + { + context.Writer.WritePropertyName("IntervalStartTime"); + context.Writer.Write(publicRequest.IntervalStartTime); + } + + if(publicRequest.IsSetMaxResults()) + { + context.Writer.WritePropertyName("MaxResults"); + context.Writer.Write(publicRequest.MaxResults); + } + + if(publicRequest.IsSetNextToken()) + { + context.Writer.WritePropertyName("NextToken"); + context.Writer.Write(publicRequest.NextToken); + } + + writer.WriteObjectEnd(); + string snippet = stringWriter.ToString(); + request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); + } + + + return request; + } + private static ListInferenceEventsRequestMarshaller _instance = new ListInferenceEventsRequestMarshaller(); + + internal static ListInferenceEventsRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static ListInferenceEventsRequestMarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/Internal/MarshallTransformations/ListInferenceEventsResponseUnmarshaller.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/Internal/MarshallTransformations/ListInferenceEventsResponseUnmarshaller.cs new file mode 100644 index 000000000000..0944a706fd9a --- /dev/null +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/Internal/MarshallTransformations/ListInferenceEventsResponseUnmarshaller.cs @@ -0,0 +1,132 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the lookoutequipment-2020-12-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.LookoutEquipment.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +using ThirdParty.Json.LitJson; + +namespace Amazon.LookoutEquipment.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for ListInferenceEvents operation + /// + public class ListInferenceEventsResponseUnmarshaller : JsonResponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) + { + ListInferenceEventsResponse response = new ListInferenceEventsResponse(); + + context.Read(); + int targetDepth = context.CurrentDepth; + while (context.ReadAtDepth(targetDepth)) + { + if (context.TestExpression("InferenceEventSummaries", targetDepth)) + { + var unmarshaller = new ListUnmarshaller(InferenceEventSummaryUnmarshaller.Instance); + response.InferenceEventSummaries = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("NextToken", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + response.NextToken = unmarshaller.Unmarshall(context); + continue; + } + } + + return response; + } + + /// + /// Unmarshaller error response to exception. + /// + /// + /// + /// + /// + public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) + { + var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); + errorResponse.InnerException = innerException; + errorResponse.StatusCode = statusCode; + + var responseBodyBytes = context.GetResponseBodyBytes(); + + using (var streamCopy = new MemoryStream(responseBodyBytes)) + using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) + { + if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) + { + return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); + } + if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) + { + return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); + } + if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) + { + return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); + } + if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) + { + return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); + } + if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) + { + return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); + } + } + return new AmazonLookoutEquipmentException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); + } + + private static ListInferenceEventsResponseUnmarshaller _instance = new ListInferenceEventsResponseUnmarshaller(); + + internal static ListInferenceEventsResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static ListInferenceEventsResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/ListInferenceEventsRequest.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/ListInferenceEventsRequest.cs new file mode 100644 index 000000000000..2cfb82043f34 --- /dev/null +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/ListInferenceEventsRequest.cs @@ -0,0 +1,141 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the lookoutequipment-2020-12-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +namespace Amazon.LookoutEquipment.Model +{ + /// + /// Container for the parameters to the ListInferenceEvents operation. + /// Lists all inference events that have been found for the specified inference scheduler. + /// + public partial class ListInferenceEventsRequest : AmazonLookoutEquipmentRequest + { + private string _inferenceSchedulerName; + private DateTime? _intervalEndTime; + private DateTime? _intervalStartTime; + private int? _maxResults; + private string _nextToken; + + /// + /// Gets and sets the property InferenceSchedulerName. + /// + /// The name of the inference scheduler for the inference events listed. + /// + /// + [AWSProperty(Required=true, Min=1, Max=200)] + public string InferenceSchedulerName + { + get { return this._inferenceSchedulerName; } + set { this._inferenceSchedulerName = value; } + } + + // Check to see if InferenceSchedulerName property is set + internal bool IsSetInferenceSchedulerName() + { + return this._inferenceSchedulerName != null; + } + + /// + /// Gets and sets the property IntervalEndTime. + /// + /// Lookout for Equipment will return all the inference events with end time equal to + /// or less than the end time given. + /// + /// + [AWSProperty(Required=true)] + public DateTime IntervalEndTime + { + get { return this._intervalEndTime.GetValueOrDefault(); } + set { this._intervalEndTime = value; } + } + + // Check to see if IntervalEndTime property is set + internal bool IsSetIntervalEndTime() + { + return this._intervalEndTime.HasValue; + } + + /// + /// Gets and sets the property IntervalStartTime. + /// + /// Lookout for Equipment will return all the inference events with start time equal + /// to or greater than the start time given. + /// + /// + [AWSProperty(Required=true)] + public DateTime IntervalStartTime + { + get { return this._intervalStartTime.GetValueOrDefault(); } + set { this._intervalStartTime = value; } + } + + // Check to see if IntervalStartTime property is set + internal bool IsSetIntervalStartTime() + { + return this._intervalStartTime.HasValue; + } + + /// + /// Gets and sets the property MaxResults. + /// + /// Specifies the maximum number of inference events to list. + /// + /// + [AWSProperty(Min=1, Max=500)] + public int MaxResults + { + get { return this._maxResults.GetValueOrDefault(); } + set { this._maxResults = value; } + } + + // Check to see if MaxResults property is set + internal bool IsSetMaxResults() + { + return this._maxResults.HasValue; + } + + /// + /// Gets and sets the property NextToken. + /// + /// An opaque pagination token indicating where to continue the listing of inference events. + /// + /// + [AWSProperty(Max=8192)] + public string NextToken + { + get { return this._nextToken; } + set { this._nextToken = value; } + } + + // Check to see if NextToken property is set + internal bool IsSetNextToken() + { + return this._nextToken != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/ListInferenceEventsResponse.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/ListInferenceEventsResponse.cs new file mode 100644 index 000000000000..0694e103bdb8 --- /dev/null +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/ListInferenceEventsResponse.cs @@ -0,0 +1,80 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the lookoutequipment-2020-12-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +namespace Amazon.LookoutEquipment.Model +{ + /// + /// This is the response object from the ListInferenceEvents operation. + /// + public partial class ListInferenceEventsResponse : AmazonWebServiceResponse + { + private List _inferenceEventSummaries = new List(); + private string _nextToken; + + /// + /// Gets and sets the property InferenceEventSummaries. + /// + /// Provides an array of information about the individual inference events returned from + /// the ListInferenceEvents operation, including scheduler used, event start + /// time, event end time, diagnostics, and so on. + /// + /// + public List InferenceEventSummaries + { + get { return this._inferenceEventSummaries; } + set { this._inferenceEventSummaries = value; } + } + + // Check to see if InferenceEventSummaries property is set + internal bool IsSetInferenceEventSummaries() + { + return this._inferenceEventSummaries != null && this._inferenceEventSummaries.Count > 0; + } + + /// + /// Gets and sets the property NextToken. + /// + /// An opaque pagination token indicating where to continue the listing of inference executions. + /// + /// + /// + [AWSProperty(Max=8192)] + public string NextToken + { + get { return this._nextToken; } + set { this._nextToken = value; } + } + + // Check to see if NextToken property is set + internal bool IsSetNextToken() + { + return this._nextToken != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/IListInferenceEventsPaginator.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/IListInferenceEventsPaginator.cs new file mode 100644 index 000000000000..7ab865d57361 --- /dev/null +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/IListInferenceEventsPaginator.cs @@ -0,0 +1,33 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the lookoutequipment-2020-12-15.normal.json service model. + */ +using Amazon.Runtime; + +namespace Amazon.LookoutEquipment.Model +{ + /// + /// Paginator for the ListInferenceEvents operation + /// + public interface IListInferenceEventsPaginator + { + /// + /// Enumerable containing all full responses for the operation + /// + IPaginatedEnumerable Responses { get; } + } +} \ No newline at end of file diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/ILookoutEquipmentPaginatorFactory.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/ILookoutEquipmentPaginatorFactory.cs index dcf2a1a14438..1424127c0dbf 100644 --- a/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/ILookoutEquipmentPaginatorFactory.cs +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/ILookoutEquipmentPaginatorFactory.cs @@ -35,6 +35,11 @@ public interface ILookoutEquipmentPaginatorFactory /// IListDatasetsPaginator ListDatasets(ListDatasetsRequest request); + /// + /// Paginator for ListInferenceEvents operation + /// + IListInferenceEventsPaginator ListInferenceEvents(ListInferenceEventsRequest request); + /// /// Paginator for ListInferenceExecutions operation /// diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/ListInferenceEventsPaginator.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/ListInferenceEventsPaginator.cs new file mode 100644 index 000000000000..be8e13b8b617 --- /dev/null +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/ListInferenceEventsPaginator.cs @@ -0,0 +1,91 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the lookoutequipment-2020-12-15.normal.json service model. + */ + +using System; +using System.Collections.Generic; +using System.Text; +using System.Collections; +using System.Threading; +using System.Threading.Tasks; +using Amazon.Runtime; + +namespace Amazon.LookoutEquipment.Model +{ + /// + /// Base class for ListInferenceEvents paginators. + /// + internal sealed partial class ListInferenceEventsPaginator : IPaginator, IListInferenceEventsPaginator + { + private readonly IAmazonLookoutEquipment _client; + private readonly ListInferenceEventsRequest _request; + private int _isPaginatorInUse = 0; + + /// + /// Enumerable containing all full responses for the operation + /// + public IPaginatedEnumerable Responses => new PaginatedResponse(this); + + internal ListInferenceEventsPaginator(IAmazonLookoutEquipment client, ListInferenceEventsRequest request) + { + this._client = client; + this._request = request; + } +#if BCL + IEnumerable IPaginator.Paginate() + { + if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0) + { + throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance."); + } + PaginatorUtils.SetUserAgentAdditionOnRequest(_request); + var nextToken = _request.NextToken; + ListInferenceEventsResponse response; + do + { + _request.NextToken = nextToken; + response = _client.ListInferenceEvents(_request); + nextToken = response.NextToken; + yield return response; + } + while (!string.IsNullOrEmpty(nextToken)); + } +#endif +#if AWS_ASYNC_ENUMERABLES_API + async IAsyncEnumerable IPaginator.PaginateAsync(CancellationToken cancellationToken = default) + { + if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0) + { + throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance."); + } + PaginatorUtils.SetUserAgentAdditionOnRequest(_request); + var nextToken = _request.NextToken; + ListInferenceEventsResponse response; + do + { + _request.NextToken = nextToken; + response = await _client.ListInferenceEventsAsync(_request, cancellationToken).ConfigureAwait(false); + nextToken = response.NextToken; + cancellationToken.ThrowIfCancellationRequested(); + yield return response; + } + while (!string.IsNullOrEmpty(nextToken)); + } +#endif + } +} \ No newline at end of file diff --git a/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/LookoutEquipmentPaginatorFactory.cs b/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/LookoutEquipmentPaginatorFactory.cs index 61a224c450c0..88491a194fa5 100644 --- a/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/LookoutEquipmentPaginatorFactory.cs +++ b/sdk/src/Services/LookoutEquipment/Generated/Model/_bcl45+netstandard/LookoutEquipmentPaginatorFactory.cs @@ -51,6 +51,14 @@ public IListDatasetsPaginator ListDatasets(ListDatasetsRequest request) return new ListDatasetsPaginator(this.client, request); } + /// + /// Paginator for ListInferenceEvents operation + /// + public IListInferenceEventsPaginator ListInferenceEvents(ListInferenceEventsRequest request) + { + return new ListInferenceEventsPaginator(this.client, request); + } + /// /// Paginator for ListInferenceExecutions operation /// diff --git a/sdk/src/Services/LookoutEquipment/Generated/_bcl35/AmazonLookoutEquipmentClient.cs b/sdk/src/Services/LookoutEquipment/Generated/_bcl35/AmazonLookoutEquipmentClient.cs index 4d85632058d3..31d70615bf55 100644 --- a/sdk/src/Services/LookoutEquipment/Generated/_bcl35/AmazonLookoutEquipmentClient.cs +++ b/sdk/src/Services/LookoutEquipment/Generated/_bcl35/AmazonLookoutEquipmentClient.cs @@ -1156,6 +1156,77 @@ public virtual ListDatasetsResponse EndListDatasets(IAsyncResult asyncResult) #endregion + #region ListInferenceEvents + + /// + /// Lists all inference events that have been found for the specified inference scheduler. + /// + /// Container for the necessary parameters to execute the ListInferenceEvents service method. + /// + /// The response from the ListInferenceEvents service method, as returned by LookoutEquipment. + /// + /// The request could not be completed because you do not have access to the resource. + /// + /// + /// Processing of the request has failed because of an unknown error, exception or failure. + /// + /// + /// The resource requested could not be found. Verify the resource ID and retry your + /// request. + /// + /// + /// The request was denied due to request throttling. + /// + /// + /// The input fails to satisfy constraints specified by Amazon Lookout for Equipment + /// or a related AWS service that's being utilized. + /// + /// REST API Reference for ListInferenceEvents Operation + public virtual ListInferenceEventsResponse ListInferenceEvents(ListInferenceEventsRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = ListInferenceEventsRequestMarshaller.Instance; + options.ResponseUnmarshaller = ListInferenceEventsResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + /// + /// Initiates the asynchronous execution of the ListInferenceEvents operation. + /// + /// + /// Container for the necessary parameters to execute the ListInferenceEvents operation on AmazonLookoutEquipmentClient. + /// An AsyncCallback delegate that is invoked when the operation completes. + /// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback + /// procedure using the AsyncState property. + /// + /// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListInferenceEvents + /// operation. + /// REST API Reference for ListInferenceEvents Operation + public virtual IAsyncResult BeginListInferenceEvents(ListInferenceEventsRequest request, AsyncCallback callback, object state) + { + var options = new InvokeOptions(); + options.RequestMarshaller = ListInferenceEventsRequestMarshaller.Instance; + options.ResponseUnmarshaller = ListInferenceEventsResponseUnmarshaller.Instance; + + return BeginInvoke(request, options, callback, state); + } + + /// + /// Finishes the asynchronous execution of the ListInferenceEvents operation. + /// + /// + /// The IAsyncResult returned by the call to BeginListInferenceEvents. + /// + /// Returns a ListInferenceEventsResult from LookoutEquipment. + /// REST API Reference for ListInferenceEvents Operation + public virtual ListInferenceEventsResponse EndListInferenceEvents(IAsyncResult asyncResult) + { + return EndInvoke(asyncResult); + } + + #endregion + #region ListInferenceExecutions /// diff --git a/sdk/src/Services/LookoutEquipment/Generated/_bcl35/IAmazonLookoutEquipment.cs b/sdk/src/Services/LookoutEquipment/Generated/_bcl35/IAmazonLookoutEquipment.cs index a2a5163b4299..a30db8f40eac 100644 --- a/sdk/src/Services/LookoutEquipment/Generated/_bcl35/IAmazonLookoutEquipment.cs +++ b/sdk/src/Services/LookoutEquipment/Generated/_bcl35/IAmazonLookoutEquipment.cs @@ -777,6 +777,63 @@ public partial interface IAmazonLookoutEquipment : IAmazonService, IDisposable #endregion + #region ListInferenceEvents + + + /// + /// Lists all inference events that have been found for the specified inference scheduler. + /// + /// Container for the necessary parameters to execute the ListInferenceEvents service method. + /// + /// The response from the ListInferenceEvents service method, as returned by LookoutEquipment. + /// + /// The request could not be completed because you do not have access to the resource. + /// + /// + /// Processing of the request has failed because of an unknown error, exception or failure. + /// + /// + /// The resource requested could not be found. Verify the resource ID and retry your + /// request. + /// + /// + /// The request was denied due to request throttling. + /// + /// + /// The input fails to satisfy constraints specified by Amazon Lookout for Equipment + /// or a related AWS service that's being utilized. + /// + /// REST API Reference for ListInferenceEvents Operation + ListInferenceEventsResponse ListInferenceEvents(ListInferenceEventsRequest request); + + /// + /// Initiates the asynchronous execution of the ListInferenceEvents operation. + /// + /// + /// Container for the necessary parameters to execute the ListInferenceEvents operation on AmazonLookoutEquipmentClient. + /// An AsyncCallback delegate that is invoked when the operation completes. + /// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback + /// procedure using the AsyncState property. + /// + /// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListInferenceEvents + /// operation. + /// REST API Reference for ListInferenceEvents Operation + IAsyncResult BeginListInferenceEvents(ListInferenceEventsRequest request, AsyncCallback callback, object state); + + + + /// + /// Finishes the asynchronous execution of the ListInferenceEvents operation. + /// + /// + /// The IAsyncResult returned by the call to BeginListInferenceEvents. + /// + /// Returns a ListInferenceEventsResult from LookoutEquipment. + /// REST API Reference for ListInferenceEvents Operation + ListInferenceEventsResponse EndListInferenceEvents(IAsyncResult asyncResult); + + #endregion + #region ListInferenceExecutions diff --git a/sdk/src/Services/LookoutEquipment/Generated/_bcl45/AmazonLookoutEquipmentClient.cs b/sdk/src/Services/LookoutEquipment/Generated/_bcl45/AmazonLookoutEquipmentClient.cs index 9e514427a9ce..6f1ae3ce3aa0 100644 --- a/sdk/src/Services/LookoutEquipment/Generated/_bcl45/AmazonLookoutEquipmentClient.cs +++ b/sdk/src/Services/LookoutEquipment/Generated/_bcl45/AmazonLookoutEquipmentClient.cs @@ -1251,6 +1251,81 @@ public virtual ListDatasetsResponse ListDatasets(ListDatasetsRequest request) #endregion + #region ListInferenceEvents + + + /// + /// Lists all inference events that have been found for the specified inference scheduler. + /// + /// Container for the necessary parameters to execute the ListInferenceEvents service method. + /// + /// The response from the ListInferenceEvents service method, as returned by LookoutEquipment. + /// + /// The request could not be completed because you do not have access to the resource. + /// + /// + /// Processing of the request has failed because of an unknown error, exception or failure. + /// + /// + /// The resource requested could not be found. Verify the resource ID and retry your + /// request. + /// + /// + /// The request was denied due to request throttling. + /// + /// + /// The input fails to satisfy constraints specified by Amazon Lookout for Equipment + /// or a related AWS service that's being utilized. + /// + /// REST API Reference for ListInferenceEvents Operation + public virtual ListInferenceEventsResponse ListInferenceEvents(ListInferenceEventsRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = ListInferenceEventsRequestMarshaller.Instance; + options.ResponseUnmarshaller = ListInferenceEventsResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + /// + /// Lists all inference events that have been found for the specified inference scheduler. + /// + /// Container for the necessary parameters to execute the ListInferenceEvents service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the ListInferenceEvents service method, as returned by LookoutEquipment. + /// + /// The request could not be completed because you do not have access to the resource. + /// + /// + /// Processing of the request has failed because of an unknown error, exception or failure. + /// + /// + /// The resource requested could not be found. Verify the resource ID and retry your + /// request. + /// + /// + /// The request was denied due to request throttling. + /// + /// + /// The input fails to satisfy constraints specified by Amazon Lookout for Equipment + /// or a related AWS service that's being utilized. + /// + /// REST API Reference for ListInferenceEvents Operation + public virtual Task ListInferenceEventsAsync(ListInferenceEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = ListInferenceEventsRequestMarshaller.Instance; + options.ResponseUnmarshaller = ListInferenceEventsResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + #region ListInferenceExecutions diff --git a/sdk/src/Services/LookoutEquipment/Generated/_bcl45/IAmazonLookoutEquipment.cs b/sdk/src/Services/LookoutEquipment/Generated/_bcl45/IAmazonLookoutEquipment.cs index eb5147a61fa7..609d7093e2bd 100644 --- a/sdk/src/Services/LookoutEquipment/Generated/_bcl45/IAmazonLookoutEquipment.cs +++ b/sdk/src/Services/LookoutEquipment/Generated/_bcl45/IAmazonLookoutEquipment.cs @@ -883,6 +883,68 @@ public partial interface IAmazonLookoutEquipment : IAmazonService, IDisposable #endregion + #region ListInferenceEvents + + + /// + /// Lists all inference events that have been found for the specified inference scheduler. + /// + /// Container for the necessary parameters to execute the ListInferenceEvents service method. + /// + /// The response from the ListInferenceEvents service method, as returned by LookoutEquipment. + /// + /// The request could not be completed because you do not have access to the resource. + /// + /// + /// Processing of the request has failed because of an unknown error, exception or failure. + /// + /// + /// The resource requested could not be found. Verify the resource ID and retry your + /// request. + /// + /// + /// The request was denied due to request throttling. + /// + /// + /// The input fails to satisfy constraints specified by Amazon Lookout for Equipment + /// or a related AWS service that's being utilized. + /// + /// REST API Reference for ListInferenceEvents Operation + ListInferenceEventsResponse ListInferenceEvents(ListInferenceEventsRequest request); + + + + /// + /// Lists all inference events that have been found for the specified inference scheduler. + /// + /// Container for the necessary parameters to execute the ListInferenceEvents service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the ListInferenceEvents service method, as returned by LookoutEquipment. + /// + /// The request could not be completed because you do not have access to the resource. + /// + /// + /// Processing of the request has failed because of an unknown error, exception or failure. + /// + /// + /// The resource requested could not be found. Verify the resource ID and retry your + /// request. + /// + /// + /// The request was denied due to request throttling. + /// + /// + /// The input fails to satisfy constraints specified by Amazon Lookout for Equipment + /// or a related AWS service that's being utilized. + /// + /// REST API Reference for ListInferenceEvents Operation + Task ListInferenceEventsAsync(ListInferenceEventsRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + #region ListInferenceExecutions diff --git a/sdk/src/Services/LookoutEquipment/Generated/_netstandard/AmazonLookoutEquipmentClient.cs b/sdk/src/Services/LookoutEquipment/Generated/_netstandard/AmazonLookoutEquipmentClient.cs index 685b81f40dee..f550fdcef410 100644 --- a/sdk/src/Services/LookoutEquipment/Generated/_netstandard/AmazonLookoutEquipmentClient.cs +++ b/sdk/src/Services/LookoutEquipment/Generated/_netstandard/AmazonLookoutEquipmentClient.cs @@ -919,6 +919,57 @@ internal virtual ListDatasetsResponse ListDatasets(ListDatasetsRequest request) #endregion + #region ListInferenceEvents + + internal virtual ListInferenceEventsResponse ListInferenceEvents(ListInferenceEventsRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = ListInferenceEventsRequestMarshaller.Instance; + options.ResponseUnmarshaller = ListInferenceEventsResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + + /// + /// Lists all inference events that have been found for the specified inference scheduler. + /// + /// Container for the necessary parameters to execute the ListInferenceEvents service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the ListInferenceEvents service method, as returned by LookoutEquipment. + /// + /// The request could not be completed because you do not have access to the resource. + /// + /// + /// Processing of the request has failed because of an unknown error, exception or failure. + /// + /// + /// The resource requested could not be found. Verify the resource ID and retry your + /// request. + /// + /// + /// The request was denied due to request throttling. + /// + /// + /// The input fails to satisfy constraints specified by Amazon Lookout for Equipment + /// or a related AWS service that's being utilized. + /// + /// REST API Reference for ListInferenceEvents Operation + public virtual Task ListInferenceEventsAsync(ListInferenceEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = ListInferenceEventsRequestMarshaller.Instance; + options.ResponseUnmarshaller = ListInferenceEventsResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + #region ListInferenceExecutions internal virtual ListInferenceExecutionsResponse ListInferenceExecutions(ListInferenceExecutionsRequest request) diff --git a/sdk/src/Services/LookoutEquipment/Generated/_netstandard/IAmazonLookoutEquipment.cs b/sdk/src/Services/LookoutEquipment/Generated/_netstandard/IAmazonLookoutEquipment.cs index e4c5e3b793a7..d00eabae8f4b 100644 --- a/sdk/src/Services/LookoutEquipment/Generated/_netstandard/IAmazonLookoutEquipment.cs +++ b/sdk/src/Services/LookoutEquipment/Generated/_netstandard/IAmazonLookoutEquipment.cs @@ -511,6 +511,41 @@ public partial interface IAmazonLookoutEquipment : IAmazonService, IDisposable #endregion + #region ListInferenceEvents + + + + /// + /// Lists all inference events that have been found for the specified inference scheduler. + /// + /// Container for the necessary parameters to execute the ListInferenceEvents service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the ListInferenceEvents service method, as returned by LookoutEquipment. + /// + /// The request could not be completed because you do not have access to the resource. + /// + /// + /// Processing of the request has failed because of an unknown error, exception or failure. + /// + /// + /// The resource requested could not be found. Verify the resource ID and retry your + /// request. + /// + /// + /// The request was denied due to request throttling. + /// + /// + /// The input fails to satisfy constraints specified by Amazon Lookout for Equipment + /// or a related AWS service that's being utilized. + /// + /// REST API Reference for ListInferenceEvents Operation + Task ListInferenceEventsAsync(ListInferenceEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + #region ListInferenceExecutions diff --git a/sdk/test/Services/LookoutEquipment/UnitTests/Generated/Marshalling/LookoutEquipmentMarshallingTests.cs b/sdk/test/Services/LookoutEquipment/UnitTests/Generated/Marshalling/LookoutEquipmentMarshallingTests.cs index a449684c6ed8..f5eea7fad697 100644 --- a/sdk/test/Services/LookoutEquipment/UnitTests/Generated/Marshalling/LookoutEquipmentMarshallingTests.cs +++ b/sdk/test/Services/LookoutEquipment/UnitTests/Generated/Marshalling/LookoutEquipmentMarshallingTests.cs @@ -2376,6 +2376,193 @@ public void ListDatasets_ValidationExceptionMarshallTest() InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } + [TestMethod] + [TestCategory("UnitTest")] + [TestCategory("Json")] + [TestCategory("LookoutEquipment")] + public void ListInferenceEventsMarshallTest() + { + var request = InstantiateClassGenerator.Execute(); + var marshaller = new ListInferenceEventsRequestMarshaller(); + + var internalRequest = marshaller.Marshall(request); + var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); + Comparer.CompareObjectToJson(request,jsonRequest); + + var webResponse = new WebResponseData + { + Headers = { + {"x-amzn-RequestId", Guid.NewGuid().ToString()}, + {"x-amz-crc32","0"} + } + }; + var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("ListInferenceEvents").ResponseStructure).Execute(); + webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); + UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); + var response = ListInferenceEventsResponseUnmarshaller.Instance.Unmarshall(context) as ListInferenceEventsResponse; + InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); + } + + [TestMethod] + [TestCategory("UnitTest")] + [TestCategory("Json")] + [TestCategory("LookoutEquipment")] + public void ListInferenceEvents_AccessDeniedExceptionMarshallTest() + { + var operation = service_model.FindOperation("ListInferenceEvents"); + + var request = InstantiateClassGenerator.Execute(); + var marshaller = new ListInferenceEventsRequestMarshaller(); + var internalRequest = marshaller.Marshall(request); + var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); + + Comparer.CompareObjectToJson(request,jsonRequest); + + var exception = operation.Exceptions.First(e => e.Name.Equals("AccessDeniedException")); + var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute(); + var webResponse = new WebResponseData + { + Headers = { + {"x-amzn-RequestId", Guid.NewGuid().ToString()}, + {"x-amz-crc32","0"}, + {"x-amzn-ErrorType","AccessDeniedException"}, + {"Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()} + } + }; + var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true); + var response = ListInferenceEventsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); + + InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); + } + + [TestMethod] + [TestCategory("UnitTest")] + [TestCategory("Json")] + [TestCategory("LookoutEquipment")] + public void ListInferenceEvents_InternalServerExceptionMarshallTest() + { + var operation = service_model.FindOperation("ListInferenceEvents"); + + var request = InstantiateClassGenerator.Execute(); + var marshaller = new ListInferenceEventsRequestMarshaller(); + var internalRequest = marshaller.Marshall(request); + var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); + + Comparer.CompareObjectToJson(request,jsonRequest); + + var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); + var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute(); + var webResponse = new WebResponseData + { + Headers = { + {"x-amzn-RequestId", Guid.NewGuid().ToString()}, + {"x-amz-crc32","0"}, + {"x-amzn-ErrorType","InternalServerException"}, + {"Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()} + } + }; + var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true); + var response = ListInferenceEventsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); + + InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); + } + + [TestMethod] + [TestCategory("UnitTest")] + [TestCategory("Json")] + [TestCategory("LookoutEquipment")] + public void ListInferenceEvents_ResourceNotFoundExceptionMarshallTest() + { + var operation = service_model.FindOperation("ListInferenceEvents"); + + var request = InstantiateClassGenerator.Execute(); + var marshaller = new ListInferenceEventsRequestMarshaller(); + var internalRequest = marshaller.Marshall(request); + var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); + + Comparer.CompareObjectToJson(request,jsonRequest); + + var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); + var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute(); + var webResponse = new WebResponseData + { + Headers = { + {"x-amzn-RequestId", Guid.NewGuid().ToString()}, + {"x-amz-crc32","0"}, + {"x-amzn-ErrorType","ResourceNotFoundException"}, + {"Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()} + } + }; + var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true); + var response = ListInferenceEventsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); + + InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); + } + + [TestMethod] + [TestCategory("UnitTest")] + [TestCategory("Json")] + [TestCategory("LookoutEquipment")] + public void ListInferenceEvents_ThrottlingExceptionMarshallTest() + { + var operation = service_model.FindOperation("ListInferenceEvents"); + + var request = InstantiateClassGenerator.Execute(); + var marshaller = new ListInferenceEventsRequestMarshaller(); + var internalRequest = marshaller.Marshall(request); + var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); + + Comparer.CompareObjectToJson(request,jsonRequest); + + var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); + var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute(); + var webResponse = new WebResponseData + { + Headers = { + {"x-amzn-RequestId", Guid.NewGuid().ToString()}, + {"x-amz-crc32","0"}, + {"x-amzn-ErrorType","ThrottlingException"}, + {"Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()} + } + }; + var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true); + var response = ListInferenceEventsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); + + InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); + } + + [TestMethod] + [TestCategory("UnitTest")] + [TestCategory("Json")] + [TestCategory("LookoutEquipment")] + public void ListInferenceEvents_ValidationExceptionMarshallTest() + { + var operation = service_model.FindOperation("ListInferenceEvents"); + + var request = InstantiateClassGenerator.Execute(); + var marshaller = new ListInferenceEventsRequestMarshaller(); + var internalRequest = marshaller.Marshall(request); + var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); + + Comparer.CompareObjectToJson(request,jsonRequest); + + var exception = operation.Exceptions.First(e => e.Name.Equals("ValidationException")); + var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute(); + var webResponse = new WebResponseData + { + Headers = { + {"x-amzn-RequestId", Guid.NewGuid().ToString()}, + {"x-amz-crc32","0"}, + {"x-amzn-ErrorType","ValidationException"}, + {"Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()} + } + }; + var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true); + var response = ListInferenceEventsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); + + InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); + } + [TestMethod] [TestCategory("UnitTest")] [TestCategory("Json")]