repo_name
stringlengths 1
52
| repo_creator
stringclasses 6
values | programming_language
stringclasses 4
values | code
stringlengths 0
9.68M
| num_lines
int64 1
234k
|
---|---|---|---|---|
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// This is the response object from the UpdateNotebookMetadata operation.
/// </summary>
public partial class UpdateNotebookMetadataResponse : AmazonWebServiceResponse
{
}
}
| 38 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// Container for the parameters to the UpdateNotebook operation.
/// Updates the contents of a Spark notebook.
/// </summary>
public partial class UpdateNotebookRequest : AmazonAthenaRequest
{
private string _clientRequestToken;
private string _notebookId;
private string _payload;
private string _sessionId;
private NotebookType _type;
/// <summary>
/// Gets and sets the property ClientRequestToken.
/// <para>
/// A unique case-sensitive string used to ensure the request to create the notebook is
/// idempotent (executes only once).
/// </para>
/// <important>
/// <para>
/// This token is listed as not required because Amazon Web Services SDKs (for example
/// the Amazon Web Services SDK for Java) auto-generate the token for you. If you are
/// not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide
/// this token or the action will fail.
/// </para>
/// </important>
/// </summary>
[AWSProperty(Min=1, Max=36)]
public string ClientRequestToken
{
get { return this._clientRequestToken; }
set { this._clientRequestToken = value; }
}
// Check to see if ClientRequestToken property is set
internal bool IsSetClientRequestToken()
{
return this._clientRequestToken != null;
}
/// <summary>
/// Gets and sets the property NotebookId.
/// <para>
/// The ID of the notebook to update.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=36)]
public string NotebookId
{
get { return this._notebookId; }
set { this._notebookId = value; }
}
// Check to see if NotebookId property is set
internal bool IsSetNotebookId()
{
return this._notebookId != null;
}
/// <summary>
/// Gets and sets the property Payload.
/// <para>
/// The updated content for the notebook.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=10485760)]
public string Payload
{
get { return this._payload; }
set { this._payload = value; }
}
// Check to see if Payload property is set
internal bool IsSetPayload()
{
return this._payload != null;
}
/// <summary>
/// Gets and sets the property SessionId.
/// <para>
/// The active notebook session ID. Required if the notebook has an active session.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
public string SessionId
{
get { return this._sessionId; }
set { this._sessionId = value; }
}
// Check to see if SessionId property is set
internal bool IsSetSessionId()
{
return this._sessionId != null;
}
/// <summary>
/// Gets and sets the property Type.
/// <para>
/// The notebook content type. Currently, the only valid type is <code>IPYNB</code>.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public NotebookType Type
{
get { return this._type; }
set { this._type = value; }
}
// Check to see if Type property is set
internal bool IsSetType()
{
return this._type != null;
}
}
}
| 148 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// This is the response object from the UpdateNotebook operation.
/// </summary>
public partial class UpdateNotebookResponse : AmazonWebServiceResponse
{
}
}
| 38 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// Container for the parameters to the UpdatePreparedStatement operation.
/// Updates a prepared statement.
/// </summary>
public partial class UpdatePreparedStatementRequest : AmazonAthenaRequest
{
private string _description;
private string _queryStatement;
private string _statementName;
private string _workGroup;
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// The description of the prepared statement.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1024)]
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
/// <summary>
/// Gets and sets the property QueryStatement.
/// <para>
/// The query string for the prepared statement.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=262144)]
public string QueryStatement
{
get { return this._queryStatement; }
set { this._queryStatement = value; }
}
// Check to see if QueryStatement property is set
internal bool IsSetQueryStatement()
{
return this._queryStatement != null;
}
/// <summary>
/// Gets and sets the property StatementName.
/// <para>
/// The name of the prepared statement.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=256)]
public string StatementName
{
get { return this._statementName; }
set { this._statementName = value; }
}
// Check to see if StatementName property is set
internal bool IsSetStatementName()
{
return this._statementName != null;
}
/// <summary>
/// Gets and sets the property WorkGroup.
/// <para>
/// The workgroup for the prepared statement.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string WorkGroup
{
get { return this._workGroup; }
set { this._workGroup = value; }
}
// Check to see if WorkGroup property is set
internal bool IsSetWorkGroup()
{
return this._workGroup != null;
}
}
}
| 119 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// This is the response object from the UpdatePreparedStatement operation.
/// </summary>
public partial class UpdatePreparedStatementResponse : AmazonWebServiceResponse
{
}
}
| 38 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// Container for the parameters to the UpdateWorkGroup operation.
/// Updates the workgroup with the specified name. The workgroup's name cannot be changed.
/// Only <code>ConfigurationUpdates</code> can be specified.
/// </summary>
public partial class UpdateWorkGroupRequest : AmazonAthenaRequest
{
private WorkGroupConfigurationUpdates _configurationUpdates;
private string _description;
private WorkGroupState _state;
private string _workGroup;
/// <summary>
/// Gets and sets the property ConfigurationUpdates.
/// <para>
/// Contains configuration updates for an Athena SQL workgroup.
/// </para>
/// </summary>
public WorkGroupConfigurationUpdates ConfigurationUpdates
{
get { return this._configurationUpdates; }
set { this._configurationUpdates = value; }
}
// Check to see if ConfigurationUpdates property is set
internal bool IsSetConfigurationUpdates()
{
return this._configurationUpdates != null;
}
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// The workgroup description.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
/// <summary>
/// Gets and sets the property State.
/// <para>
/// The workgroup state that will be updated for the given workgroup.
/// </para>
/// </summary>
public WorkGroupState State
{
get { return this._state; }
set { this._state = value; }
}
// Check to see if State property is set
internal bool IsSetState()
{
return this._state != null;
}
/// <summary>
/// Gets and sets the property WorkGroup.
/// <para>
/// The specified workgroup that will be updated.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string WorkGroup
{
get { return this._workGroup; }
set { this._workGroup = value; }
}
// Check to see if WorkGroup property is set
internal bool IsSetWorkGroup()
{
return this._workGroup != null;
}
}
}
| 118 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// This is the response object from the UpdateWorkGroup operation.
/// </summary>
public partial class UpdateWorkGroupResponse : AmazonWebServiceResponse
{
}
}
| 38 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// A workgroup, which contains a name, description, creation time, state, and other configuration,
/// listed under <a>WorkGroup$Configuration</a>. Each workgroup enables you to isolate
/// queries for you or your group of users from other queries in the same account, to
/// configure the query results location and the encryption configuration (known as workgroup
/// settings), to enable sending query metrics to Amazon CloudWatch, and to establish
/// per-query data usage control limits for all queries in a workgroup. The workgroup
/// settings override is specified in <code>EnforceWorkGroupConfiguration</code> (true/false)
/// in the <code>WorkGroupConfiguration</code>. See <a>WorkGroupConfiguration$EnforceWorkGroupConfiguration</a>.
/// </summary>
public partial class WorkGroup
{
private WorkGroupConfiguration _configuration;
private DateTime? _creationTime;
private string _description;
private string _name;
private WorkGroupState _state;
/// <summary>
/// Gets and sets the property Configuration.
/// <para>
/// The configuration of the workgroup, which includes the location in Amazon S3 where
/// query and calculation results are stored, the encryption configuration, if any, used
/// for query and calculation results; whether the Amazon CloudWatch Metrics are enabled
/// for the workgroup; whether workgroup settings override client-side settings; and the
/// data usage limits for the amount of data scanned per query or per workgroup. The workgroup
/// settings override is specified in <code>EnforceWorkGroupConfiguration</code> (true/false)
/// in the <code>WorkGroupConfiguration</code>. See <a>WorkGroupConfiguration$EnforceWorkGroupConfiguration</a>.
/// </para>
/// </summary>
public WorkGroupConfiguration Configuration
{
get { return this._configuration; }
set { this._configuration = value; }
}
// Check to see if Configuration property is set
internal bool IsSetConfiguration()
{
return this._configuration != null;
}
/// <summary>
/// Gets and sets the property CreationTime.
/// <para>
/// The date and time the workgroup was created.
/// </para>
/// </summary>
public DateTime CreationTime
{
get { return this._creationTime.GetValueOrDefault(); }
set { this._creationTime = value; }
}
// Check to see if CreationTime property is set
internal bool IsSetCreationTime()
{
return this._creationTime.HasValue;
}
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// The workgroup description.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
/// <summary>
/// Gets and sets the property Name.
/// <para>
/// The workgroup name.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
/// <summary>
/// Gets and sets the property State.
/// <para>
/// The state of the workgroup: ENABLED or DISABLED.
/// </para>
/// </summary>
public WorkGroupState State
{
get { return this._state; }
set { this._state = value; }
}
// Check to see if State property is set
internal bool IsSetState()
{
return this._state != null;
}
}
}
| 148 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// The configuration of the workgroup, which includes the location in Amazon S3 where
/// query and calculation results are stored, the encryption option, if any, used for
/// query and calculation results, whether the Amazon CloudWatch Metrics are enabled for
/// the workgroup and whether workgroup settings override query settings, and the data
/// usage limits for the amount of data scanned per query or per workgroup. The workgroup
/// settings override is specified in <code>EnforceWorkGroupConfiguration</code> (true/false)
/// in the <code>WorkGroupConfiguration</code>. See <a>WorkGroupConfiguration$EnforceWorkGroupConfiguration</a>.
/// </summary>
public partial class WorkGroupConfiguration
{
private string _additionalConfiguration;
private long? _bytesScannedCutoffPerQuery;
private CustomerContentEncryptionConfiguration _customerContentEncryptionConfiguration;
private bool? _enableMinimumEncryptionConfiguration;
private bool? _enforceWorkGroupConfiguration;
private EngineVersion _engineVersion;
private string _executionRole;
private bool? _publishCloudWatchMetricsEnabled;
private bool? _requesterPaysEnabled;
private ResultConfiguration _resultConfiguration;
/// <summary>
/// Gets and sets the property AdditionalConfiguration.
/// <para>
/// Specifies a user defined JSON string that is passed to the notebook engine.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=128)]
public string AdditionalConfiguration
{
get { return this._additionalConfiguration; }
set { this._additionalConfiguration = value; }
}
// Check to see if AdditionalConfiguration property is set
internal bool IsSetAdditionalConfiguration()
{
return this._additionalConfiguration != null;
}
/// <summary>
/// Gets and sets the property BytesScannedCutoffPerQuery.
/// <para>
/// The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup
/// is allowed to scan.
/// </para>
/// </summary>
[AWSProperty(Min=10000000)]
public long BytesScannedCutoffPerQuery
{
get { return this._bytesScannedCutoffPerQuery.GetValueOrDefault(); }
set { this._bytesScannedCutoffPerQuery = value; }
}
// Check to see if BytesScannedCutoffPerQuery property is set
internal bool IsSetBytesScannedCutoffPerQuery()
{
return this._bytesScannedCutoffPerQuery.HasValue;
}
/// <summary>
/// Gets and sets the property CustomerContentEncryptionConfiguration.
/// <para>
/// Specifies the KMS key that is used to encrypt the user's data stores in Athena. This
/// setting does not apply to Athena SQL workgroups.
/// </para>
/// </summary>
public CustomerContentEncryptionConfiguration CustomerContentEncryptionConfiguration
{
get { return this._customerContentEncryptionConfiguration; }
set { this._customerContentEncryptionConfiguration = value; }
}
// Check to see if CustomerContentEncryptionConfiguration property is set
internal bool IsSetCustomerContentEncryptionConfiguration()
{
return this._customerContentEncryptionConfiguration != null;
}
/// <summary>
/// Gets and sets the property EnableMinimumEncryptionConfiguration.
/// <para>
/// Enforces a minimal level of encryption for the workgroup for query and calculation
/// results that are written to Amazon S3. When enabled, workgroup users can set encryption
/// only to the minimum level set by the administrator or higher when they submit queries.
/// </para>
///
/// <para>
/// The <code>EnforceWorkGroupConfiguration</code> setting takes precedence over the <code>EnableMinimumEncryptionConfiguration</code>
/// flag. This means that if <code>EnforceWorkGroupConfiguration</code> is true, the <code>EnableMinimumEncryptionConfiguration</code>
/// flag is ignored, and the workgroup configuration for encryption is used.
/// </para>
/// </summary>
public bool EnableMinimumEncryptionConfiguration
{
get { return this._enableMinimumEncryptionConfiguration.GetValueOrDefault(); }
set { this._enableMinimumEncryptionConfiguration = value; }
}
// Check to see if EnableMinimumEncryptionConfiguration property is set
internal bool IsSetEnableMinimumEncryptionConfiguration()
{
return this._enableMinimumEncryptionConfiguration.HasValue;
}
/// <summary>
/// Gets and sets the property EnforceWorkGroupConfiguration.
/// <para>
/// If set to "true", the settings for the workgroup override client-side settings. If
/// set to "false", client-side settings are used. For more information, see <a href="https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html">Workgroup
/// Settings Override Client-Side Settings</a>.
/// </para>
/// </summary>
public bool EnforceWorkGroupConfiguration
{
get { return this._enforceWorkGroupConfiguration.GetValueOrDefault(); }
set { this._enforceWorkGroupConfiguration = value; }
}
// Check to see if EnforceWorkGroupConfiguration property is set
internal bool IsSetEnforceWorkGroupConfiguration()
{
return this._enforceWorkGroupConfiguration.HasValue;
}
/// <summary>
/// Gets and sets the property EngineVersion.
/// <para>
/// The engine version that all queries running on the workgroup use. Queries on the <code>AmazonAthenaPreviewFunctionality</code>
/// workgroup run on the preview engine regardless of this setting.
/// </para>
/// </summary>
public EngineVersion EngineVersion
{
get { return this._engineVersion; }
set { this._engineVersion = value; }
}
// Check to see if EngineVersion property is set
internal bool IsSetEngineVersion()
{
return this._engineVersion != null;
}
/// <summary>
/// Gets and sets the property ExecutionRole.
/// <para>
/// Role used in a session for accessing the user's resources.
/// </para>
/// </summary>
[AWSProperty(Min=20, Max=2048)]
public string ExecutionRole
{
get { return this._executionRole; }
set { this._executionRole = value; }
}
// Check to see if ExecutionRole property is set
internal bool IsSetExecutionRole()
{
return this._executionRole != null;
}
/// <summary>
/// Gets and sets the property PublishCloudWatchMetricsEnabled.
/// <para>
/// Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.
/// </para>
/// </summary>
public bool PublishCloudWatchMetricsEnabled
{
get { return this._publishCloudWatchMetricsEnabled.GetValueOrDefault(); }
set { this._publishCloudWatchMetricsEnabled = value; }
}
// Check to see if PublishCloudWatchMetricsEnabled property is set
internal bool IsSetPublishCloudWatchMetricsEnabled()
{
return this._publishCloudWatchMetricsEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property RequesterPaysEnabled.
/// <para>
/// If set to <code>true</code>, allows members assigned to a workgroup to reference Amazon
/// S3 Requester Pays buckets in queries. If set to <code>false</code>, workgroup members
/// cannot query data from Requester Pays buckets, and queries that retrieve data from
/// Requester Pays buckets cause an error. The default is <code>false</code>. For more
/// information about Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html">Requester
/// Pays Buckets</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.
/// </para>
/// </summary>
public bool RequesterPaysEnabled
{
get { return this._requesterPaysEnabled.GetValueOrDefault(); }
set { this._requesterPaysEnabled = value; }
}
// Check to see if RequesterPaysEnabled property is set
internal bool IsSetRequesterPaysEnabled()
{
return this._requesterPaysEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ResultConfiguration.
/// <para>
/// The configuration for the workgroup, which includes the location in Amazon S3 where
/// query and calculation results are stored and the encryption option, if any, used for
/// query and calculation results. To run the query, you must specify the query results
/// location using one of the ways: either in the workgroup using this setting, or for
/// individual queries (client-side), using <a>ResultConfiguration$OutputLocation</a>.
/// If none of them is set, Athena issues an error that no output location is provided.
/// For more information, see <a href="https://docs.aws.amazon.com/athena/latest/ug/querying.html">Working
/// with query results, recent queries, and output files</a>.
/// </para>
/// </summary>
public ResultConfiguration ResultConfiguration
{
get { return this._resultConfiguration; }
set { this._resultConfiguration = value; }
}
// Check to see if ResultConfiguration property is set
internal bool IsSetResultConfiguration()
{
return this._resultConfiguration != null;
}
}
}
| 262 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// The configuration information that will be updated for this workgroup, which includes
/// the location in Amazon S3 where query and calculation results are stored, the encryption
/// option, if any, used for query results, whether the Amazon CloudWatch Metrics are
/// enabled for the workgroup, whether the workgroup settings override the client-side
/// settings, and the data usage limit for the amount of bytes scanned per query, if it
/// is specified.
/// </summary>
public partial class WorkGroupConfigurationUpdates
{
private string _additionalConfiguration;
private long? _bytesScannedCutoffPerQuery;
private CustomerContentEncryptionConfiguration _customerContentEncryptionConfiguration;
private bool? _enableMinimumEncryptionConfiguration;
private bool? _enforceWorkGroupConfiguration;
private EngineVersion _engineVersion;
private string _executionRole;
private bool? _publishCloudWatchMetricsEnabled;
private bool? _removeBytesScannedCutoffPerQuery;
private bool? _removeCustomerContentEncryptionConfiguration;
private bool? _requesterPaysEnabled;
private ResultConfigurationUpdates _resultConfigurationUpdates;
/// <summary>
/// Gets and sets the property AdditionalConfiguration.
/// <para>
/// Contains a user defined string in JSON format for a Spark-enabled workgroup.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=128)]
public string AdditionalConfiguration
{
get { return this._additionalConfiguration; }
set { this._additionalConfiguration = value; }
}
// Check to see if AdditionalConfiguration property is set
internal bool IsSetAdditionalConfiguration()
{
return this._additionalConfiguration != null;
}
/// <summary>
/// Gets and sets the property BytesScannedCutoffPerQuery.
/// <para>
/// The upper limit (cutoff) for the amount of bytes a single query in a workgroup is
/// allowed to scan.
/// </para>
/// </summary>
[AWSProperty(Min=10000000)]
public long BytesScannedCutoffPerQuery
{
get { return this._bytesScannedCutoffPerQuery.GetValueOrDefault(); }
set { this._bytesScannedCutoffPerQuery = value; }
}
// Check to see if BytesScannedCutoffPerQuery property is set
internal bool IsSetBytesScannedCutoffPerQuery()
{
return this._bytesScannedCutoffPerQuery.HasValue;
}
/// <summary>
/// Gets and sets the property CustomerContentEncryptionConfiguration.
/// </summary>
public CustomerContentEncryptionConfiguration CustomerContentEncryptionConfiguration
{
get { return this._customerContentEncryptionConfiguration; }
set { this._customerContentEncryptionConfiguration = value; }
}
// Check to see if CustomerContentEncryptionConfiguration property is set
internal bool IsSetCustomerContentEncryptionConfiguration()
{
return this._customerContentEncryptionConfiguration != null;
}
/// <summary>
/// Gets and sets the property EnableMinimumEncryptionConfiguration.
/// <para>
/// Enforces a minimal level of encryption for the workgroup for query and calculation
/// results that are written to Amazon S3. When enabled, workgroup users can set encryption
/// only to the minimum level set by the administrator or higher when they submit queries.
/// This setting does not apply to Spark-enabled workgroups.
/// </para>
///
/// <para>
/// The <code>EnforceWorkGroupConfiguration</code> setting takes precedence over the <code>EnableMinimumEncryptionConfiguration</code>
/// flag. This means that if <code>EnforceWorkGroupConfiguration</code> is true, the <code>EnableMinimumEncryptionConfiguration</code>
/// flag is ignored, and the workgroup configuration for encryption is used.
/// </para>
/// </summary>
public bool EnableMinimumEncryptionConfiguration
{
get { return this._enableMinimumEncryptionConfiguration.GetValueOrDefault(); }
set { this._enableMinimumEncryptionConfiguration = value; }
}
// Check to see if EnableMinimumEncryptionConfiguration property is set
internal bool IsSetEnableMinimumEncryptionConfiguration()
{
return this._enableMinimumEncryptionConfiguration.HasValue;
}
/// <summary>
/// Gets and sets the property EnforceWorkGroupConfiguration.
/// <para>
/// If set to "true", the settings for the workgroup override client-side settings. If
/// set to "false" client-side settings are used. For more information, see <a href="https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html">Workgroup
/// Settings Override Client-Side Settings</a>.
/// </para>
/// </summary>
public bool EnforceWorkGroupConfiguration
{
get { return this._enforceWorkGroupConfiguration.GetValueOrDefault(); }
set { this._enforceWorkGroupConfiguration = value; }
}
// Check to see if EnforceWorkGroupConfiguration property is set
internal bool IsSetEnforceWorkGroupConfiguration()
{
return this._enforceWorkGroupConfiguration.HasValue;
}
/// <summary>
/// Gets and sets the property EngineVersion.
/// <para>
/// The engine version requested when a workgroup is updated. After the update, all queries
/// on the workgroup run on the requested engine version. If no value was previously set,
/// the default is Auto. Queries on the <code>AmazonAthenaPreviewFunctionality</code>
/// workgroup run on the preview engine regardless of this setting.
/// </para>
/// </summary>
public EngineVersion EngineVersion
{
get { return this._engineVersion; }
set { this._engineVersion = value; }
}
// Check to see if EngineVersion property is set
internal bool IsSetEngineVersion()
{
return this._engineVersion != null;
}
/// <summary>
/// Gets and sets the property ExecutionRole.
/// <para>
/// Contains the ARN of the execution role for the workgroup
/// </para>
/// </summary>
[AWSProperty(Min=20, Max=2048)]
public string ExecutionRole
{
get { return this._executionRole; }
set { this._executionRole = value; }
}
// Check to see if ExecutionRole property is set
internal bool IsSetExecutionRole()
{
return this._executionRole != null;
}
/// <summary>
/// Gets and sets the property PublishCloudWatchMetricsEnabled.
/// <para>
/// Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch.
/// </para>
/// </summary>
public bool PublishCloudWatchMetricsEnabled
{
get { return this._publishCloudWatchMetricsEnabled.GetValueOrDefault(); }
set { this._publishCloudWatchMetricsEnabled = value; }
}
// Check to see if PublishCloudWatchMetricsEnabled property is set
internal bool IsSetPublishCloudWatchMetricsEnabled()
{
return this._publishCloudWatchMetricsEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property RemoveBytesScannedCutoffPerQuery.
/// <para>
/// Indicates that the data usage control limit per query is removed. <a>WorkGroupConfiguration$BytesScannedCutoffPerQuery</a>
///
/// </para>
/// </summary>
public bool RemoveBytesScannedCutoffPerQuery
{
get { return this._removeBytesScannedCutoffPerQuery.GetValueOrDefault(); }
set { this._removeBytesScannedCutoffPerQuery = value; }
}
// Check to see if RemoveBytesScannedCutoffPerQuery property is set
internal bool IsSetRemoveBytesScannedCutoffPerQuery()
{
return this._removeBytesScannedCutoffPerQuery.HasValue;
}
/// <summary>
/// Gets and sets the property RemoveCustomerContentEncryptionConfiguration.
/// <para>
/// Removes content encryption configuration from an Apache Spark-enabled Athena workgroup.
/// </para>
/// </summary>
public bool RemoveCustomerContentEncryptionConfiguration
{
get { return this._removeCustomerContentEncryptionConfiguration.GetValueOrDefault(); }
set { this._removeCustomerContentEncryptionConfiguration = value; }
}
// Check to see if RemoveCustomerContentEncryptionConfiguration property is set
internal bool IsSetRemoveCustomerContentEncryptionConfiguration()
{
return this._removeCustomerContentEncryptionConfiguration.HasValue;
}
/// <summary>
/// Gets and sets the property RequesterPaysEnabled.
/// <para>
/// If set to <code>true</code>, allows members assigned to a workgroup to specify Amazon
/// S3 Requester Pays buckets in queries. If set to <code>false</code>, workgroup members
/// cannot query data from Requester Pays buckets, and queries that retrieve data from
/// Requester Pays buckets cause an error. The default is <code>false</code>. For more
/// information about Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html">Requester
/// Pays Buckets</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.
/// </para>
/// </summary>
public bool RequesterPaysEnabled
{
get { return this._requesterPaysEnabled.GetValueOrDefault(); }
set { this._requesterPaysEnabled = value; }
}
// Check to see if RequesterPaysEnabled property is set
internal bool IsSetRequesterPaysEnabled()
{
return this._requesterPaysEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ResultConfigurationUpdates.
/// <para>
/// The result configuration information about the queries in this workgroup that will
/// be updated. Includes the updated results location and an updated option for encrypting
/// query results.
/// </para>
/// </summary>
public ResultConfigurationUpdates ResultConfigurationUpdates
{
get { return this._resultConfigurationUpdates; }
set { this._resultConfigurationUpdates = value; }
}
// Check to see if ResultConfigurationUpdates property is set
internal bool IsSetResultConfigurationUpdates()
{
return this._resultConfigurationUpdates != null;
}
}
}
| 294 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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>
/// The summary information for the workgroup, which includes its name, state, description,
/// and the date and time it was created.
/// </summary>
public partial class WorkGroupSummary
{
private DateTime? _creationTime;
private string _description;
private EngineVersion _engineVersion;
private string _name;
private WorkGroupState _state;
/// <summary>
/// Gets and sets the property CreationTime.
/// <para>
/// The workgroup creation date and time.
/// </para>
/// </summary>
public DateTime CreationTime
{
get { return this._creationTime.GetValueOrDefault(); }
set { this._creationTime = value; }
}
// Check to see if CreationTime property is set
internal bool IsSetCreationTime()
{
return this._creationTime.HasValue;
}
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// The workgroup description.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
/// <summary>
/// Gets and sets the property EngineVersion.
/// <para>
/// The engine version setting for all queries on the workgroup. Queries on the <code>AmazonAthenaPreviewFunctionality</code>
/// workgroup run on the preview engine regardless of this setting.
/// </para>
/// </summary>
public EngineVersion EngineVersion
{
get { return this._engineVersion; }
set { this._engineVersion = value; }
}
// Check to see if EngineVersion property is set
internal bool IsSetEngineVersion()
{
return this._engineVersion != null;
}
/// <summary>
/// Gets and sets the property Name.
/// <para>
/// The name of the workgroup.
/// </para>
/// </summary>
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
/// <summary>
/// Gets and sets the property State.
/// <para>
/// The state of the workgroup.
/// </para>
/// </summary>
public WorkGroupState State
{
get { return this._state; }
set { this._state = value; }
}
// Check to see if State property is set
internal bool IsSetState()
{
return this._state != null;
}
}
}
| 136 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// AclConfiguration Marshaller
/// </summary>
public class AclConfigurationMarshaller : IRequestMarshaller<AclConfiguration, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(AclConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetS3AclOption())
{
context.Writer.WritePropertyName("S3AclOption");
context.Writer.Write(requestObject.S3AclOption);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static AclConfigurationMarshaller Instance = new AclConfigurationMarshaller();
}
}
| 62 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 AclConfiguration Object
/// </summary>
public class AclConfigurationUnmarshaller : IUnmarshaller<AclConfiguration, XmlUnmarshallerContext>, IUnmarshaller<AclConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
AclConfiguration IUnmarshaller<AclConfiguration, 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 AclConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
AclConfiguration unmarshalledObject = new AclConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("S3AclOption", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.S3AclOption = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static AclConfigurationUnmarshaller _instance = new AclConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AclConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 ApplicationDPUSizes Object
/// </summary>
public class ApplicationDPUSizesUnmarshaller : IUnmarshaller<ApplicationDPUSizes, XmlUnmarshallerContext>, IUnmarshaller<ApplicationDPUSizes, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ApplicationDPUSizes IUnmarshaller<ApplicationDPUSizes, 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 ApplicationDPUSizes Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ApplicationDPUSizes unmarshalledObject = new ApplicationDPUSizes();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ApplicationRuntimeId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ApplicationRuntimeId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SupportedDPUSizes", targetDepth))
{
var unmarshaller = new ListUnmarshaller<int, IntUnmarshaller>(IntUnmarshaller.Instance);
unmarshalledObject.SupportedDPUSizes = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ApplicationDPUSizesUnmarshaller _instance = new ApplicationDPUSizesUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ApplicationDPUSizesUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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;
}
if (context.TestExpression("ErrorMessage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ErrorMessage = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ErrorType", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.ErrorType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Retryable", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Retryable = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static AthenaErrorUnmarshaller _instance = new AthenaErrorUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AthenaErrorUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 110 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// BatchGetNamedQuery Request Marshaller
/// </summary>
public class BatchGetNamedQueryRequestMarshaller : IMarshaller<IRequest, BatchGetNamedQueryRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((BatchGetNamedQueryRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(BatchGetNamedQueryRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.BatchGetNamedQuery";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetNamedQueryIds())
{
context.Writer.WritePropertyName("NamedQueryIds");
context.Writer.WriteArrayStart();
foreach(var publicRequestNamedQueryIdsListValue in publicRequest.NamedQueryIds)
{
context.Writer.Write(publicRequestNamedQueryIdsListValue);
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static BatchGetNamedQueryRequestMarshaller _instance = new BatchGetNamedQueryRequestMarshaller();
internal static BatchGetNamedQueryRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchGetNamedQueryRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 108 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 BatchGetNamedQuery operation
/// </summary>
public class BatchGetNamedQueryResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
BatchGetNamedQueryResponse response = new BatchGetNamedQueryResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("NamedQueries", targetDepth))
{
var unmarshaller = new ListUnmarshaller<NamedQuery, NamedQueryUnmarshaller>(NamedQueryUnmarshaller.Instance);
response.NamedQueries = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UnprocessedNamedQueryIds", targetDepth))
{
var unmarshaller = new ListUnmarshaller<UnprocessedNamedQueryId, UnprocessedNamedQueryIdUnmarshaller>(UnprocessedNamedQueryIdUnmarshaller.Instance);
response.UnprocessedNamedQueryIds = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static BatchGetNamedQueryResponseUnmarshaller _instance = new BatchGetNamedQueryResponseUnmarshaller();
internal static BatchGetNamedQueryResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchGetNamedQueryResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 120 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// BatchGetPreparedStatement Request Marshaller
/// </summary>
public class BatchGetPreparedStatementRequestMarshaller : IMarshaller<IRequest, BatchGetPreparedStatementRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((BatchGetPreparedStatementRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(BatchGetPreparedStatementRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.BatchGetPreparedStatement";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetPreparedStatementNames())
{
context.Writer.WritePropertyName("PreparedStatementNames");
context.Writer.WriteArrayStart();
foreach(var publicRequestPreparedStatementNamesListValue in publicRequest.PreparedStatementNames)
{
context.Writer.Write(publicRequestPreparedStatementNamesListValue);
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetWorkGroup())
{
context.Writer.WritePropertyName("WorkGroup");
context.Writer.Write(publicRequest.WorkGroup);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static BatchGetPreparedStatementRequestMarshaller _instance = new BatchGetPreparedStatementRequestMarshaller();
internal static BatchGetPreparedStatementRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchGetPreparedStatementRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 114 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 BatchGetPreparedStatement operation
/// </summary>
public class BatchGetPreparedStatementResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
BatchGetPreparedStatementResponse response = new BatchGetPreparedStatementResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PreparedStatements", targetDepth))
{
var unmarshaller = new ListUnmarshaller<PreparedStatement, PreparedStatementUnmarshaller>(PreparedStatementUnmarshaller.Instance);
response.PreparedStatements = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UnprocessedPreparedStatementNames", targetDepth))
{
var unmarshaller = new ListUnmarshaller<UnprocessedPreparedStatementName, UnprocessedPreparedStatementNameUnmarshaller>(UnprocessedPreparedStatementNameUnmarshaller.Instance);
response.UnprocessedPreparedStatementNames = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static BatchGetPreparedStatementResponseUnmarshaller _instance = new BatchGetPreparedStatementResponseUnmarshaller();
internal static BatchGetPreparedStatementResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchGetPreparedStatementResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 120 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// BatchGetQueryExecution Request Marshaller
/// </summary>
public class BatchGetQueryExecutionRequestMarshaller : IMarshaller<IRequest, BatchGetQueryExecutionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((BatchGetQueryExecutionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(BatchGetQueryExecutionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.BatchGetQueryExecution";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetQueryExecutionIds())
{
context.Writer.WritePropertyName("QueryExecutionIds");
context.Writer.WriteArrayStart();
foreach(var publicRequestQueryExecutionIdsListValue in publicRequest.QueryExecutionIds)
{
context.Writer.Write(publicRequestQueryExecutionIdsListValue);
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static BatchGetQueryExecutionRequestMarshaller _instance = new BatchGetQueryExecutionRequestMarshaller();
internal static BatchGetQueryExecutionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchGetQueryExecutionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 108 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 BatchGetQueryExecution operation
/// </summary>
public class BatchGetQueryExecutionResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
BatchGetQueryExecutionResponse response = new BatchGetQueryExecutionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("QueryExecutions", targetDepth))
{
var unmarshaller = new ListUnmarshaller<QueryExecution, QueryExecutionUnmarshaller>(QueryExecutionUnmarshaller.Instance);
response.QueryExecutions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UnprocessedQueryExecutionIds", targetDepth))
{
var unmarshaller = new ListUnmarshaller<UnprocessedQueryExecutionId, UnprocessedQueryExecutionIdUnmarshaller>(UnprocessedQueryExecutionIdUnmarshaller.Instance);
response.UnprocessedQueryExecutionIds = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static BatchGetQueryExecutionResponseUnmarshaller _instance = new BatchGetQueryExecutionResponseUnmarshaller();
internal static BatchGetQueryExecutionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchGetQueryExecutionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 120 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CalculationConfiguration Marshaller
/// </summary>
public class CalculationConfigurationMarshaller : IRequestMarshaller<CalculationConfiguration, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CalculationConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetCodeBlock())
{
context.Writer.WritePropertyName("CodeBlock");
context.Writer.Write(requestObject.CodeBlock);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CalculationConfigurationMarshaller Instance = new CalculationConfigurationMarshaller();
}
}
| 62 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CalculationResult Object
/// </summary>
public class CalculationResultUnmarshaller : IUnmarshaller<CalculationResult, XmlUnmarshallerContext>, IUnmarshaller<CalculationResult, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CalculationResult IUnmarshaller<CalculationResult, 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 CalculationResult Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CalculationResult unmarshalledObject = new CalculationResult();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ResultS3Uri", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResultS3Uri = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ResultType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResultType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StdErrorS3Uri", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StdErrorS3Uri = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StdOutS3Uri", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StdOutS3Uri = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CalculationResultUnmarshaller _instance = new CalculationResultUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CalculationResultUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 110 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CalculationStatistics Object
/// </summary>
public class CalculationStatisticsUnmarshaller : IUnmarshaller<CalculationStatistics, XmlUnmarshallerContext>, IUnmarshaller<CalculationStatistics, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CalculationStatistics IUnmarshaller<CalculationStatistics, 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 CalculationStatistics Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CalculationStatistics unmarshalledObject = new CalculationStatistics();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("DpuExecutionInMillis", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.DpuExecutionInMillis = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Progress", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Progress = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CalculationStatisticsUnmarshaller _instance = new CalculationStatisticsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CalculationStatisticsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CalculationStatus Object
/// </summary>
public class CalculationStatusUnmarshaller : IUnmarshaller<CalculationStatus, XmlUnmarshallerContext>, IUnmarshaller<CalculationStatus, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CalculationStatus IUnmarshaller<CalculationStatus, 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 CalculationStatus Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CalculationStatus unmarshalledObject = new CalculationStatus();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CompletionDateTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CompletionDateTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("State", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.State = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StateChangeReason", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StateChangeReason = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SubmissionDateTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.SubmissionDateTime = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CalculationStatusUnmarshaller _instance = new CalculationStatusUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CalculationStatusUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 110 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CalculationSummary Object
/// </summary>
public class CalculationSummaryUnmarshaller : IUnmarshaller<CalculationSummary, XmlUnmarshallerContext>, IUnmarshaller<CalculationSummary, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CalculationSummary IUnmarshaller<CalculationSummary, 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 CalculationSummary Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CalculationSummary unmarshalledObject = new CalculationSummary();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CalculationExecutionId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CalculationExecutionId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = CalculationStatusUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CalculationSummaryUnmarshaller _instance = new CalculationSummaryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CalculationSummaryUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 104 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CancelCapacityReservation Request Marshaller
/// </summary>
public class CancelCapacityReservationRequestMarshaller : IMarshaller<IRequest, CancelCapacityReservationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((CancelCapacityReservationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CancelCapacityReservationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.CancelCapacityReservation";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CancelCapacityReservationRequestMarshaller _instance = new CancelCapacityReservationRequestMarshaller();
internal static CancelCapacityReservationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CancelCapacityReservationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CancelCapacityReservation operation
/// </summary>
public class CancelCapacityReservationResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CancelCapacityReservationResponse response = new CancelCapacityReservationResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CancelCapacityReservationResponseUnmarshaller _instance = new CancelCapacityReservationResponseUnmarshaller();
internal static CancelCapacityReservationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CancelCapacityReservationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CapacityAllocation Object
/// </summary>
public class CapacityAllocationUnmarshaller : IUnmarshaller<CapacityAllocation, XmlUnmarshallerContext>, IUnmarshaller<CapacityAllocation, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CapacityAllocation IUnmarshaller<CapacityAllocation, 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 CapacityAllocation Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CapacityAllocation unmarshalledObject = new CapacityAllocation();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("RequestCompletionTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.RequestCompletionTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RequestTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.RequestTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StatusMessage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StatusMessage = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CapacityAllocationUnmarshaller _instance = new CapacityAllocationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CapacityAllocationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 110 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CapacityAssignmentConfiguration Object
/// </summary>
public class CapacityAssignmentConfigurationUnmarshaller : IUnmarshaller<CapacityAssignmentConfiguration, XmlUnmarshallerContext>, IUnmarshaller<CapacityAssignmentConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CapacityAssignmentConfiguration IUnmarshaller<CapacityAssignmentConfiguration, 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 CapacityAssignmentConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CapacityAssignmentConfiguration unmarshalledObject = new CapacityAssignmentConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CapacityAssignments", targetDepth))
{
var unmarshaller = new ListUnmarshaller<CapacityAssignment, CapacityAssignmentUnmarshaller>(CapacityAssignmentUnmarshaller.Instance);
unmarshalledObject.CapacityAssignments = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CapacityReservationName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CapacityReservationName = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CapacityAssignmentConfigurationUnmarshaller _instance = new CapacityAssignmentConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CapacityAssignmentConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CapacityAssignment Marshaller
/// </summary>
public class CapacityAssignmentMarshaller : IRequestMarshaller<CapacityAssignment, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CapacityAssignment requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetWorkGroupNames())
{
context.Writer.WritePropertyName("WorkGroupNames");
context.Writer.WriteArrayStart();
foreach(var requestObjectWorkGroupNamesListValue in requestObject.WorkGroupNames)
{
context.Writer.Write(requestObjectWorkGroupNamesListValue);
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CapacityAssignmentMarshaller Instance = new CapacityAssignmentMarshaller();
}
}
| 67 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CapacityAssignment Object
/// </summary>
public class CapacityAssignmentUnmarshaller : IUnmarshaller<CapacityAssignment, XmlUnmarshallerContext>, IUnmarshaller<CapacityAssignment, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CapacityAssignment IUnmarshaller<CapacityAssignment, 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 CapacityAssignment Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CapacityAssignment unmarshalledObject = new CapacityAssignment();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("WorkGroupNames", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.WorkGroupNames = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CapacityAssignmentUnmarshaller _instance = new CapacityAssignmentUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CapacityAssignmentUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CapacityReservation Object
/// </summary>
public class CapacityReservationUnmarshaller : IUnmarshaller<CapacityReservation, XmlUnmarshallerContext>, IUnmarshaller<CapacityReservation, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CapacityReservation IUnmarshaller<CapacityReservation, 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 CapacityReservation Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CapacityReservation unmarshalledObject = new CapacityReservation();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AllocatedDpus", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.AllocatedDpus = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastAllocation", targetDepth))
{
var unmarshaller = CapacityAllocationUnmarshaller.Instance;
unmarshalledObject.LastAllocation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastSuccessfulAllocationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.LastSuccessfulAllocationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TargetDpus", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.TargetDpus = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CapacityReservationUnmarshaller _instance = new CapacityReservationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CapacityReservationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 128 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 ColumnInfo Object
/// </summary>
public class ColumnInfoUnmarshaller : IUnmarshaller<ColumnInfo, XmlUnmarshallerContext>, IUnmarshaller<ColumnInfo, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ColumnInfo IUnmarshaller<ColumnInfo, 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 ColumnInfo Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ColumnInfo unmarshalledObject = new ColumnInfo();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CaseSensitive", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.CaseSensitive = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CatalogName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CatalogName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Label", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Label = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Nullable", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Nullable = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Precision", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Precision = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Scale", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Scale = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SchemaName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SchemaName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TableName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TableName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Type", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Type = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ColumnInfoUnmarshaller _instance = new ColumnInfoUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ColumnInfoUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 146 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 Column Object
/// </summary>
public class ColumnUnmarshaller : IUnmarshaller<Column, XmlUnmarshallerContext>, IUnmarshaller<Column, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Column IUnmarshaller<Column, 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 Column Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Column unmarshalledObject = new Column();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Comment", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Comment = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Type", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Type = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ColumnUnmarshaller _instance = new ColumnUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ColumnUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 104 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CreateCapacityReservation Request Marshaller
/// </summary>
public class CreateCapacityReservationRequestMarshaller : IMarshaller<IRequest, CreateCapacityReservationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((CreateCapacityReservationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateCapacityReservationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.CreateCapacityReservation";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetTags())
{
context.Writer.WritePropertyName("Tags");
context.Writer.WriteArrayStart();
foreach(var publicRequestTagsListValue in publicRequest.Tags)
{
context.Writer.WriteObjectStart();
var marshaller = TagMarshaller.Instance;
marshaller.Marshall(publicRequestTagsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetTargetDpus())
{
context.Writer.WritePropertyName("TargetDpus");
context.Writer.Write(publicRequest.TargetDpus);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateCapacityReservationRequestMarshaller _instance = new CreateCapacityReservationRequestMarshaller();
internal static CreateCapacityReservationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateCapacityReservationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 125 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CreateCapacityReservation operation
/// </summary>
public class CreateCapacityReservationResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateCapacityReservationResponse response = new CreateCapacityReservationResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateCapacityReservationResponseUnmarshaller _instance = new CreateCapacityReservationResponseUnmarshaller();
internal static CreateCapacityReservationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateCapacityReservationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CreateDataCatalog Request Marshaller
/// </summary>
public class CreateDataCatalogRequestMarshaller : IMarshaller<IRequest, CreateDataCatalogRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((CreateDataCatalogRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateDataCatalogRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.CreateDataCatalog";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetDescription())
{
context.Writer.WritePropertyName("Description");
context.Writer.Write(publicRequest.Description);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetParameters())
{
context.Writer.WritePropertyName("Parameters");
context.Writer.WriteObjectStart();
foreach (var publicRequestParametersKvp in publicRequest.Parameters)
{
context.Writer.WritePropertyName(publicRequestParametersKvp.Key);
var publicRequestParametersValue = publicRequestParametersKvp.Value;
context.Writer.Write(publicRequestParametersValue);
}
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetTags())
{
context.Writer.WritePropertyName("Tags");
context.Writer.WriteArrayStart();
foreach(var publicRequestTagsListValue in publicRequest.Tags)
{
context.Writer.WriteObjectStart();
var marshaller = TagMarshaller.Instance;
marshaller.Marshall(publicRequestTagsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetType())
{
context.Writer.WritePropertyName("Type");
context.Writer.Write(publicRequest.Type);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateDataCatalogRequestMarshaller _instance = new CreateDataCatalogRequestMarshaller();
internal static CreateDataCatalogRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateDataCatalogRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 145 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CreateDataCatalog operation
/// </summary>
public class CreateDataCatalogResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateDataCatalogResponse response = new CreateDataCatalogResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateDataCatalogResponseUnmarshaller _instance = new CreateDataCatalogResponseUnmarshaller();
internal static CreateDataCatalogResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateDataCatalogResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CreateNamedQuery Request Marshaller
/// </summary>
public class CreateNamedQueryRequestMarshaller : IMarshaller<IRequest, CreateNamedQueryRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((CreateNamedQueryRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateNamedQueryRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.CreateNamedQuery";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetClientRequestToken())
{
context.Writer.WritePropertyName("ClientRequestToken");
context.Writer.Write(publicRequest.ClientRequestToken);
}
else if(!(publicRequest.IsSetClientRequestToken()))
{
context.Writer.WritePropertyName("ClientRequestToken");
context.Writer.Write(Guid.NewGuid().ToString());
}
if(publicRequest.IsSetDatabase())
{
context.Writer.WritePropertyName("Database");
context.Writer.Write(publicRequest.Database);
}
if(publicRequest.IsSetDescription())
{
context.Writer.WritePropertyName("Description");
context.Writer.Write(publicRequest.Description);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetQueryString())
{
context.Writer.WritePropertyName("QueryString");
context.Writer.Write(publicRequest.QueryString);
}
if(publicRequest.IsSetWorkGroup())
{
context.Writer.WritePropertyName("WorkGroup");
context.Writer.Write(publicRequest.WorkGroup);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateNamedQueryRequestMarshaller _instance = new CreateNamedQueryRequestMarshaller();
internal static CreateNamedQueryRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateNamedQueryRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 138 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CreateNamedQuery operation
/// </summary>
public class CreateNamedQueryResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateNamedQueryResponse response = new CreateNamedQueryResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("NamedQueryId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NamedQueryId = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateNamedQueryResponseUnmarshaller _instance = new CreateNamedQueryResponseUnmarshaller();
internal static CreateNamedQueryResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateNamedQueryResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 114 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CreateNotebook Request Marshaller
/// </summary>
public class CreateNotebookRequestMarshaller : IMarshaller<IRequest, CreateNotebookRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((CreateNotebookRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateNotebookRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.CreateNotebook";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetClientRequestToken())
{
context.Writer.WritePropertyName("ClientRequestToken");
context.Writer.Write(publicRequest.ClientRequestToken);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetWorkGroup())
{
context.Writer.WritePropertyName("WorkGroup");
context.Writer.Write(publicRequest.WorkGroup);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateNotebookRequestMarshaller _instance = new CreateNotebookRequestMarshaller();
internal static CreateNotebookRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateNotebookRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 115 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CreateNotebook operation
/// </summary>
public class CreateNotebookResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateNotebookResponse response = new CreateNotebookResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("NotebookId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NotebookId = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateNotebookResponseUnmarshaller _instance = new CreateNotebookResponseUnmarshaller();
internal static CreateNotebookResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateNotebookResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 118 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CreatePreparedStatement Request Marshaller
/// </summary>
public class CreatePreparedStatementRequestMarshaller : IMarshaller<IRequest, CreatePreparedStatementRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((CreatePreparedStatementRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreatePreparedStatementRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.CreatePreparedStatement";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetDescription())
{
context.Writer.WritePropertyName("Description");
context.Writer.Write(publicRequest.Description);
}
if(publicRequest.IsSetQueryStatement())
{
context.Writer.WritePropertyName("QueryStatement");
context.Writer.Write(publicRequest.QueryStatement);
}
if(publicRequest.IsSetStatementName())
{
context.Writer.WritePropertyName("StatementName");
context.Writer.Write(publicRequest.StatementName);
}
if(publicRequest.IsSetWorkGroup())
{
context.Writer.WritePropertyName("WorkGroup");
context.Writer.Write(publicRequest.WorkGroup);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreatePreparedStatementRequestMarshaller _instance = new CreatePreparedStatementRequestMarshaller();
internal static CreatePreparedStatementRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreatePreparedStatementRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 121 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CreatePreparedStatement operation
/// </summary>
public class CreatePreparedStatementResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreatePreparedStatementResponse response = new CreatePreparedStatementResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreatePreparedStatementResponseUnmarshaller _instance = new CreatePreparedStatementResponseUnmarshaller();
internal static CreatePreparedStatementResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreatePreparedStatementResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CreatePresignedNotebookUrl Request Marshaller
/// </summary>
public class CreatePresignedNotebookUrlRequestMarshaller : IMarshaller<IRequest, CreatePresignedNotebookUrlRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((CreatePresignedNotebookUrlRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreatePresignedNotebookUrlRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.CreatePresignedNotebookUrl";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetSessionId())
{
context.Writer.WritePropertyName("SessionId");
context.Writer.Write(publicRequest.SessionId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreatePresignedNotebookUrlRequestMarshaller _instance = new CreatePresignedNotebookUrlRequestMarshaller();
internal static CreatePresignedNotebookUrlRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreatePresignedNotebookUrlRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CreatePresignedNotebookUrl operation
/// </summary>
public class CreatePresignedNotebookUrlResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreatePresignedNotebookUrlResponse response = new CreatePresignedNotebookUrlResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AuthToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AuthToken = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("AuthTokenExpirationTime", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
response.AuthTokenExpirationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("NotebookUrl", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NotebookUrl = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreatePresignedNotebookUrlResponseUnmarshaller _instance = new CreatePresignedNotebookUrlResponseUnmarshaller();
internal static CreatePresignedNotebookUrlResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreatePresignedNotebookUrlResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 130 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CreateWorkGroup Request Marshaller
/// </summary>
public class CreateWorkGroupRequestMarshaller : IMarshaller<IRequest, CreateWorkGroupRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((CreateWorkGroupRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateWorkGroupRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.CreateWorkGroup";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetConfiguration())
{
context.Writer.WritePropertyName("Configuration");
context.Writer.WriteObjectStart();
var marshaller = WorkGroupConfigurationMarshaller.Instance;
marshaller.Marshall(publicRequest.Configuration, context);
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetDescription())
{
context.Writer.WritePropertyName("Description");
context.Writer.Write(publicRequest.Description);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetTags())
{
context.Writer.WritePropertyName("Tags");
context.Writer.WriteArrayStart();
foreach(var publicRequestTagsListValue in publicRequest.Tags)
{
context.Writer.WriteObjectStart();
var marshaller = TagMarshaller.Instance;
marshaller.Marshall(publicRequestTagsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateWorkGroupRequestMarshaller _instance = new CreateWorkGroupRequestMarshaller();
internal static CreateWorkGroupRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateWorkGroupRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 136 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CreateWorkGroup operation
/// </summary>
public class CreateWorkGroupResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateWorkGroupResponse response = new CreateWorkGroupResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateWorkGroupResponseUnmarshaller _instance = new CreateWorkGroupResponseUnmarshaller();
internal static CreateWorkGroupResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateWorkGroupResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// CustomerContentEncryptionConfiguration Marshaller
/// </summary>
public class CustomerContentEncryptionConfigurationMarshaller : IRequestMarshaller<CustomerContentEncryptionConfiguration, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CustomerContentEncryptionConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetKmsKey())
{
context.Writer.WritePropertyName("KmsKey");
context.Writer.Write(requestObject.KmsKey);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CustomerContentEncryptionConfigurationMarshaller Instance = new CustomerContentEncryptionConfigurationMarshaller();
}
}
| 62 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 CustomerContentEncryptionConfiguration Object
/// </summary>
public class CustomerContentEncryptionConfigurationUnmarshaller : IUnmarshaller<CustomerContentEncryptionConfiguration, XmlUnmarshallerContext>, IUnmarshaller<CustomerContentEncryptionConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CustomerContentEncryptionConfiguration IUnmarshaller<CustomerContentEncryptionConfiguration, 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 CustomerContentEncryptionConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CustomerContentEncryptionConfiguration unmarshalledObject = new CustomerContentEncryptionConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("KmsKey", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.KmsKey = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CustomerContentEncryptionConfigurationUnmarshaller _instance = new CustomerContentEncryptionConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CustomerContentEncryptionConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 Database Object
/// </summary>
public class DatabaseUnmarshaller : IUnmarshaller<Database, XmlUnmarshallerContext>, IUnmarshaller<Database, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Database IUnmarshaller<Database, 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 Database Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Database unmarshalledObject = new Database();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Parameters", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.Parameters = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static DatabaseUnmarshaller _instance = new DatabaseUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DatabaseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 104 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 DataCatalogSummary Object
/// </summary>
public class DataCatalogSummaryUnmarshaller : IUnmarshaller<DataCatalogSummary, XmlUnmarshallerContext>, IUnmarshaller<DataCatalogSummary, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
DataCatalogSummary IUnmarshaller<DataCatalogSummary, 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 DataCatalogSummary Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
DataCatalogSummary unmarshalledObject = new DataCatalogSummary();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CatalogName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CatalogName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Type", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Type = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static DataCatalogSummaryUnmarshaller _instance = new DataCatalogSummaryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DataCatalogSummaryUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 DataCatalog Object
/// </summary>
public class DataCatalogUnmarshaller : IUnmarshaller<DataCatalog, XmlUnmarshallerContext>, IUnmarshaller<DataCatalog, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
DataCatalog IUnmarshaller<DataCatalog, 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 DataCatalog Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
DataCatalog unmarshalledObject = new DataCatalog();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Parameters", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.Parameters = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Type", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Type = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static DataCatalogUnmarshaller _instance = new DataCatalogUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DataCatalogUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 110 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 Datum Object
/// </summary>
public class DatumUnmarshaller : IUnmarshaller<Datum, XmlUnmarshallerContext>, IUnmarshaller<Datum, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Datum IUnmarshaller<Datum, 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 Datum Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Datum unmarshalledObject = new Datum();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VarCharValue", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VarCharValue = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static DatumUnmarshaller _instance = new DatumUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DatumUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// DeleteCapacityReservation Request Marshaller
/// </summary>
public class DeleteCapacityReservationRequestMarshaller : IMarshaller<IRequest, DeleteCapacityReservationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((DeleteCapacityReservationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteCapacityReservationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.DeleteCapacityReservation";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeleteCapacityReservationRequestMarshaller _instance = new DeleteCapacityReservationRequestMarshaller();
internal static DeleteCapacityReservationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteCapacityReservationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 DeleteCapacityReservation operation
/// </summary>
public class DeleteCapacityReservationResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeleteCapacityReservationResponse response = new DeleteCapacityReservationResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteCapacityReservationResponseUnmarshaller _instance = new DeleteCapacityReservationResponseUnmarshaller();
internal static DeleteCapacityReservationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteCapacityReservationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// DeleteDataCatalog Request Marshaller
/// </summary>
public class DeleteDataCatalogRequestMarshaller : IMarshaller<IRequest, DeleteDataCatalogRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((DeleteDataCatalogRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteDataCatalogRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.DeleteDataCatalog";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeleteDataCatalogRequestMarshaller _instance = new DeleteDataCatalogRequestMarshaller();
internal static DeleteDataCatalogRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteDataCatalogRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 DeleteDataCatalog operation
/// </summary>
public class DeleteDataCatalogResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeleteDataCatalogResponse response = new DeleteDataCatalogResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteDataCatalogResponseUnmarshaller _instance = new DeleteDataCatalogResponseUnmarshaller();
internal static DeleteDataCatalogResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteDataCatalogResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// DeleteNamedQuery Request Marshaller
/// </summary>
public class DeleteNamedQueryRequestMarshaller : IMarshaller<IRequest, DeleteNamedQueryRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((DeleteNamedQueryRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteNamedQueryRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.DeleteNamedQuery";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetNamedQueryId())
{
context.Writer.WritePropertyName("NamedQueryId");
context.Writer.Write(publicRequest.NamedQueryId);
}
else if(!(publicRequest.IsSetNamedQueryId()))
{
context.Writer.WritePropertyName("NamedQueryId");
context.Writer.Write(Guid.NewGuid().ToString());
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeleteNamedQueryRequestMarshaller _instance = new DeleteNamedQueryRequestMarshaller();
internal static DeleteNamedQueryRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteNamedQueryRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 108 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 DeleteNamedQuery operation
/// </summary>
public class DeleteNamedQueryResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeleteNamedQueryResponse response = new DeleteNamedQueryResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteNamedQueryResponseUnmarshaller _instance = new DeleteNamedQueryResponseUnmarshaller();
internal static DeleteNamedQueryResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteNamedQueryResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// DeleteNotebook Request Marshaller
/// </summary>
public class DeleteNotebookRequestMarshaller : IMarshaller<IRequest, DeleteNotebookRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((DeleteNotebookRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteNotebookRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.DeleteNotebook";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetNotebookId())
{
context.Writer.WritePropertyName("NotebookId");
context.Writer.Write(publicRequest.NotebookId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeleteNotebookRequestMarshaller _instance = new DeleteNotebookRequestMarshaller();
internal static DeleteNotebookRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteNotebookRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 DeleteNotebook operation
/// </summary>
public class DeleteNotebookResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeleteNotebookResponse response = new DeleteNotebookResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteNotebookResponseUnmarshaller _instance = new DeleteNotebookResponseUnmarshaller();
internal static DeleteNotebookResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteNotebookResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 107 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// DeletePreparedStatement Request Marshaller
/// </summary>
public class DeletePreparedStatementRequestMarshaller : IMarshaller<IRequest, DeletePreparedStatementRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((DeletePreparedStatementRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeletePreparedStatementRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.DeletePreparedStatement";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetStatementName())
{
context.Writer.WritePropertyName("StatementName");
context.Writer.Write(publicRequest.StatementName);
}
if(publicRequest.IsSetWorkGroup())
{
context.Writer.WritePropertyName("WorkGroup");
context.Writer.Write(publicRequest.WorkGroup);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeletePreparedStatementRequestMarshaller _instance = new DeletePreparedStatementRequestMarshaller();
internal static DeletePreparedStatementRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeletePreparedStatementRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 109 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 DeletePreparedStatement operation
/// </summary>
public class DeletePreparedStatementResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeletePreparedStatementResponse response = new DeletePreparedStatementResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeletePreparedStatementResponseUnmarshaller _instance = new DeletePreparedStatementResponseUnmarshaller();
internal static DeletePreparedStatementResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeletePreparedStatementResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 107 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// DeleteWorkGroup Request Marshaller
/// </summary>
public class DeleteWorkGroupRequestMarshaller : IMarshaller<IRequest, DeleteWorkGroupRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((DeleteWorkGroupRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteWorkGroupRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.DeleteWorkGroup";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetRecursiveDeleteOption())
{
context.Writer.WritePropertyName("RecursiveDeleteOption");
context.Writer.Write(publicRequest.RecursiveDeleteOption);
}
if(publicRequest.IsSetWorkGroup())
{
context.Writer.WritePropertyName("WorkGroup");
context.Writer.Write(publicRequest.WorkGroup);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeleteWorkGroupRequestMarshaller _instance = new DeleteWorkGroupRequestMarshaller();
internal static DeleteWorkGroupRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteWorkGroupRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 109 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 DeleteWorkGroup operation
/// </summary>
public class DeleteWorkGroupResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeleteWorkGroupResponse response = new DeleteWorkGroupResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteWorkGroupResponseUnmarshaller _instance = new DeleteWorkGroupResponseUnmarshaller();
internal static DeleteWorkGroupResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteWorkGroupResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// EncryptionConfiguration Marshaller
/// </summary>
public class EncryptionConfigurationMarshaller : IRequestMarshaller<EncryptionConfiguration, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(EncryptionConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetEncryptionOption())
{
context.Writer.WritePropertyName("EncryptionOption");
context.Writer.Write(requestObject.EncryptionOption);
}
if(requestObject.IsSetKmsKey())
{
context.Writer.WritePropertyName("KmsKey");
context.Writer.Write(requestObject.KmsKey);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static EncryptionConfigurationMarshaller Instance = new EncryptionConfigurationMarshaller();
}
}
| 68 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 EncryptionConfiguration Object
/// </summary>
public class EncryptionConfigurationUnmarshaller : IUnmarshaller<EncryptionConfiguration, XmlUnmarshallerContext>, IUnmarshaller<EncryptionConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
EncryptionConfiguration IUnmarshaller<EncryptionConfiguration, 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 EncryptionConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
EncryptionConfiguration unmarshalledObject = new EncryptionConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("EncryptionOption", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EncryptionOption = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("KmsKey", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.KmsKey = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static EncryptionConfigurationUnmarshaller _instance = new EncryptionConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static EncryptionConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// EngineConfiguration Marshaller
/// </summary>
public class EngineConfigurationMarshaller : IRequestMarshaller<EngineConfiguration, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(EngineConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAdditionalConfigs())
{
context.Writer.WritePropertyName("AdditionalConfigs");
context.Writer.WriteObjectStart();
foreach (var requestObjectAdditionalConfigsKvp in requestObject.AdditionalConfigs)
{
context.Writer.WritePropertyName(requestObjectAdditionalConfigsKvp.Key);
var requestObjectAdditionalConfigsValue = requestObjectAdditionalConfigsKvp.Value;
context.Writer.Write(requestObjectAdditionalConfigsValue);
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetCoordinatorDpuSize())
{
context.Writer.WritePropertyName("CoordinatorDpuSize");
context.Writer.Write(requestObject.CoordinatorDpuSize);
}
if(requestObject.IsSetDefaultExecutorDpuSize())
{
context.Writer.WritePropertyName("DefaultExecutorDpuSize");
context.Writer.Write(requestObject.DefaultExecutorDpuSize);
}
if(requestObject.IsSetMaxConcurrentDpus())
{
context.Writer.WritePropertyName("MaxConcurrentDpus");
context.Writer.Write(requestObject.MaxConcurrentDpus);
}
if(requestObject.IsSetSparkProperties())
{
context.Writer.WritePropertyName("SparkProperties");
context.Writer.WriteObjectStart();
foreach (var requestObjectSparkPropertiesKvp in requestObject.SparkProperties)
{
context.Writer.WritePropertyName(requestObjectSparkPropertiesKvp.Key);
var requestObjectSparkPropertiesValue = requestObjectSparkPropertiesKvp.Value;
context.Writer.Write(requestObjectSparkPropertiesValue);
}
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static EngineConfigurationMarshaller Instance = new EngineConfigurationMarshaller();
}
}
| 102 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 EngineConfiguration Object
/// </summary>
public class EngineConfigurationUnmarshaller : IUnmarshaller<EngineConfiguration, XmlUnmarshallerContext>, IUnmarshaller<EngineConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
EngineConfiguration IUnmarshaller<EngineConfiguration, 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 EngineConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
EngineConfiguration unmarshalledObject = new EngineConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AdditionalConfigs", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.AdditionalConfigs = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CoordinatorDpuSize", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.CoordinatorDpuSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DefaultExecutorDpuSize", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.DefaultExecutorDpuSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MaxConcurrentDpus", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MaxConcurrentDpus = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SparkProperties", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.SparkProperties = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static EngineConfigurationUnmarshaller _instance = new EngineConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static EngineConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 116 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// EngineVersion Marshaller
/// </summary>
public class EngineVersionMarshaller : IRequestMarshaller<EngineVersion, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(EngineVersion requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetEffectiveEngineVersion())
{
context.Writer.WritePropertyName("EffectiveEngineVersion");
context.Writer.Write(requestObject.EffectiveEngineVersion);
}
if(requestObject.IsSetSelectedEngineVersion())
{
context.Writer.WritePropertyName("SelectedEngineVersion");
context.Writer.Write(requestObject.SelectedEngineVersion);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static EngineVersionMarshaller Instance = new EngineVersionMarshaller();
}
}
| 68 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 EngineVersion Object
/// </summary>
public class EngineVersionUnmarshaller : IUnmarshaller<EngineVersion, XmlUnmarshallerContext>, IUnmarshaller<EngineVersion, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
EngineVersion IUnmarshaller<EngineVersion, 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 EngineVersion Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
EngineVersion unmarshalledObject = new EngineVersion();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("EffectiveEngineVersion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EffectiveEngineVersion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SelectedEngineVersion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SelectedEngineVersion = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static EngineVersionUnmarshaller _instance = new EngineVersionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static EngineVersionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 ExecutorsSummary Object
/// </summary>
public class ExecutorsSummaryUnmarshaller : IUnmarshaller<ExecutorsSummary, XmlUnmarshallerContext>, IUnmarshaller<ExecutorsSummary, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ExecutorsSummary IUnmarshaller<ExecutorsSummary, 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 ExecutorsSummary Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ExecutorsSummary unmarshalledObject = new ExecutorsSummary();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ExecutorId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ExecutorId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ExecutorSize", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.ExecutorSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ExecutorState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ExecutorState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ExecutorType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ExecutorType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StartDateTime", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.StartDateTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TerminationDateTime", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.TerminationDateTime = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ExecutorsSummaryUnmarshaller _instance = new ExecutorsSummaryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExecutorsSummaryUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 122 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// ExportNotebook Request Marshaller
/// </summary>
public class ExportNotebookRequestMarshaller : IMarshaller<IRequest, ExportNotebookRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ExportNotebookRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ExportNotebookRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.ExportNotebook";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetNotebookId())
{
context.Writer.WritePropertyName("NotebookId");
context.Writer.Write(publicRequest.NotebookId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static ExportNotebookRequestMarshaller _instance = new ExportNotebookRequestMarshaller();
internal static ExportNotebookRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExportNotebookRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 ExportNotebook operation
/// </summary>
public class ExportNotebookResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ExportNotebookResponse response = new ExportNotebookResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("NotebookMetadata", targetDepth))
{
var unmarshaller = NotebookMetadataUnmarshaller.Instance;
response.NotebookMetadata = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Payload", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Payload = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ExportNotebookResponseUnmarshaller _instance = new ExportNotebookResponseUnmarshaller();
internal static ExportNotebookResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExportNotebookResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 124 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// FilterDefinition Marshaller
/// </summary>
public class FilterDefinitionMarshaller : IRequestMarshaller<FilterDefinition, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(FilterDefinition requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(requestObject.Name);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FilterDefinitionMarshaller Instance = new FilterDefinitionMarshaller();
}
}
| 62 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetCalculationExecutionCode Request Marshaller
/// </summary>
public class GetCalculationExecutionCodeRequestMarshaller : IMarshaller<IRequest, GetCalculationExecutionCodeRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetCalculationExecutionCodeRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetCalculationExecutionCodeRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetCalculationExecutionCode";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetCalculationExecutionId())
{
context.Writer.WritePropertyName("CalculationExecutionId");
context.Writer.Write(publicRequest.CalculationExecutionId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetCalculationExecutionCodeRequestMarshaller _instance = new GetCalculationExecutionCodeRequestMarshaller();
internal static GetCalculationExecutionCodeRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCalculationExecutionCodeRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetCalculationExecutionCode operation
/// </summary>
public class GetCalculationExecutionCodeResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetCalculationExecutionCodeResponse response = new GetCalculationExecutionCodeResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CodeBlock", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.CodeBlock = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetCalculationExecutionCodeResponseUnmarshaller _instance = new GetCalculationExecutionCodeResponseUnmarshaller();
internal static GetCalculationExecutionCodeResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCalculationExecutionCodeResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 118 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetCalculationExecution Request Marshaller
/// </summary>
public class GetCalculationExecutionRequestMarshaller : IMarshaller<IRequest, GetCalculationExecutionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetCalculationExecutionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetCalculationExecutionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetCalculationExecution";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetCalculationExecutionId())
{
context.Writer.WritePropertyName("CalculationExecutionId");
context.Writer.Write(publicRequest.CalculationExecutionId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetCalculationExecutionRequestMarshaller _instance = new GetCalculationExecutionRequestMarshaller();
internal static GetCalculationExecutionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCalculationExecutionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetCalculationExecution operation
/// </summary>
public class GetCalculationExecutionResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetCalculationExecutionResponse response = new GetCalculationExecutionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CalculationExecutionId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.CalculationExecutionId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Result", targetDepth))
{
var unmarshaller = CalculationResultUnmarshaller.Instance;
response.Result = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SessionId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.SessionId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Statistics", targetDepth))
{
var unmarshaller = CalculationStatisticsUnmarshaller.Instance;
response.Statistics = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = CalculationStatusUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("WorkingDirectory", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.WorkingDirectory = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetCalculationExecutionResponseUnmarshaller _instance = new GetCalculationExecutionResponseUnmarshaller();
internal static GetCalculationExecutionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCalculationExecutionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 154 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetCalculationExecutionStatus Request Marshaller
/// </summary>
public class GetCalculationExecutionStatusRequestMarshaller : IMarshaller<IRequest, GetCalculationExecutionStatusRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetCalculationExecutionStatusRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetCalculationExecutionStatusRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetCalculationExecutionStatus";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetCalculationExecutionId())
{
context.Writer.WritePropertyName("CalculationExecutionId");
context.Writer.Write(publicRequest.CalculationExecutionId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetCalculationExecutionStatusRequestMarshaller _instance = new GetCalculationExecutionStatusRequestMarshaller();
internal static GetCalculationExecutionStatusRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCalculationExecutionStatusRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetCalculationExecutionStatus operation
/// </summary>
public class GetCalculationExecutionStatusResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetCalculationExecutionStatusResponse response = new GetCalculationExecutionStatusResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Statistics", targetDepth))
{
var unmarshaller = CalculationStatisticsUnmarshaller.Instance;
response.Statistics = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = CalculationStatusUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetCalculationExecutionStatusResponseUnmarshaller _instance = new GetCalculationExecutionStatusResponseUnmarshaller();
internal static GetCalculationExecutionStatusResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCalculationExecutionStatusResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 124 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetCapacityAssignmentConfiguration Request Marshaller
/// </summary>
public class GetCapacityAssignmentConfigurationRequestMarshaller : IMarshaller<IRequest, GetCapacityAssignmentConfigurationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetCapacityAssignmentConfigurationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetCapacityAssignmentConfigurationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetCapacityAssignmentConfiguration";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetCapacityReservationName())
{
context.Writer.WritePropertyName("CapacityReservationName");
context.Writer.Write(publicRequest.CapacityReservationName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetCapacityAssignmentConfigurationRequestMarshaller _instance = new GetCapacityAssignmentConfigurationRequestMarshaller();
internal static GetCapacityAssignmentConfigurationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCapacityAssignmentConfigurationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetCapacityAssignmentConfiguration operation
/// </summary>
public class GetCapacityAssignmentConfigurationResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetCapacityAssignmentConfigurationResponse response = new GetCapacityAssignmentConfigurationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CapacityAssignmentConfiguration", targetDepth))
{
var unmarshaller = CapacityAssignmentConfigurationUnmarshaller.Instance;
response.CapacityAssignmentConfiguration = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetCapacityAssignmentConfigurationResponseUnmarshaller _instance = new GetCapacityAssignmentConfigurationResponseUnmarshaller();
internal static GetCapacityAssignmentConfigurationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCapacityAssignmentConfigurationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 114 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetCapacityReservation Request Marshaller
/// </summary>
public class GetCapacityReservationRequestMarshaller : IMarshaller<IRequest, GetCapacityReservationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetCapacityReservationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetCapacityReservationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetCapacityReservation";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetCapacityReservationRequestMarshaller _instance = new GetCapacityReservationRequestMarshaller();
internal static GetCapacityReservationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCapacityReservationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetCapacityReservation operation
/// </summary>
public class GetCapacityReservationResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetCapacityReservationResponse response = new GetCapacityReservationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CapacityReservation", targetDepth))
{
var unmarshaller = CapacityReservationUnmarshaller.Instance;
response.CapacityReservation = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetCapacityReservationResponseUnmarshaller _instance = new GetCapacityReservationResponseUnmarshaller();
internal static GetCapacityReservationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCapacityReservationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 114 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetDatabase Request Marshaller
/// </summary>
public class GetDatabaseRequestMarshaller : IMarshaller<IRequest, GetDatabaseRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetDatabaseRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetDatabaseRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetDatabase";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetCatalogName())
{
context.Writer.WritePropertyName("CatalogName");
context.Writer.Write(publicRequest.CatalogName);
}
if(publicRequest.IsSetDatabaseName())
{
context.Writer.WritePropertyName("DatabaseName");
context.Writer.Write(publicRequest.DatabaseName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetDatabaseRequestMarshaller _instance = new GetDatabaseRequestMarshaller();
internal static GetDatabaseRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetDatabaseRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 109 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetDatabase operation
/// </summary>
public class GetDatabaseResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetDatabaseResponse response = new GetDatabaseResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Database", targetDepth))
{
var unmarshaller = DatabaseUnmarshaller.Instance;
response.Database = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("MetadataException"))
{
return MetadataExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetDatabaseResponseUnmarshaller _instance = new GetDatabaseResponseUnmarshaller();
internal static GetDatabaseResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetDatabaseResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 118 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetDataCatalog Request Marshaller
/// </summary>
public class GetDataCatalogRequestMarshaller : IMarshaller<IRequest, GetDataCatalogRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetDataCatalogRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetDataCatalogRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetDataCatalog";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetDataCatalogRequestMarshaller _instance = new GetDataCatalogRequestMarshaller();
internal static GetDataCatalogRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetDataCatalogRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetDataCatalog operation
/// </summary>
public class GetDataCatalogResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetDataCatalogResponse response = new GetDataCatalogResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("DataCatalog", targetDepth))
{
var unmarshaller = DataCatalogUnmarshaller.Instance;
response.DataCatalog = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetDataCatalogResponseUnmarshaller _instance = new GetDataCatalogResponseUnmarshaller();
internal static GetDataCatalogResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetDataCatalogResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 114 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetNamedQuery Request Marshaller
/// </summary>
public class GetNamedQueryRequestMarshaller : IMarshaller<IRequest, GetNamedQueryRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetNamedQueryRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetNamedQueryRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetNamedQuery";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetNamedQueryId())
{
context.Writer.WritePropertyName("NamedQueryId");
context.Writer.Write(publicRequest.NamedQueryId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetNamedQueryRequestMarshaller _instance = new GetNamedQueryRequestMarshaller();
internal static GetNamedQueryRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetNamedQueryRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetNamedQuery operation
/// </summary>
public class GetNamedQueryResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetNamedQueryResponse response = new GetNamedQueryResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("NamedQuery", targetDepth))
{
var unmarshaller = NamedQueryUnmarshaller.Instance;
response.NamedQuery = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetNamedQueryResponseUnmarshaller _instance = new GetNamedQueryResponseUnmarshaller();
internal static GetNamedQueryResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetNamedQueryResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 114 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetNotebookMetadata Request Marshaller
/// </summary>
public class GetNotebookMetadataRequestMarshaller : IMarshaller<IRequest, GetNotebookMetadataRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetNotebookMetadataRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetNotebookMetadataRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetNotebookMetadata";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetNotebookId())
{
context.Writer.WritePropertyName("NotebookId");
context.Writer.Write(publicRequest.NotebookId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetNotebookMetadataRequestMarshaller _instance = new GetNotebookMetadataRequestMarshaller();
internal static GetNotebookMetadataRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetNotebookMetadataRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetNotebookMetadata operation
/// </summary>
public class GetNotebookMetadataResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetNotebookMetadataResponse response = new GetNotebookMetadataResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("NotebookMetadata", targetDepth))
{
var unmarshaller = NotebookMetadataUnmarshaller.Instance;
response.NotebookMetadata = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetNotebookMetadataResponseUnmarshaller _instance = new GetNotebookMetadataResponseUnmarshaller();
internal static GetNotebookMetadataResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetNotebookMetadataResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 118 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetPreparedStatement Request Marshaller
/// </summary>
public class GetPreparedStatementRequestMarshaller : IMarshaller<IRequest, GetPreparedStatementRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetPreparedStatementRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetPreparedStatementRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetPreparedStatement";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetStatementName())
{
context.Writer.WritePropertyName("StatementName");
context.Writer.Write(publicRequest.StatementName);
}
if(publicRequest.IsSetWorkGroup())
{
context.Writer.WritePropertyName("WorkGroup");
context.Writer.Write(publicRequest.WorkGroup);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetPreparedStatementRequestMarshaller _instance = new GetPreparedStatementRequestMarshaller();
internal static GetPreparedStatementRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetPreparedStatementRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 109 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetPreparedStatement operation
/// </summary>
public class GetPreparedStatementResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetPreparedStatementResponse response = new GetPreparedStatementResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PreparedStatement", targetDepth))
{
var unmarshaller = PreparedStatementUnmarshaller.Instance;
response.PreparedStatement = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetPreparedStatementResponseUnmarshaller _instance = new GetPreparedStatementResponseUnmarshaller();
internal static GetPreparedStatementResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetPreparedStatementResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 118 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetQueryExecution Request Marshaller
/// </summary>
public class GetQueryExecutionRequestMarshaller : IMarshaller<IRequest, GetQueryExecutionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetQueryExecutionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetQueryExecutionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetQueryExecution";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetQueryExecutionId())
{
context.Writer.WritePropertyName("QueryExecutionId");
context.Writer.Write(publicRequest.QueryExecutionId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetQueryExecutionRequestMarshaller _instance = new GetQueryExecutionRequestMarshaller();
internal static GetQueryExecutionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetQueryExecutionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 103 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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 GetQueryExecution operation
/// </summary>
public class GetQueryExecutionResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetQueryExecutionResponse response = new GetQueryExecutionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("QueryExecution", targetDepth))
{
var unmarshaller = QueryExecutionUnmarshaller.Instance;
response.QueryExecution = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequestException"))
{
return InvalidRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAthenaException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetQueryExecutionResponseUnmarshaller _instance = new GetQueryExecutionResponseUnmarshaller();
internal static GetQueryExecutionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetQueryExecutionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 114 |
aws-sdk-net
|
aws
|
C#
|
/*
* 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.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>
/// GetQueryResults Request Marshaller
/// </summary>
public class GetQueryResultsRequestMarshaller : IMarshaller<IRequest, GetQueryResultsRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetQueryResultsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetQueryResultsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.Athena");
string target = "AmazonAthena.GetQueryResults";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-05-18";
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.IsSetMaxResults())
{
context.Writer.WritePropertyName("MaxResults");
context.Writer.Write(publicRequest.MaxResults);
}
if(publicRequest.IsSetNextToken())
{
context.Writer.WritePropertyName("NextToken");
context.Writer.Write(publicRequest.NextToken);
}
if(publicRequest.IsSetQueryExecutionId())
{
context.Writer.WritePropertyName("QueryExecutionId");
context.Writer.Write(publicRequest.QueryExecutionId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetQueryResultsRequestMarshaller _instance = new GetQueryResultsRequestMarshaller();
internal static GetQueryResultsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetQueryResultsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 115 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.