-
Notifications
You must be signed in to change notification settings - Fork 864
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This release adds a field, AthenaError, to the GetQueryExecution resp…
…onse object when a query fails.
- Loading branch information
1 parent
03369b0
commit ffd636d
Showing
12 changed files
with
262 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* 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 athena-2017-05-18.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.Athena.Model | ||
{ | ||
/// <summary> | ||
/// Provides information about an Athena query error. The <code>AthenaError</code> feature | ||
/// provides standardized error information to help you understand failed queries and | ||
/// take steps after a query failure occurs. <code>AthenaError</code> includes an <code>ErrorCategory</code> | ||
/// field that specifies whether the cause of the failed query is due to system error, | ||
/// user error, or unknown error. | ||
/// </summary> | ||
public partial class AthenaError | ||
{ | ||
private int? _errorCategory; | ||
|
||
/// <summary> | ||
/// Gets and sets the property ErrorCategory. | ||
/// <para> | ||
/// An integer value that specifies the category of a query failure error. The following | ||
/// list shows the category for each integer value. | ||
/// </para> | ||
/// | ||
/// <para> | ||
/// <b>1</b> - System | ||
/// </para> | ||
/// | ||
/// <para> | ||
/// <b>2</b> - User | ||
/// </para> | ||
/// | ||
/// <para> | ||
/// <b>3</b> - Unknown | ||
/// </para> | ||
/// </summary> | ||
[AWSProperty(Min=1, Max=3)] | ||
public int ErrorCategory | ||
{ | ||
get { return this._errorCategory.GetValueOrDefault(); } | ||
set { this._errorCategory = value; } | ||
} | ||
|
||
// Check to see if ErrorCategory property is set | ||
internal bool IsSetErrorCategory() | ||
{ | ||
return this._errorCategory.HasValue; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
...rvices/Athena/Generated/Model/Internal/MarshallTransformations/AthenaErrorUnmarshaller.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/* | ||
* 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 athena-2017-05-18.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.Athena.Model; | ||
using Amazon.Runtime; | ||
using Amazon.Runtime.Internal; | ||
using Amazon.Runtime.Internal.Transform; | ||
using Amazon.Runtime.Internal.Util; | ||
using ThirdParty.Json.LitJson; | ||
|
||
namespace Amazon.Athena.Model.Internal.MarshallTransformations | ||
{ | ||
/// <summary> | ||
/// Response Unmarshaller for AthenaError Object | ||
/// </summary> | ||
public class AthenaErrorUnmarshaller : IUnmarshaller<AthenaError, XmlUnmarshallerContext>, IUnmarshaller<AthenaError, JsonUnmarshallerContext> | ||
{ | ||
/// <summary> | ||
/// Unmarshaller the response from the service to the response class. | ||
/// </summary> | ||
/// <param name="context"></param> | ||
/// <returns></returns> | ||
AthenaError IUnmarshaller<AthenaError, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
/// <summary> | ||
/// Unmarshaller the response from the service to the response class. | ||
/// </summary> | ||
/// <param name="context"></param> | ||
/// <returns></returns> | ||
public AthenaError Unmarshall(JsonUnmarshallerContext context) | ||
{ | ||
context.Read(); | ||
if (context.CurrentTokenType == JsonToken.Null) | ||
return null; | ||
|
||
AthenaError unmarshalledObject = new AthenaError(); | ||
|
||
int targetDepth = context.CurrentDepth; | ||
while (context.ReadAtDepth(targetDepth)) | ||
{ | ||
if (context.TestExpression("ErrorCategory", targetDepth)) | ||
{ | ||
var unmarshaller = IntUnmarshaller.Instance; | ||
unmarshalledObject.ErrorCategory = unmarshaller.Unmarshall(context); | ||
continue; | ||
} | ||
} | ||
|
||
return unmarshalledObject; | ||
} | ||
|
||
|
||
private static AthenaErrorUnmarshaller _instance = new AthenaErrorUnmarshaller(); | ||
|
||
/// <summary> | ||
/// Gets the singleton. | ||
/// </summary> | ||
public static AthenaErrorUnmarshaller Instance | ||
{ | ||
get | ||
{ | ||
return _instance; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.