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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Information about the EC2 instances that are to be sent the command, specified as
/// key-value pairs. Each <code>RunCommandTarget</code> block can include only one key,
/// but this key may specify multiple values.
/// </summary>
public partial class RunCommandTarget
{
private string _key;
private List<string> _values = new List<string>();
/// <summary>
/// Gets and sets the property Key.
/// <para>
/// Can be either <code>tag:</code> <i>tag-key</i> or <code>InstanceIds</code>.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=128)]
public string Key
{
get { return this._key; }
set { this._key = value; }
}
// Check to see if Key property is set
internal bool IsSetKey()
{
return this._key != null;
}
/// <summary>
/// Gets and sets the property Values.
/// <para>
/// If <code>Key</code> is <code>tag:</code> <i>tag-key</i>, <code>Values</code> is a
/// list of tag values. If <code>Key</code> is <code>InstanceIds</code>, <code>Values</code>
/// is a list of Amazon EC2 instance IDs.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=50)]
public List<string> Values
{
get { return this._values; }
set { this._values = value; }
}
// Check to see if Values property is set
internal bool IsSetValues()
{
return this._values != null && this._values.Count > 0;
}
}
} | 82 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Name/Value pair of a parameter to start execution of a SageMaker Model Building Pipeline.
/// </summary>
public partial class SageMakerPipelineParameter
{
private string _name;
private string _value;
/// <summary>
/// Gets and sets the property Name.
/// <para>
/// Name of parameter to start execution of a SageMaker Model Building Pipeline.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=256)]
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 Value.
/// <para>
/// Value of parameter to start execution of a SageMaker Model Building Pipeline.
/// </para>
/// </summary>
[AWSProperty(Required=true, Max=1024)]
public string Value
{
get { return this._value; }
set { this._value = value; }
}
// Check to see if Value property is set
internal bool IsSetValue()
{
return this._value != null;
}
}
} | 78 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// These are custom parameters to use when the target is a SageMaker Model Building Pipeline
/// that starts based on EventBridge events.
/// </summary>
public partial class SageMakerPipelineParameters
{
private List<SageMakerPipelineParameter> _pipelineParameterList = new List<SageMakerPipelineParameter>();
/// <summary>
/// Gets and sets the property PipelineParameterList.
/// <para>
/// List of Parameter names and values for SageMaker Model Building Pipeline execution.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=200)]
public List<SageMakerPipelineParameter> PipelineParameterList
{
get { return this._pipelineParameterList; }
set { this._pipelineParameterList = value; }
}
// Check to see if PipelineParameterList property is set
internal bool IsSetPipelineParameterList()
{
return this._pipelineParameterList != null && this._pipelineParameterList.Count > 0;
}
}
} | 59 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// This structure includes the custom parameter to be used when the target is an SQS
/// FIFO queue.
/// </summary>
public partial class SqsParameters
{
private string _messageGroupId;
/// <summary>
/// Gets and sets the property MessageGroupId.
/// <para>
/// The FIFO message group ID to use as the target.
/// </para>
/// </summary>
public string MessageGroupId
{
get { return this._messageGroupId; }
set { this._messageGroupId = value; }
}
// Check to see if MessageGroupId property is set
internal bool IsSetMessageGroupId()
{
return this._messageGroupId != null;
}
}
} | 58 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Container for the parameters to the StartReplay operation.
/// Starts the specified replay. Events are not necessarily replayed in the exact same
/// order that they were added to the archive. A replay processes events to replay based
/// on the time in the event, and replays them using 1 minute intervals. If you specify
/// an <code>EventStartTime</code> and an <code>EventEndTime</code> that covers a 20 minute
/// time range, the events are replayed from the first minute of that 20 minute range
/// first. Then the events from the second minute are replayed. You can use <code>DescribeReplay</code>
/// to determine the progress of a replay. The value returned for <code>EventLastReplayedTime</code>
/// indicates the time within the specified time range associated with the last event
/// replayed.
/// </summary>
public partial class StartReplayRequest : AmazonCloudWatchEventsRequest
{
private string _description;
private ReplayDestination _destination;
private DateTime? _eventEndTime;
private string _eventSourceArn;
private DateTime? _eventStartTime;
private string _replayName;
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// A description for the replay to start.
/// </para>
/// </summary>
[AWSProperty(Max=512)]
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 Destination.
/// <para>
/// A <code>ReplayDestination</code> object that includes details about the destination
/// for the replay.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public ReplayDestination Destination
{
get { return this._destination; }
set { this._destination = value; }
}
// Check to see if Destination property is set
internal bool IsSetDestination()
{
return this._destination != null;
}
/// <summary>
/// Gets and sets the property EventEndTime.
/// <para>
/// A time stamp for the time to stop replaying events. Only events that occurred between
/// the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public DateTime EventEndTime
{
get { return this._eventEndTime.GetValueOrDefault(); }
set { this._eventEndTime = value; }
}
// Check to see if EventEndTime property is set
internal bool IsSetEventEndTime()
{
return this._eventEndTime.HasValue;
}
/// <summary>
/// Gets and sets the property EventSourceArn.
/// <para>
/// The ARN of the archive to replay events from.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=1600)]
public string EventSourceArn
{
get { return this._eventSourceArn; }
set { this._eventSourceArn = value; }
}
// Check to see if EventSourceArn property is set
internal bool IsSetEventSourceArn()
{
return this._eventSourceArn != null;
}
/// <summary>
/// Gets and sets the property EventStartTime.
/// <para>
/// A time stamp for the time to start replaying events. Only events that occurred between
/// the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public DateTime EventStartTime
{
get { return this._eventStartTime.GetValueOrDefault(); }
set { this._eventStartTime = value; }
}
// Check to see if EventStartTime property is set
internal bool IsSetEventStartTime()
{
return this._eventStartTime.HasValue;
}
/// <summary>
/// Gets and sets the property ReplayName.
/// <para>
/// The name of the replay to start.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=64)]
public string ReplayName
{
get { return this._replayName; }
set { this._replayName = value; }
}
// Check to see if ReplayName property is set
internal bool IsSetReplayName()
{
return this._replayName != null;
}
}
} | 170 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// This is the response object from the StartReplay operation.
/// </summary>
public partial class StartReplayResponse : AmazonWebServiceResponse
{
private string _replayArn;
private DateTime? _replayStartTime;
private ReplayState _state;
private string _stateReason;
/// <summary>
/// Gets and sets the property ReplayArn.
/// <para>
/// The ARN of the replay.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1600)]
public string ReplayArn
{
get { return this._replayArn; }
set { this._replayArn = value; }
}
// Check to see if ReplayArn property is set
internal bool IsSetReplayArn()
{
return this._replayArn != null;
}
/// <summary>
/// Gets and sets the property ReplayStartTime.
/// <para>
/// The time at which the replay started.
/// </para>
/// </summary>
public DateTime ReplayStartTime
{
get { return this._replayStartTime.GetValueOrDefault(); }
set { this._replayStartTime = value; }
}
// Check to see if ReplayStartTime property is set
internal bool IsSetReplayStartTime()
{
return this._replayStartTime.HasValue;
}
/// <summary>
/// Gets and sets the property State.
/// <para>
/// The state of the replay.
/// </para>
/// </summary>
public ReplayState 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 StateReason.
/// <para>
/// The reason that the replay is in the state.
/// </para>
/// </summary>
[AWSProperty(Max=512)]
public string StateReason
{
get { return this._stateReason; }
set { this._stateReason = value; }
}
// Check to see if StateReason property is set
internal bool IsSetStateReason()
{
return this._stateReason != null;
}
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// A key-value pair associated with an Amazon Web Services resource. In EventBridge,
/// rules and event buses support tagging.
/// </summary>
public partial class Tag
{
private string _key;
private string _value;
/// <summary>
/// Gets and sets the property Key.
/// <para>
/// A string you can use to assign a value. The combination of tag keys and values can
/// help you organize and categorize your resources.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=128)]
public string Key
{
get { return this._key; }
set { this._key = value; }
}
// Check to see if Key property is set
internal bool IsSetKey()
{
return this._key != null;
}
/// <summary>
/// Gets and sets the property Value.
/// <para>
/// The value for the specified tag key.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=0, Max=256)]
public string Value
{
get { return this._value; }
set { this._value = value; }
}
// Check to see if Value property is set
internal bool IsSetValue()
{
return this._value != null;
}
}
} | 80 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Container for the parameters to the TagResource operation.
/// Assigns one or more tags (key-value pairs) to the specified EventBridge resource.
/// Tags can help you organize and categorize your resources. You can also use them to
/// scope user permissions by granting a user permission to access or change only resources
/// with certain tag values. In EventBridge, rules and event buses can be tagged.
///
///
/// <para>
/// Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly
/// as strings of characters.
/// </para>
///
/// <para>
/// You can use the <code>TagResource</code> action with a resource that already has tags.
/// If you specify a new tag key, this tag is appended to the list of tags associated
/// with the resource. If you specify a tag key that is already associated with the resource,
/// the new tag value that you specify replaces the previous value for that tag.
/// </para>
///
/// <para>
/// You can associate as many as 50 tags with a resource.
/// </para>
/// </summary>
public partial class TagResourceRequest : AmazonCloudWatchEventsRequest
{
private string _resourceARN;
private List<Tag> _tags = new List<Tag>();
/// <summary>
/// Gets and sets the property ResourceARN.
/// <para>
/// The ARN of the EventBridge resource that you're adding tags to.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=1600)]
public string ResourceARN
{
get { return this._resourceARN; }
set { this._resourceARN = value; }
}
// Check to see if ResourceARN property is set
internal bool IsSetResourceARN()
{
return this._resourceARN != null;
}
/// <summary>
/// Gets and sets the property Tags.
/// <para>
/// The list of key-value pairs to associate with the resource.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public List<Tag> Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
}
} | 99 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// This is the response object from the TagResource operation.
/// </summary>
public partial class TagResourceResponse : 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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Targets are the resources to be invoked when a rule is triggered. For a complete list
/// of services and resources that can be set as a target, see <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html">PutTargets</a>.
///
///
/// <para>
/// If you are setting the event bus of another account as the target, and that account
/// granted permission to your account through an organization instead of directly by
/// the account ID, then you must specify a <code>RoleArn</code> with proper permissions
/// in the <code>Target</code> structure. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html">Sending
/// and Receiving Events Between Amazon Web Services Accounts</a> in the <i>Amazon EventBridge
/// User Guide</i>.
/// </para>
/// </summary>
public partial class Target
{
private string _arn;
private BatchParameters _batchParameters;
private DeadLetterConfig _deadLetterConfig;
private EcsParameters _ecsParameters;
private HttpParameters _httpParameters;
private string _id;
private string _input;
private string _inputPath;
private InputTransformer _inputTransformer;
private KinesisParameters _kinesisParameters;
private RedshiftDataParameters _redshiftDataParameters;
private RetryPolicy _retryPolicy;
private string _roleArn;
private RunCommandParameters _runCommandParameters;
private SageMakerPipelineParameters _sageMakerPipelineParameters;
private SqsParameters _sqsParameters;
/// <summary>
/// Gets and sets the property Arn.
/// <para>
/// The Amazon Resource Name (ARN) of the target.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=1600)]
public string Arn
{
get { return this._arn; }
set { this._arn = value; }
}
// Check to see if Arn property is set
internal bool IsSetArn()
{
return this._arn != null;
}
/// <summary>
/// Gets and sets the property BatchParameters.
/// <para>
/// If the event target is an Batch job, this contains the job definition, job name, and
/// other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a>
/// in the <i>Batch User Guide</i>.
/// </para>
/// </summary>
public BatchParameters BatchParameters
{
get { return this._batchParameters; }
set { this._batchParameters = value; }
}
// Check to see if BatchParameters property is set
internal bool IsSetBatchParameters()
{
return this._batchParameters != null;
}
/// <summary>
/// Gets and sets the property DeadLetterConfig.
/// <para>
/// The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter
/// queue events to.
/// </para>
/// </summary>
public DeadLetterConfig DeadLetterConfig
{
get { return this._deadLetterConfig; }
set { this._deadLetterConfig = value; }
}
// Check to see if DeadLetterConfig property is set
internal bool IsSetDeadLetterConfig()
{
return this._deadLetterConfig != null;
}
/// <summary>
/// Gets and sets the property EcsParameters.
/// <para>
/// Contains the Amazon ECS task definition and task count to be used, if the event target
/// is an Amazon ECS task. For more information about Amazon ECS tasks, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task
/// Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.
/// </para>
/// </summary>
public EcsParameters EcsParameters
{
get { return this._ecsParameters; }
set { this._ecsParameters = value; }
}
// Check to see if EcsParameters property is set
internal bool IsSetEcsParameters()
{
return this._ecsParameters != null;
}
/// <summary>
/// Gets and sets the property HttpParameters.
/// <para>
/// Contains the HTTP parameters to use when the target is a API Gateway REST endpoint
/// or EventBridge ApiDestination.
/// </para>
///
/// <para>
/// If you specify an API Gateway REST API or EventBridge ApiDestination as a target,
/// you can use this parameter to specify headers, path parameters, and query string keys/values
/// as part of your target invoking request. If you're using ApiDestinations, the corresponding
/// Connection can also have these values configured. In case of any conflicting keys,
/// values from the Connection take precedence.
/// </para>
/// </summary>
public HttpParameters HttpParameters
{
get { return this._httpParameters; }
set { this._httpParameters = value; }
}
// Check to see if HttpParameters property is set
internal bool IsSetHttpParameters()
{
return this._httpParameters != null;
}
/// <summary>
/// Gets and sets the property Id.
/// <para>
/// The ID of the target. We recommend using a memorable and unique string.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=64)]
public string Id
{
get { return this._id; }
set { this._id = value; }
}
// Check to see if Id property is set
internal bool IsSetId()
{
return this._id != null;
}
/// <summary>
/// Gets and sets the property Input.
/// <para>
/// Valid JSON text passed to the target. In this case, nothing from the event itself
/// is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The
/// JavaScript Object Notation (JSON) Data Interchange Format</a>.
/// </para>
/// </summary>
[AWSProperty(Max=8192)]
public string Input
{
get { return this._input; }
set { this._input = value; }
}
// Check to see if Input property is set
internal bool IsSetInput()
{
return this._input != null;
}
/// <summary>
/// Gets and sets the property InputPath.
/// <para>
/// The value of the JSONPath that is used for extracting part of the matched event when
/// passing it to the target. You must use JSON dot notation, not bracket notation. For
/// more information about JSON paths, see <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.
/// </para>
/// </summary>
[AWSProperty(Max=256)]
public string InputPath
{
get { return this._inputPath; }
set { this._inputPath = value; }
}
// Check to see if InputPath property is set
internal bool IsSetInputPath()
{
return this._inputPath != null;
}
/// <summary>
/// Gets and sets the property InputTransformer.
/// <para>
/// Settings to enable you to provide custom input to a target based on certain event
/// data. You can extract one or more key-value pairs from the event and then use that
/// data to send customized input to the target.
/// </para>
/// </summary>
public InputTransformer InputTransformer
{
get { return this._inputTransformer; }
set { this._inputTransformer = value; }
}
// Check to see if InputTransformer property is set
internal bool IsSetInputTransformer()
{
return this._inputTransformer != null;
}
/// <summary>
/// Gets and sets the property KinesisParameters.
/// <para>
/// The custom parameter you can use to control the shard assignment, when the target
/// is a Kinesis data stream. If you do not include this parameter, the default is to
/// use the <code>eventId</code> as the partition key.
/// </para>
/// </summary>
public KinesisParameters KinesisParameters
{
get { return this._kinesisParameters; }
set { this._kinesisParameters = value; }
}
// Check to see if KinesisParameters property is set
internal bool IsSetKinesisParameters()
{
return this._kinesisParameters != null;
}
/// <summary>
/// Gets and sets the property RedshiftDataParameters.
/// <para>
/// Contains the Amazon Redshift Data API parameters to use when the target is a Amazon
/// Redshift cluster.
/// </para>
///
/// <para>
/// If you specify a Amazon Redshift Cluster as a Target, you can use this to specify
/// parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge
/// events.
/// </para>
/// </summary>
public RedshiftDataParameters RedshiftDataParameters
{
get { return this._redshiftDataParameters; }
set { this._redshiftDataParameters = value; }
}
// Check to see if RedshiftDataParameters property is set
internal bool IsSetRedshiftDataParameters()
{
return this._redshiftDataParameters != null;
}
/// <summary>
/// Gets and sets the property RetryPolicy.
/// <para>
/// The <code>RetryPolicy</code> object that contains the retry policy configuration to
/// use for the dead-letter queue.
/// </para>
/// </summary>
public RetryPolicy RetryPolicy
{
get { return this._retryPolicy; }
set { this._retryPolicy = value; }
}
// Check to see if RetryPolicy property is set
internal bool IsSetRetryPolicy()
{
return this._retryPolicy != null;
}
/// <summary>
/// Gets and sets the property RoleArn.
/// <para>
/// The Amazon Resource Name (ARN) of the IAM role to be used for this target when the
/// rule is triggered. If one rule triggers multiple targets, you can use a different
/// IAM role for each target.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1600)]
public string RoleArn
{
get { return this._roleArn; }
set { this._roleArn = value; }
}
// Check to see if RoleArn property is set
internal bool IsSetRoleArn()
{
return this._roleArn != null;
}
/// <summary>
/// Gets and sets the property RunCommandParameters.
/// <para>
/// Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
/// </para>
/// </summary>
public RunCommandParameters RunCommandParameters
{
get { return this._runCommandParameters; }
set { this._runCommandParameters = value; }
}
// Check to see if RunCommandParameters property is set
internal bool IsSetRunCommandParameters()
{
return this._runCommandParameters != null;
}
/// <summary>
/// Gets and sets the property SageMakerPipelineParameters.
/// <para>
/// Contains the SageMaker Model Building Pipeline parameters to start execution of a
/// SageMaker Model Building Pipeline.
/// </para>
///
/// <para>
/// If you specify a SageMaker Model Building Pipeline as a target, you can use this to
/// specify parameters to start a pipeline execution based on EventBridge events.
/// </para>
/// </summary>
public SageMakerPipelineParameters SageMakerPipelineParameters
{
get { return this._sageMakerPipelineParameters; }
set { this._sageMakerPipelineParameters = value; }
}
// Check to see if SageMakerPipelineParameters property is set
internal bool IsSetSageMakerPipelineParameters()
{
return this._sageMakerPipelineParameters != null;
}
/// <summary>
/// Gets and sets the property SqsParameters.
/// <para>
/// Contains the message group ID to use when the target is a FIFO queue.
/// </para>
///
/// <para>
/// If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication
/// enabled.
/// </para>
/// </summary>
public SqsParameters SqsParameters
{
get { return this._sqsParameters; }
set { this._sqsParameters = value; }
}
// Check to see if SqsParameters property is set
internal bool IsSetSqsParameters()
{
return this._sqsParameters != null;
}
}
} | 401 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Container for the parameters to the TestEventPattern operation.
/// Tests whether the specified event pattern matches the provided event.
///
///
/// <para>
/// Most services in Amazon Web Services treat : or / as the same character in Amazon
/// Resource Names (ARNs). However, EventBridge uses an exact match in event patterns
/// and rules. Be sure to use the correct ARN characters when creating event patterns
/// so that they match the ARN syntax in the event you want to match.
/// </para>
/// </summary>
public partial class TestEventPatternRequest : AmazonCloudWatchEventsRequest
{
private string _event;
private string _eventPattern;
/// <summary>
/// Gets and sets the property Event.
/// <para>
/// The event, in JSON format, to test against the event pattern. The JSON must follow
/// the format specified in <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/aws-events.html">Amazon
/// Web Services Events</a>, and the following fields are mandatory:
/// </para>
/// <ul> <li>
/// <para>
/// <code>id</code>
/// </para>
/// </li> <li>
/// <para>
/// <code>account</code>
/// </para>
/// </li> <li>
/// <para>
/// <code>source</code>
/// </para>
/// </li> <li>
/// <para>
/// <code>time</code>
/// </para>
/// </li> <li>
/// <para>
/// <code>region</code>
/// </para>
/// </li> <li>
/// <para>
/// <code>resources</code>
/// </para>
/// </li> <li>
/// <para>
/// <code>detail-type</code>
/// </para>
/// </li> </ul>
/// </summary>
[AWSProperty(Required=true)]
public string Event
{
get { return this._event; }
set { this._event = value; }
}
// Check to see if Event property is set
internal bool IsSetEvent()
{
return this._event != null;
}
/// <summary>
/// Gets and sets the property EventPattern.
/// <para>
/// The event pattern. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html">Events
/// and Event Patterns</a> in the <i>Amazon EventBridge User Guide</i>.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string EventPattern
{
get { return this._eventPattern; }
set { this._eventPattern = value; }
}
// Check to see if EventPattern property is set
internal bool IsSetEventPattern()
{
return this._eventPattern != 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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// This is the response object from the TestEventPattern operation.
/// </summary>
public partial class TestEventPatternResponse : AmazonWebServiceResponse
{
private bool? _result;
/// <summary>
/// Gets and sets the property Result.
/// <para>
/// Indicates whether the event matches the event pattern.
/// </para>
/// </summary>
public bool Result
{
get { return this._result.GetValueOrDefault(); }
set { this._result = value; }
}
// Check to see if Result property is set
internal bool IsSetResult()
{
return this._result.HasValue;
}
}
} | 57 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Container for the parameters to the UntagResource operation.
/// Removes one or more tags from the specified EventBridge resource. In Amazon EventBridge
/// (CloudWatch Events), rules and event buses can be tagged.
/// </summary>
public partial class UntagResourceRequest : AmazonCloudWatchEventsRequest
{
private string _resourceARN;
private List<string> _tagKeys = new List<string>();
/// <summary>
/// Gets and sets the property ResourceARN.
/// <para>
/// The ARN of the EventBridge resource from which you are removing tags.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=1600)]
public string ResourceARN
{
get { return this._resourceARN; }
set { this._resourceARN = value; }
}
// Check to see if ResourceARN property is set
internal bool IsSetResourceARN()
{
return this._resourceARN != null;
}
/// <summary>
/// Gets and sets the property TagKeys.
/// <para>
/// The list of tag keys to remove from the resource.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public List<string> TagKeys
{
get { return this._tagKeys; }
set { this._tagKeys = value; }
}
// Check to see if TagKeys property is set
internal bool IsSetTagKeys()
{
return this._tagKeys != null && this._tagKeys.Count > 0;
}
}
} | 80 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// This is the response object from the UntagResource operation.
/// </summary>
public partial class UntagResourceResponse : 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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Container for the parameters to the UpdateApiDestination operation.
/// Updates an API destination.
/// </summary>
public partial class UpdateApiDestinationRequest : AmazonCloudWatchEventsRequest
{
private string _connectionArn;
private string _description;
private ApiDestinationHttpMethod _httpMethod;
private string _invocationEndpoint;
private int? _invocationRateLimitPerSecond;
private string _name;
/// <summary>
/// Gets and sets the property ConnectionArn.
/// <para>
/// The ARN of the connection to use for the API destination.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1600)]
public string ConnectionArn
{
get { return this._connectionArn; }
set { this._connectionArn = value; }
}
// Check to see if ConnectionArn property is set
internal bool IsSetConnectionArn()
{
return this._connectionArn != null;
}
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// The name of the API destination to update.
/// </para>
/// </summary>
[AWSProperty(Max=512)]
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 HttpMethod.
/// <para>
/// The method to use for the API destination.
/// </para>
/// </summary>
public ApiDestinationHttpMethod HttpMethod
{
get { return this._httpMethod; }
set { this._httpMethod = value; }
}
// Check to see if HttpMethod property is set
internal bool IsSetHttpMethod()
{
return this._httpMethod != null;
}
/// <summary>
/// Gets and sets the property InvocationEndpoint.
/// <para>
/// The URL to the endpoint to use for the API destination.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=2048)]
public string InvocationEndpoint
{
get { return this._invocationEndpoint; }
set { this._invocationEndpoint = value; }
}
// Check to see if InvocationEndpoint property is set
internal bool IsSetInvocationEndpoint()
{
return this._invocationEndpoint != null;
}
/// <summary>
/// Gets and sets the property InvocationRateLimitPerSecond.
/// <para>
/// The maximum number of invocations per second to send to the API destination.
/// </para>
/// </summary>
[AWSProperty(Min=1)]
public int InvocationRateLimitPerSecond
{
get { return this._invocationRateLimitPerSecond.GetValueOrDefault(); }
set { this._invocationRateLimitPerSecond = value; }
}
// Check to see if InvocationRateLimitPerSecond property is set
internal bool IsSetInvocationRateLimitPerSecond()
{
return this._invocationRateLimitPerSecond.HasValue;
}
/// <summary>
/// Gets and sets the property Name.
/// <para>
/// The name of the API destination to update.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=64)]
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;
}
}
} | 158 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// This is the response object from the UpdateApiDestination operation.
/// </summary>
public partial class UpdateApiDestinationResponse : AmazonWebServiceResponse
{
private string _apiDestinationArn;
private ApiDestinationState _apiDestinationState;
private DateTime? _creationTime;
private DateTime? _lastModifiedTime;
/// <summary>
/// Gets and sets the property ApiDestinationArn.
/// <para>
/// The ARN of the API destination that was updated.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1600)]
public string ApiDestinationArn
{
get { return this._apiDestinationArn; }
set { this._apiDestinationArn = value; }
}
// Check to see if ApiDestinationArn property is set
internal bool IsSetApiDestinationArn()
{
return this._apiDestinationArn != null;
}
/// <summary>
/// Gets and sets the property ApiDestinationState.
/// <para>
/// The state of the API destination that was updated.
/// </para>
/// </summary>
public ApiDestinationState ApiDestinationState
{
get { return this._apiDestinationState; }
set { this._apiDestinationState = value; }
}
// Check to see if ApiDestinationState property is set
internal bool IsSetApiDestinationState()
{
return this._apiDestinationState != null;
}
/// <summary>
/// Gets and sets the property CreationTime.
/// <para>
/// A time stamp for the time that the API destination 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 LastModifiedTime.
/// <para>
/// A time stamp for the time that the API destination was last modified.
/// </para>
/// </summary>
public DateTime LastModifiedTime
{
get { return this._lastModifiedTime.GetValueOrDefault(); }
set { this._lastModifiedTime = value; }
}
// Check to see if LastModifiedTime property is set
internal bool IsSetLastModifiedTime()
{
return this._lastModifiedTime.HasValue;
}
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Container for the parameters to the UpdateArchive operation.
/// Updates the specified archive.
/// </summary>
public partial class UpdateArchiveRequest : AmazonCloudWatchEventsRequest
{
private string _archiveName;
private string _description;
private string _eventPattern;
private int? _retentionDays;
/// <summary>
/// Gets and sets the property ArchiveName.
/// <para>
/// The name of the archive to update.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=48)]
public string ArchiveName
{
get { return this._archiveName; }
set { this._archiveName = value; }
}
// Check to see if ArchiveName property is set
internal bool IsSetArchiveName()
{
return this._archiveName != null;
}
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// The description for the archive.
/// </para>
/// </summary>
[AWSProperty(Max=512)]
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 EventPattern.
/// <para>
/// The event pattern to use to filter events sent to the archive.
/// </para>
/// </summary>
public string EventPattern
{
get { return this._eventPattern; }
set { this._eventPattern = value; }
}
// Check to see if EventPattern property is set
internal bool IsSetEventPattern()
{
return this._eventPattern != null;
}
/// <summary>
/// Gets and sets the property RetentionDays.
/// <para>
/// The number of days to retain events in the archive.
/// </para>
/// </summary>
[AWSProperty(Min=0)]
public int RetentionDays
{
get { return this._retentionDays.GetValueOrDefault(); }
set { this._retentionDays = value; }
}
// Check to see if RetentionDays property is set
internal bool IsSetRetentionDays()
{
return this._retentionDays.HasValue;
}
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// This is the response object from the UpdateArchive operation.
/// </summary>
public partial class UpdateArchiveResponse : AmazonWebServiceResponse
{
private string _archiveArn;
private DateTime? _creationTime;
private ArchiveState _state;
private string _stateReason;
/// <summary>
/// Gets and sets the property ArchiveArn.
/// <para>
/// The ARN of the archive.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1600)]
public string ArchiveArn
{
get { return this._archiveArn; }
set { this._archiveArn = value; }
}
// Check to see if ArchiveArn property is set
internal bool IsSetArchiveArn()
{
return this._archiveArn != null;
}
/// <summary>
/// Gets and sets the property CreationTime.
/// <para>
/// The time at which the archive was updated.
/// </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 State.
/// <para>
/// The state of the archive.
/// </para>
/// </summary>
public ArchiveState 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 StateReason.
/// <para>
/// The reason that the archive is in the current state.
/// </para>
/// </summary>
[AWSProperty(Max=512)]
public string StateReason
{
get { return this._stateReason; }
set { this._stateReason = value; }
}
// Check to see if StateReason property is set
internal bool IsSetStateReason()
{
return this._stateReason != null;
}
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Contains the API key authorization parameters to use to update the connection.
/// </summary>
public partial class UpdateConnectionApiKeyAuthRequestParameters
{
private string _apiKeyName;
private string _apiKeyValue;
/// <summary>
/// Gets and sets the property ApiKeyName.
/// <para>
/// The name of the API key to use for authorization.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=512)]
public string ApiKeyName
{
get { return this._apiKeyName; }
set { this._apiKeyName = value; }
}
// Check to see if ApiKeyName property is set
internal bool IsSetApiKeyName()
{
return this._apiKeyName != null;
}
/// <summary>
/// Gets and sets the property ApiKeyValue.
/// <para>
/// The value associated with teh API key to use for authorization.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=512)]
public string ApiKeyValue
{
get { return this._apiKeyValue; }
set { this._apiKeyValue = value; }
}
// Check to see if ApiKeyValue property is set
internal bool IsSetApiKeyValue()
{
return this._apiKeyValue != null;
}
}
} | 78 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Contains the additional parameters to use for the connection.
/// </summary>
public partial class UpdateConnectionAuthRequestParameters
{
private UpdateConnectionApiKeyAuthRequestParameters _apiKeyAuthParameters;
private UpdateConnectionBasicAuthRequestParameters _basicAuthParameters;
private ConnectionHttpParameters _invocationHttpParameters;
private UpdateConnectionOAuthRequestParameters _oAuthParameters;
/// <summary>
/// Gets and sets the property ApiKeyAuthParameters.
/// <para>
/// A <code>UpdateConnectionApiKeyAuthRequestParameters</code> object that contains the
/// authorization parameters for API key authorization.
/// </para>
/// </summary>
public UpdateConnectionApiKeyAuthRequestParameters ApiKeyAuthParameters
{
get { return this._apiKeyAuthParameters; }
set { this._apiKeyAuthParameters = value; }
}
// Check to see if ApiKeyAuthParameters property is set
internal bool IsSetApiKeyAuthParameters()
{
return this._apiKeyAuthParameters != null;
}
/// <summary>
/// Gets and sets the property BasicAuthParameters.
/// <para>
/// A <code>UpdateConnectionBasicAuthRequestParameters</code> object that contains the
/// authorization parameters for Basic authorization.
/// </para>
/// </summary>
public UpdateConnectionBasicAuthRequestParameters BasicAuthParameters
{
get { return this._basicAuthParameters; }
set { this._basicAuthParameters = value; }
}
// Check to see if BasicAuthParameters property is set
internal bool IsSetBasicAuthParameters()
{
return this._basicAuthParameters != null;
}
/// <summary>
/// Gets and sets the property InvocationHttpParameters.
/// <para>
/// A <code>ConnectionHttpParameters</code> object that contains the additional parameters
/// to use for the connection.
/// </para>
/// </summary>
public ConnectionHttpParameters InvocationHttpParameters
{
get { return this._invocationHttpParameters; }
set { this._invocationHttpParameters = value; }
}
// Check to see if InvocationHttpParameters property is set
internal bool IsSetInvocationHttpParameters()
{
return this._invocationHttpParameters != null;
}
/// <summary>
/// Gets and sets the property OAuthParameters.
/// <para>
/// A <code>UpdateConnectionOAuthRequestParameters</code> object that contains the authorization
/// parameters for OAuth authorization.
/// </para>
/// </summary>
public UpdateConnectionOAuthRequestParameters OAuthParameters
{
get { return this._oAuthParameters; }
set { this._oAuthParameters = value; }
}
// Check to see if OAuthParameters property is set
internal bool IsSetOAuthParameters()
{
return this._oAuthParameters != 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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Contains the Basic authorization parameters for the connection.
/// </summary>
public partial class UpdateConnectionBasicAuthRequestParameters
{
private string _password;
private string _username;
/// <summary>
/// Gets and sets the property Password.
/// <para>
/// The password associated with the user name to use for Basic authorization.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=512)]
public string Password
{
get { return this._password; }
set { this._password = value; }
}
// Check to see if Password property is set
internal bool IsSetPassword()
{
return this._password != null;
}
/// <summary>
/// Gets and sets the property Username.
/// <para>
/// The user name to use for Basic authorization.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=512)]
public string Username
{
get { return this._username; }
set { this._username = value; }
}
// Check to see if Username property is set
internal bool IsSetUsername()
{
return this._username != null;
}
}
} | 78 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Contains the OAuth authorization parameters to use for the connection.
/// </summary>
public partial class UpdateConnectionOAuthClientRequestParameters
{
private string _clientID;
private string _clientSecret;
/// <summary>
/// Gets and sets the property ClientID.
/// <para>
/// The client ID to use for OAuth authorization.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=512)]
public string ClientID
{
get { return this._clientID; }
set { this._clientID = value; }
}
// Check to see if ClientID property is set
internal bool IsSetClientID()
{
return this._clientID != null;
}
/// <summary>
/// Gets and sets the property ClientSecret.
/// <para>
/// The client secret assciated with the client ID to use for OAuth authorization.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=512)]
public string ClientSecret
{
get { return this._clientSecret; }
set { this._clientSecret = value; }
}
// Check to see if ClientSecret property is set
internal bool IsSetClientSecret()
{
return this._clientSecret != null;
}
}
} | 78 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Contains the OAuth request parameters to use for the connection.
/// </summary>
public partial class UpdateConnectionOAuthRequestParameters
{
private string _authorizationEndpoint;
private UpdateConnectionOAuthClientRequestParameters _clientParameters;
private ConnectionOAuthHttpMethod _httpMethod;
private ConnectionHttpParameters _oAuthHttpParameters;
/// <summary>
/// Gets and sets the property AuthorizationEndpoint.
/// <para>
/// The URL to the authorization endpoint when OAuth is specified as the authorization
/// type.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=2048)]
public string AuthorizationEndpoint
{
get { return this._authorizationEndpoint; }
set { this._authorizationEndpoint = value; }
}
// Check to see if AuthorizationEndpoint property is set
internal bool IsSetAuthorizationEndpoint()
{
return this._authorizationEndpoint != null;
}
/// <summary>
/// Gets and sets the property ClientParameters.
/// <para>
/// A <code>UpdateConnectionOAuthClientRequestParameters</code> object that contains the
/// client parameters to use for the connection when OAuth is specified as the authorization
/// type.
/// </para>
/// </summary>
public UpdateConnectionOAuthClientRequestParameters ClientParameters
{
get { return this._clientParameters; }
set { this._clientParameters = value; }
}
// Check to see if ClientParameters property is set
internal bool IsSetClientParameters()
{
return this._clientParameters != null;
}
/// <summary>
/// Gets and sets the property HttpMethod.
/// <para>
/// The method used to connect to the HTTP endpoint.
/// </para>
/// </summary>
public ConnectionOAuthHttpMethod HttpMethod
{
get { return this._httpMethod; }
set { this._httpMethod = value; }
}
// Check to see if HttpMethod property is set
internal bool IsSetHttpMethod()
{
return this._httpMethod != null;
}
/// <summary>
/// Gets and sets the property OAuthHttpParameters.
/// <para>
/// The additional HTTP parameters used for the OAuth authorization request.
/// </para>
/// </summary>
public ConnectionHttpParameters OAuthHttpParameters
{
get { return this._oAuthHttpParameters; }
set { this._oAuthHttpParameters = value; }
}
// Check to see if OAuthHttpParameters property is set
internal bool IsSetOAuthHttpParameters()
{
return this._oAuthHttpParameters != 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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// Container for the parameters to the UpdateConnection operation.
/// Updates settings for a connection.
/// </summary>
public partial class UpdateConnectionRequest : AmazonCloudWatchEventsRequest
{
private ConnectionAuthorizationType _authorizationType;
private UpdateConnectionAuthRequestParameters _authParameters;
private string _description;
private string _name;
/// <summary>
/// Gets and sets the property AuthorizationType.
/// <para>
/// The type of authorization to use for the connection.
/// </para>
/// </summary>
public ConnectionAuthorizationType AuthorizationType
{
get { return this._authorizationType; }
set { this._authorizationType = value; }
}
// Check to see if AuthorizationType property is set
internal bool IsSetAuthorizationType()
{
return this._authorizationType != null;
}
/// <summary>
/// Gets and sets the property AuthParameters.
/// <para>
/// The authorization parameters to use for the connection.
/// </para>
/// </summary>
public UpdateConnectionAuthRequestParameters AuthParameters
{
get { return this._authParameters; }
set { this._authParameters = value; }
}
// Check to see if AuthParameters property is set
internal bool IsSetAuthParameters()
{
return this._authParameters != null;
}
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// A description for the connection.
/// </para>
/// </summary>
[AWSProperty(Max=512)]
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 name of the connection to update.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=64)]
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;
}
}
} | 117 |
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 events-2015-10-07.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.CloudWatchEvents.Model
{
/// <summary>
/// This is the response object from the UpdateConnection operation.
/// </summary>
public partial class UpdateConnectionResponse : AmazonWebServiceResponse
{
private string _connectionArn;
private ConnectionState _connectionState;
private DateTime? _creationTime;
private DateTime? _lastAuthorizedTime;
private DateTime? _lastModifiedTime;
/// <summary>
/// Gets and sets the property ConnectionArn.
/// <para>
/// The ARN of the connection that was updated.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1600)]
public string ConnectionArn
{
get { return this._connectionArn; }
set { this._connectionArn = value; }
}
// Check to see if ConnectionArn property is set
internal bool IsSetConnectionArn()
{
return this._connectionArn != null;
}
/// <summary>
/// Gets and sets the property ConnectionState.
/// <para>
/// The state of the connection that was updated.
/// </para>
/// </summary>
public ConnectionState ConnectionState
{
get { return this._connectionState; }
set { this._connectionState = value; }
}
// Check to see if ConnectionState property is set
internal bool IsSetConnectionState()
{
return this._connectionState != null;
}
/// <summary>
/// Gets and sets the property CreationTime.
/// <para>
/// A time stamp for the time that the connection 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 LastAuthorizedTime.
/// <para>
/// A time stamp for the time that the connection was last authorized.
/// </para>
/// </summary>
public DateTime LastAuthorizedTime
{
get { return this._lastAuthorizedTime.GetValueOrDefault(); }
set { this._lastAuthorizedTime = value; }
}
// Check to see if LastAuthorizedTime property is set
internal bool IsSetLastAuthorizedTime()
{
return this._lastAuthorizedTime.HasValue;
}
/// <summary>
/// Gets and sets the property LastModifiedTime.
/// <para>
/// A time stamp for the time that the connection was last modified.
/// </para>
/// </summary>
public DateTime LastModifiedTime
{
get { return this._lastModifiedTime.GetValueOrDefault(); }
set { this._lastModifiedTime = value; }
}
// Check to see if LastModifiedTime property is set
internal bool IsSetLastModifiedTime()
{
return this._lastModifiedTime.HasValue;
}
}
} | 134 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// ActivateEventSource Request Marshaller
/// </summary>
public class ActivateEventSourceRequestMarshaller : IMarshaller<IRequest, ActivateEventSourceRequest> , 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((ActivateEventSourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ActivateEventSourceRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.ActivateEventSource";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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 ActivateEventSourceRequestMarshaller _instance = new ActivateEventSourceRequestMarshaller();
internal static ActivateEventSourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ActivateEventSourceRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ActivateEventSource operation
/// </summary>
public class ActivateEventSourceResponseUnmarshaller : 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)
{
ActivateEventSourceResponse response = new ActivateEventSourceResponse();
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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidStateException"))
{
return InvalidStateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OperationDisabledException"))
{
return OperationDisabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ActivateEventSourceResponseUnmarshaller _instance = new ActivateEventSourceResponseUnmarshaller();
internal static ActivateEventSourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ActivateEventSourceResponseUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ApiDestination Object
/// </summary>
public class ApiDestinationUnmarshaller : IUnmarshaller<ApiDestination, XmlUnmarshallerContext>, IUnmarshaller<ApiDestination, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ApiDestination IUnmarshaller<ApiDestination, 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 ApiDestination Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ApiDestination unmarshalledObject = new ApiDestination();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ApiDestinationArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ApiDestinationArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ApiDestinationState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ApiDestinationState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConnectionArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ConnectionArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("HttpMethod", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.HttpMethod = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InvocationEndpoint", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.InvocationEndpoint = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InvocationRateLimitPerSecond", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.InvocationRateLimitPerSecond = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastModifiedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.LastModifiedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ApiDestinationUnmarshaller _instance = new ApiDestinationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ApiDestinationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 140 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Archive Object
/// </summary>
public class ArchiveUnmarshaller : IUnmarshaller<Archive, XmlUnmarshallerContext>, IUnmarshaller<Archive, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Archive IUnmarshaller<Archive, 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 Archive Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Archive unmarshalledObject = new Archive();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ArchiveName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ArchiveName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EventCount", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.EventCount = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EventSourceArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EventSourceArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RetentionDays", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.RetentionDays = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SizeBytes", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.SizeBytes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("State", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.State = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StateReason", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StateReason = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ArchiveUnmarshaller _instance = new ArchiveUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ArchiveUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 134 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// AwsVpcConfiguration Marshaller
/// </summary>
public class AwsVpcConfigurationMarshaller : IRequestMarshaller<AwsVpcConfiguration, 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(AwsVpcConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAssignPublicIp())
{
context.Writer.WritePropertyName("AssignPublicIp");
context.Writer.Write(requestObject.AssignPublicIp);
}
if(requestObject.IsSetSecurityGroups())
{
context.Writer.WritePropertyName("SecurityGroups");
context.Writer.WriteArrayStart();
foreach(var requestObjectSecurityGroupsListValue in requestObject.SecurityGroups)
{
context.Writer.Write(requestObjectSecurityGroupsListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetSubnets())
{
context.Writer.WritePropertyName("Subnets");
context.Writer.WriteArrayStart();
foreach(var requestObjectSubnetsListValue in requestObject.Subnets)
{
context.Writer.Write(requestObjectSubnetsListValue);
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static AwsVpcConfigurationMarshaller Instance = new AwsVpcConfigurationMarshaller();
}
} | 84 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for AwsVpcConfiguration Object
/// </summary>
public class AwsVpcConfigurationUnmarshaller : IUnmarshaller<AwsVpcConfiguration, XmlUnmarshallerContext>, IUnmarshaller<AwsVpcConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
AwsVpcConfiguration IUnmarshaller<AwsVpcConfiguration, 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 AwsVpcConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
AwsVpcConfiguration unmarshalledObject = new AwsVpcConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AssignPublicIp", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AssignPublicIp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SecurityGroups", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.SecurityGroups = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Subnets", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.Subnets = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static AwsVpcConfigurationUnmarshaller _instance = new AwsVpcConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AwsVpcConfigurationUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// BatchArrayProperties Marshaller
/// </summary>
public class BatchArrayPropertiesMarshaller : IRequestMarshaller<BatchArrayProperties, 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(BatchArrayProperties requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetSize())
{
context.Writer.WritePropertyName("Size");
context.Writer.Write(requestObject.Size);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BatchArrayPropertiesMarshaller Instance = new BatchArrayPropertiesMarshaller();
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BatchArrayProperties Object
/// </summary>
public class BatchArrayPropertiesUnmarshaller : IUnmarshaller<BatchArrayProperties, XmlUnmarshallerContext>, IUnmarshaller<BatchArrayProperties, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BatchArrayProperties IUnmarshaller<BatchArrayProperties, 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 BatchArrayProperties Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BatchArrayProperties unmarshalledObject = new BatchArrayProperties();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Size", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Size = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BatchArrayPropertiesUnmarshaller _instance = new BatchArrayPropertiesUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchArrayPropertiesUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// BatchParameters Marshaller
/// </summary>
public class BatchParametersMarshaller : IRequestMarshaller<BatchParameters, 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(BatchParameters requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetArrayProperties())
{
context.Writer.WritePropertyName("ArrayProperties");
context.Writer.WriteObjectStart();
var marshaller = BatchArrayPropertiesMarshaller.Instance;
marshaller.Marshall(requestObject.ArrayProperties, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetJobDefinition())
{
context.Writer.WritePropertyName("JobDefinition");
context.Writer.Write(requestObject.JobDefinition);
}
if(requestObject.IsSetJobName())
{
context.Writer.WritePropertyName("JobName");
context.Writer.Write(requestObject.JobName);
}
if(requestObject.IsSetRetryStrategy())
{
context.Writer.WritePropertyName("RetryStrategy");
context.Writer.WriteObjectStart();
var marshaller = BatchRetryStrategyMarshaller.Instance;
marshaller.Marshall(requestObject.RetryStrategy, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BatchParametersMarshaller Instance = new BatchParametersMarshaller();
}
} | 90 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BatchParameters Object
/// </summary>
public class BatchParametersUnmarshaller : IUnmarshaller<BatchParameters, XmlUnmarshallerContext>, IUnmarshaller<BatchParameters, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BatchParameters IUnmarshaller<BatchParameters, 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 BatchParameters Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BatchParameters unmarshalledObject = new BatchParameters();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ArrayProperties", targetDepth))
{
var unmarshaller = BatchArrayPropertiesUnmarshaller.Instance;
unmarshalledObject.ArrayProperties = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("JobDefinition", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.JobDefinition = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("JobName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.JobName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RetryStrategy", targetDepth))
{
var unmarshaller = BatchRetryStrategyUnmarshaller.Instance;
unmarshalledObject.RetryStrategy = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BatchParametersUnmarshaller _instance = new BatchParametersUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchParametersUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// BatchRetryStrategy Marshaller
/// </summary>
public class BatchRetryStrategyMarshaller : IRequestMarshaller<BatchRetryStrategy, 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(BatchRetryStrategy requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAttempts())
{
context.Writer.WritePropertyName("Attempts");
context.Writer.Write(requestObject.Attempts);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BatchRetryStrategyMarshaller Instance = new BatchRetryStrategyMarshaller();
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BatchRetryStrategy Object
/// </summary>
public class BatchRetryStrategyUnmarshaller : IUnmarshaller<BatchRetryStrategy, XmlUnmarshallerContext>, IUnmarshaller<BatchRetryStrategy, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BatchRetryStrategy IUnmarshaller<BatchRetryStrategy, 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 BatchRetryStrategy Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BatchRetryStrategy unmarshalledObject = new BatchRetryStrategy();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Attempts", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Attempts = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BatchRetryStrategyUnmarshaller _instance = new BatchRetryStrategyUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchRetryStrategyUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CancelReplay Request Marshaller
/// </summary>
public class CancelReplayRequestMarshaller : IMarshaller<IRequest, CancelReplayRequest> , 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((CancelReplayRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CancelReplayRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.CancelReplay";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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.IsSetReplayName())
{
context.Writer.WritePropertyName("ReplayName");
context.Writer.Write(publicRequest.ReplayName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CancelReplayRequestMarshaller _instance = new CancelReplayRequestMarshaller();
internal static CancelReplayRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CancelReplayRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CancelReplay operation
/// </summary>
public class CancelReplayResponseUnmarshaller : 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)
{
CancelReplayResponse response = new CancelReplayResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ReplayArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ReplayArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("State", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.State = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StateReason", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.StateReason = 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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalStatusException"))
{
return IllegalStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CancelReplayResponseUnmarshaller _instance = new CancelReplayResponseUnmarshaller();
internal static CancelReplayResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CancelReplayResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 134 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CapacityProviderStrategyItem Marshaller
/// </summary>
public class CapacityProviderStrategyItemMarshaller : IRequestMarshaller<CapacityProviderStrategyItem, 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(CapacityProviderStrategyItem requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetBase())
{
context.Writer.WritePropertyName("base");
context.Writer.Write(requestObject.Base);
}
if(requestObject.IsSetCapacityProvider())
{
context.Writer.WritePropertyName("capacityProvider");
context.Writer.Write(requestObject.CapacityProvider);
}
if(requestObject.IsSetWeight())
{
context.Writer.WritePropertyName("weight");
context.Writer.Write(requestObject.Weight);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CapacityProviderStrategyItemMarshaller Instance = new CapacityProviderStrategyItemMarshaller();
}
} | 74 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CapacityProviderStrategyItem Object
/// </summary>
public class CapacityProviderStrategyItemUnmarshaller : IUnmarshaller<CapacityProviderStrategyItem, XmlUnmarshallerContext>, IUnmarshaller<CapacityProviderStrategyItem, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CapacityProviderStrategyItem IUnmarshaller<CapacityProviderStrategyItem, 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 CapacityProviderStrategyItem Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CapacityProviderStrategyItem unmarshalledObject = new CapacityProviderStrategyItem();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("base", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Base = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("capacityProvider", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CapacityProvider = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("weight", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Weight = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CapacityProviderStrategyItemUnmarshaller _instance = new CapacityProviderStrategyItemUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CapacityProviderStrategyItemUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConcurrentModificationException Object
/// </summary>
public class ConcurrentModificationExceptionUnmarshaller : IErrorResponseUnmarshaller<ConcurrentModificationException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ConcurrentModificationException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public ConcurrentModificationException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
ConcurrentModificationException unmarshalledObject = new ConcurrentModificationException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static ConcurrentModificationExceptionUnmarshaller _instance = new ConcurrentModificationExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConcurrentModificationExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 85 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Condition Marshaller
/// </summary>
public class ConditionMarshaller : IRequestMarshaller<Condition, 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(Condition requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetKey())
{
context.Writer.WritePropertyName("Key");
context.Writer.Write(requestObject.Key);
}
if(requestObject.IsSetType())
{
context.Writer.WritePropertyName("Type");
context.Writer.Write(requestObject.Type);
}
if(requestObject.IsSetValue())
{
context.Writer.WritePropertyName("Value");
context.Writer.Write(requestObject.Value);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ConditionMarshaller Instance = new ConditionMarshaller();
}
} | 74 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConnectionApiKeyAuthResponseParameters Object
/// </summary>
public class ConnectionApiKeyAuthResponseParametersUnmarshaller : IUnmarshaller<ConnectionApiKeyAuthResponseParameters, XmlUnmarshallerContext>, IUnmarshaller<ConnectionApiKeyAuthResponseParameters, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ConnectionApiKeyAuthResponseParameters IUnmarshaller<ConnectionApiKeyAuthResponseParameters, 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 ConnectionApiKeyAuthResponseParameters Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ConnectionApiKeyAuthResponseParameters unmarshalledObject = new ConnectionApiKeyAuthResponseParameters();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ApiKeyName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ApiKeyName = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ConnectionApiKeyAuthResponseParametersUnmarshaller _instance = new ConnectionApiKeyAuthResponseParametersUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConnectionApiKeyAuthResponseParametersUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConnectionAuthResponseParameters Object
/// </summary>
public class ConnectionAuthResponseParametersUnmarshaller : IUnmarshaller<ConnectionAuthResponseParameters, XmlUnmarshallerContext>, IUnmarshaller<ConnectionAuthResponseParameters, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ConnectionAuthResponseParameters IUnmarshaller<ConnectionAuthResponseParameters, 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 ConnectionAuthResponseParameters Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ConnectionAuthResponseParameters unmarshalledObject = new ConnectionAuthResponseParameters();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ApiKeyAuthParameters", targetDepth))
{
var unmarshaller = ConnectionApiKeyAuthResponseParametersUnmarshaller.Instance;
unmarshalledObject.ApiKeyAuthParameters = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("BasicAuthParameters", targetDepth))
{
var unmarshaller = ConnectionBasicAuthResponseParametersUnmarshaller.Instance;
unmarshalledObject.BasicAuthParameters = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InvocationHttpParameters", targetDepth))
{
var unmarshaller = ConnectionHttpParametersUnmarshaller.Instance;
unmarshalledObject.InvocationHttpParameters = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("OAuthParameters", targetDepth))
{
var unmarshaller = ConnectionOAuthResponseParametersUnmarshaller.Instance;
unmarshalledObject.OAuthParameters = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ConnectionAuthResponseParametersUnmarshaller _instance = new ConnectionAuthResponseParametersUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConnectionAuthResponseParametersUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConnectionBasicAuthResponseParameters Object
/// </summary>
public class ConnectionBasicAuthResponseParametersUnmarshaller : IUnmarshaller<ConnectionBasicAuthResponseParameters, XmlUnmarshallerContext>, IUnmarshaller<ConnectionBasicAuthResponseParameters, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ConnectionBasicAuthResponseParameters IUnmarshaller<ConnectionBasicAuthResponseParameters, 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 ConnectionBasicAuthResponseParameters Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ConnectionBasicAuthResponseParameters unmarshalledObject = new ConnectionBasicAuthResponseParameters();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Username", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Username = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ConnectionBasicAuthResponseParametersUnmarshaller _instance = new ConnectionBasicAuthResponseParametersUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConnectionBasicAuthResponseParametersUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// ConnectionBodyParameter Marshaller
/// </summary>
public class ConnectionBodyParameterMarshaller : IRequestMarshaller<ConnectionBodyParameter, 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(ConnectionBodyParameter requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetIsValueSecret())
{
context.Writer.WritePropertyName("IsValueSecret");
context.Writer.Write(requestObject.IsValueSecret);
}
if(requestObject.IsSetKey())
{
context.Writer.WritePropertyName("Key");
context.Writer.Write(requestObject.Key);
}
if(requestObject.IsSetValue())
{
context.Writer.WritePropertyName("Value");
context.Writer.Write(requestObject.Value);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ConnectionBodyParameterMarshaller Instance = new ConnectionBodyParameterMarshaller();
}
} | 74 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConnectionBodyParameter Object
/// </summary>
public class ConnectionBodyParameterUnmarshaller : IUnmarshaller<ConnectionBodyParameter, XmlUnmarshallerContext>, IUnmarshaller<ConnectionBodyParameter, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ConnectionBodyParameter IUnmarshaller<ConnectionBodyParameter, 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 ConnectionBodyParameter Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ConnectionBodyParameter unmarshalledObject = new ConnectionBodyParameter();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("IsValueSecret", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.IsValueSecret = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Key", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Key = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Value", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Value = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ConnectionBodyParameterUnmarshaller _instance = new ConnectionBodyParameterUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConnectionBodyParameterUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// ConnectionHeaderParameter Marshaller
/// </summary>
public class ConnectionHeaderParameterMarshaller : IRequestMarshaller<ConnectionHeaderParameter, 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(ConnectionHeaderParameter requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetIsValueSecret())
{
context.Writer.WritePropertyName("IsValueSecret");
context.Writer.Write(requestObject.IsValueSecret);
}
if(requestObject.IsSetKey())
{
context.Writer.WritePropertyName("Key");
context.Writer.Write(requestObject.Key);
}
if(requestObject.IsSetValue())
{
context.Writer.WritePropertyName("Value");
context.Writer.Write(requestObject.Value);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ConnectionHeaderParameterMarshaller Instance = new ConnectionHeaderParameterMarshaller();
}
} | 74 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConnectionHeaderParameter Object
/// </summary>
public class ConnectionHeaderParameterUnmarshaller : IUnmarshaller<ConnectionHeaderParameter, XmlUnmarshallerContext>, IUnmarshaller<ConnectionHeaderParameter, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ConnectionHeaderParameter IUnmarshaller<ConnectionHeaderParameter, 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 ConnectionHeaderParameter Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ConnectionHeaderParameter unmarshalledObject = new ConnectionHeaderParameter();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("IsValueSecret", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.IsValueSecret = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Key", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Key = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Value", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Value = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ConnectionHeaderParameterUnmarshaller _instance = new ConnectionHeaderParameterUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConnectionHeaderParameterUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// ConnectionHttpParameters Marshaller
/// </summary>
public class ConnectionHttpParametersMarshaller : IRequestMarshaller<ConnectionHttpParameters, 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(ConnectionHttpParameters requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetBodyParameters())
{
context.Writer.WritePropertyName("BodyParameters");
context.Writer.WriteArrayStart();
foreach(var requestObjectBodyParametersListValue in requestObject.BodyParameters)
{
context.Writer.WriteObjectStart();
var marshaller = ConnectionBodyParameterMarshaller.Instance;
marshaller.Marshall(requestObjectBodyParametersListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetHeaderParameters())
{
context.Writer.WritePropertyName("HeaderParameters");
context.Writer.WriteArrayStart();
foreach(var requestObjectHeaderParametersListValue in requestObject.HeaderParameters)
{
context.Writer.WriteObjectStart();
var marshaller = ConnectionHeaderParameterMarshaller.Instance;
marshaller.Marshall(requestObjectHeaderParametersListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetQueryStringParameters())
{
context.Writer.WritePropertyName("QueryStringParameters");
context.Writer.WriteArrayStart();
foreach(var requestObjectQueryStringParametersListValue in requestObject.QueryStringParameters)
{
context.Writer.WriteObjectStart();
var marshaller = ConnectionQueryStringParameterMarshaller.Instance;
marshaller.Marshall(requestObjectQueryStringParametersListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ConnectionHttpParametersMarshaller Instance = new ConnectionHttpParametersMarshaller();
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConnectionHttpParameters Object
/// </summary>
public class ConnectionHttpParametersUnmarshaller : IUnmarshaller<ConnectionHttpParameters, XmlUnmarshallerContext>, IUnmarshaller<ConnectionHttpParameters, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ConnectionHttpParameters IUnmarshaller<ConnectionHttpParameters, 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 ConnectionHttpParameters Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ConnectionHttpParameters unmarshalledObject = new ConnectionHttpParameters();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("BodyParameters", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ConnectionBodyParameter, ConnectionBodyParameterUnmarshaller>(ConnectionBodyParameterUnmarshaller.Instance);
unmarshalledObject.BodyParameters = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("HeaderParameters", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ConnectionHeaderParameter, ConnectionHeaderParameterUnmarshaller>(ConnectionHeaderParameterUnmarshaller.Instance);
unmarshalledObject.HeaderParameters = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("QueryStringParameters", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ConnectionQueryStringParameter, ConnectionQueryStringParameterUnmarshaller>(ConnectionQueryStringParameterUnmarshaller.Instance);
unmarshalledObject.QueryStringParameters = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ConnectionHttpParametersUnmarshaller _instance = new ConnectionHttpParametersUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConnectionHttpParametersUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConnectionOAuthClientResponseParameters Object
/// </summary>
public class ConnectionOAuthClientResponseParametersUnmarshaller : IUnmarshaller<ConnectionOAuthClientResponseParameters, XmlUnmarshallerContext>, IUnmarshaller<ConnectionOAuthClientResponseParameters, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ConnectionOAuthClientResponseParameters IUnmarshaller<ConnectionOAuthClientResponseParameters, 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 ConnectionOAuthClientResponseParameters Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ConnectionOAuthClientResponseParameters unmarshalledObject = new ConnectionOAuthClientResponseParameters();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ClientID", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ClientID = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ConnectionOAuthClientResponseParametersUnmarshaller _instance = new ConnectionOAuthClientResponseParametersUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConnectionOAuthClientResponseParametersUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConnectionOAuthResponseParameters Object
/// </summary>
public class ConnectionOAuthResponseParametersUnmarshaller : IUnmarshaller<ConnectionOAuthResponseParameters, XmlUnmarshallerContext>, IUnmarshaller<ConnectionOAuthResponseParameters, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ConnectionOAuthResponseParameters IUnmarshaller<ConnectionOAuthResponseParameters, 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 ConnectionOAuthResponseParameters Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ConnectionOAuthResponseParameters unmarshalledObject = new ConnectionOAuthResponseParameters();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AuthorizationEndpoint", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AuthorizationEndpoint = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ClientParameters", targetDepth))
{
var unmarshaller = ConnectionOAuthClientResponseParametersUnmarshaller.Instance;
unmarshalledObject.ClientParameters = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("HttpMethod", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.HttpMethod = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("OAuthHttpParameters", targetDepth))
{
var unmarshaller = ConnectionHttpParametersUnmarshaller.Instance;
unmarshalledObject.OAuthHttpParameters = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ConnectionOAuthResponseParametersUnmarshaller _instance = new ConnectionOAuthResponseParametersUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConnectionOAuthResponseParametersUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// ConnectionQueryStringParameter Marshaller
/// </summary>
public class ConnectionQueryStringParameterMarshaller : IRequestMarshaller<ConnectionQueryStringParameter, 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(ConnectionQueryStringParameter requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetIsValueSecret())
{
context.Writer.WritePropertyName("IsValueSecret");
context.Writer.Write(requestObject.IsValueSecret);
}
if(requestObject.IsSetKey())
{
context.Writer.WritePropertyName("Key");
context.Writer.Write(requestObject.Key);
}
if(requestObject.IsSetValue())
{
context.Writer.WritePropertyName("Value");
context.Writer.Write(requestObject.Value);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ConnectionQueryStringParameterMarshaller Instance = new ConnectionQueryStringParameterMarshaller();
}
} | 74 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConnectionQueryStringParameter Object
/// </summary>
public class ConnectionQueryStringParameterUnmarshaller : IUnmarshaller<ConnectionQueryStringParameter, XmlUnmarshallerContext>, IUnmarshaller<ConnectionQueryStringParameter, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ConnectionQueryStringParameter IUnmarshaller<ConnectionQueryStringParameter, 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 ConnectionQueryStringParameter Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ConnectionQueryStringParameter unmarshalledObject = new ConnectionQueryStringParameter();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("IsValueSecret", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.IsValueSecret = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Key", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Key = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Value", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Value = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ConnectionQueryStringParameterUnmarshaller _instance = new ConnectionQueryStringParameterUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConnectionQueryStringParameterUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Connection Object
/// </summary>
public class ConnectionUnmarshaller : IUnmarshaller<Connection, XmlUnmarshallerContext>, IUnmarshaller<Connection, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Connection IUnmarshaller<Connection, 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 Connection Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Connection unmarshalledObject = new Connection();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AuthorizationType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AuthorizationType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConnectionArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ConnectionArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConnectionState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ConnectionState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastAuthorizedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.LastAuthorizedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastModifiedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.LastModifiedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StateReason", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StateReason = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ConnectionUnmarshaller _instance = new ConnectionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConnectionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 134 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateApiDestination Request Marshaller
/// </summary>
public class CreateApiDestinationRequestMarshaller : IMarshaller<IRequest, CreateApiDestinationRequest> , 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((CreateApiDestinationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateApiDestinationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.CreateApiDestination";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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.IsSetConnectionArn())
{
context.Writer.WritePropertyName("ConnectionArn");
context.Writer.Write(publicRequest.ConnectionArn);
}
if(publicRequest.IsSetDescription())
{
context.Writer.WritePropertyName("Description");
context.Writer.Write(publicRequest.Description);
}
if(publicRequest.IsSetHttpMethod())
{
context.Writer.WritePropertyName("HttpMethod");
context.Writer.Write(publicRequest.HttpMethod);
}
if(publicRequest.IsSetInvocationEndpoint())
{
context.Writer.WritePropertyName("InvocationEndpoint");
context.Writer.Write(publicRequest.InvocationEndpoint);
}
if(publicRequest.IsSetInvocationRateLimitPerSecond())
{
context.Writer.WritePropertyName("InvocationRateLimitPerSecond");
context.Writer.Write(publicRequest.InvocationRateLimitPerSecond);
}
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 CreateApiDestinationRequestMarshaller _instance = new CreateApiDestinationRequestMarshaller();
internal static CreateApiDestinationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateApiDestinationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 133 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateApiDestination operation
/// </summary>
public class CreateApiDestinationResponseUnmarshaller : 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)
{
CreateApiDestinationResponse response = new CreateApiDestinationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ApiDestinationArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ApiDestinationArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ApiDestinationState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ApiDestinationState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastModifiedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.LastModifiedTime = 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("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException"))
{
return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateApiDestinationResponseUnmarshaller _instance = new CreateApiDestinationResponseUnmarshaller();
internal static CreateApiDestinationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateApiDestinationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 140 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateArchive Request Marshaller
/// </summary>
public class CreateArchiveRequestMarshaller : IMarshaller<IRequest, CreateArchiveRequest> , 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((CreateArchiveRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateArchiveRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.CreateArchive";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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.IsSetArchiveName())
{
context.Writer.WritePropertyName("ArchiveName");
context.Writer.Write(publicRequest.ArchiveName);
}
if(publicRequest.IsSetDescription())
{
context.Writer.WritePropertyName("Description");
context.Writer.Write(publicRequest.Description);
}
if(publicRequest.IsSetEventPattern())
{
context.Writer.WritePropertyName("EventPattern");
context.Writer.Write(publicRequest.EventPattern);
}
if(publicRequest.IsSetEventSourceArn())
{
context.Writer.WritePropertyName("EventSourceArn");
context.Writer.Write(publicRequest.EventSourceArn);
}
if(publicRequest.IsSetRetentionDays())
{
context.Writer.WritePropertyName("RetentionDays");
context.Writer.Write(publicRequest.RetentionDays);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateArchiveRequestMarshaller _instance = new CreateArchiveRequestMarshaller();
internal static CreateArchiveRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateArchiveRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 127 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateArchive operation
/// </summary>
public class CreateArchiveResponseUnmarshaller : 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)
{
CreateArchiveResponse response = new CreateArchiveResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ArchiveArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ArchiveArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("State", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.State = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StateReason", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.StateReason = 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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidEventPatternException"))
{
return InvalidEventPatternExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException"))
{
return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateArchiveResponseUnmarshaller _instance = new CreateArchiveResponseUnmarshaller();
internal static CreateArchiveResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateArchiveResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateConnectionApiKeyAuthRequestParameters Marshaller
/// </summary>
public class CreateConnectionApiKeyAuthRequestParametersMarshaller : IRequestMarshaller<CreateConnectionApiKeyAuthRequestParameters, 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(CreateConnectionApiKeyAuthRequestParameters requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetApiKeyName())
{
context.Writer.WritePropertyName("ApiKeyName");
context.Writer.Write(requestObject.ApiKeyName);
}
if(requestObject.IsSetApiKeyValue())
{
context.Writer.WritePropertyName("ApiKeyValue");
context.Writer.Write(requestObject.ApiKeyValue);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateConnectionApiKeyAuthRequestParametersMarshaller Instance = new CreateConnectionApiKeyAuthRequestParametersMarshaller();
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateConnectionAuthRequestParameters Marshaller
/// </summary>
public class CreateConnectionAuthRequestParametersMarshaller : IRequestMarshaller<CreateConnectionAuthRequestParameters, 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(CreateConnectionAuthRequestParameters requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetApiKeyAuthParameters())
{
context.Writer.WritePropertyName("ApiKeyAuthParameters");
context.Writer.WriteObjectStart();
var marshaller = CreateConnectionApiKeyAuthRequestParametersMarshaller.Instance;
marshaller.Marshall(requestObject.ApiKeyAuthParameters, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetBasicAuthParameters())
{
context.Writer.WritePropertyName("BasicAuthParameters");
context.Writer.WriteObjectStart();
var marshaller = CreateConnectionBasicAuthRequestParametersMarshaller.Instance;
marshaller.Marshall(requestObject.BasicAuthParameters, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetInvocationHttpParameters())
{
context.Writer.WritePropertyName("InvocationHttpParameters");
context.Writer.WriteObjectStart();
var marshaller = ConnectionHttpParametersMarshaller.Instance;
marshaller.Marshall(requestObject.InvocationHttpParameters, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetOAuthParameters())
{
context.Writer.WritePropertyName("OAuthParameters");
context.Writer.WriteObjectStart();
var marshaller = CreateConnectionOAuthRequestParametersMarshaller.Instance;
marshaller.Marshall(requestObject.OAuthParameters, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateConnectionAuthRequestParametersMarshaller Instance = new CreateConnectionAuthRequestParametersMarshaller();
}
} | 100 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateConnectionBasicAuthRequestParameters Marshaller
/// </summary>
public class CreateConnectionBasicAuthRequestParametersMarshaller : IRequestMarshaller<CreateConnectionBasicAuthRequestParameters, 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(CreateConnectionBasicAuthRequestParameters requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetPassword())
{
context.Writer.WritePropertyName("Password");
context.Writer.Write(requestObject.Password);
}
if(requestObject.IsSetUsername())
{
context.Writer.WritePropertyName("Username");
context.Writer.Write(requestObject.Username);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateConnectionBasicAuthRequestParametersMarshaller Instance = new CreateConnectionBasicAuthRequestParametersMarshaller();
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateConnectionOAuthClientRequestParameters Marshaller
/// </summary>
public class CreateConnectionOAuthClientRequestParametersMarshaller : IRequestMarshaller<CreateConnectionOAuthClientRequestParameters, 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(CreateConnectionOAuthClientRequestParameters requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetClientID())
{
context.Writer.WritePropertyName("ClientID");
context.Writer.Write(requestObject.ClientID);
}
if(requestObject.IsSetClientSecret())
{
context.Writer.WritePropertyName("ClientSecret");
context.Writer.Write(requestObject.ClientSecret);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateConnectionOAuthClientRequestParametersMarshaller Instance = new CreateConnectionOAuthClientRequestParametersMarshaller();
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateConnectionOAuthRequestParameters Marshaller
/// </summary>
public class CreateConnectionOAuthRequestParametersMarshaller : IRequestMarshaller<CreateConnectionOAuthRequestParameters, 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(CreateConnectionOAuthRequestParameters requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAuthorizationEndpoint())
{
context.Writer.WritePropertyName("AuthorizationEndpoint");
context.Writer.Write(requestObject.AuthorizationEndpoint);
}
if(requestObject.IsSetClientParameters())
{
context.Writer.WritePropertyName("ClientParameters");
context.Writer.WriteObjectStart();
var marshaller = CreateConnectionOAuthClientRequestParametersMarshaller.Instance;
marshaller.Marshall(requestObject.ClientParameters, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetHttpMethod())
{
context.Writer.WritePropertyName("HttpMethod");
context.Writer.Write(requestObject.HttpMethod);
}
if(requestObject.IsSetOAuthHttpParameters())
{
context.Writer.WritePropertyName("OAuthHttpParameters");
context.Writer.WriteObjectStart();
var marshaller = ConnectionHttpParametersMarshaller.Instance;
marshaller.Marshall(requestObject.OAuthHttpParameters, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateConnectionOAuthRequestParametersMarshaller Instance = new CreateConnectionOAuthRequestParametersMarshaller();
}
} | 90 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateConnection Request Marshaller
/// </summary>
public class CreateConnectionRequestMarshaller : IMarshaller<IRequest, CreateConnectionRequest> , 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((CreateConnectionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateConnectionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.CreateConnection";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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.IsSetAuthorizationType())
{
context.Writer.WritePropertyName("AuthorizationType");
context.Writer.Write(publicRequest.AuthorizationType);
}
if(publicRequest.IsSetAuthParameters())
{
context.Writer.WritePropertyName("AuthParameters");
context.Writer.WriteObjectStart();
var marshaller = CreateConnectionAuthRequestParametersMarshaller.Instance;
marshaller.Marshall(publicRequest.AuthParameters, 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);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateConnectionRequestMarshaller _instance = new CreateConnectionRequestMarshaller();
internal static CreateConnectionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateConnectionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 126 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateConnection operation
/// </summary>
public class CreateConnectionResponseUnmarshaller : 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)
{
CreateConnectionResponse response = new CreateConnectionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ConnectionArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ConnectionArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConnectionState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ConnectionState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastModifiedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.LastModifiedTime = 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("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException"))
{
return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateConnectionResponseUnmarshaller _instance = new CreateConnectionResponseUnmarshaller();
internal static CreateConnectionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateConnectionResponseUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateEventBus Request Marshaller
/// </summary>
public class CreateEventBusRequestMarshaller : IMarshaller<IRequest, CreateEventBusRequest> , 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((CreateEventBusRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateEventBusRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.CreateEventBus";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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.IsSetEventSourceName())
{
context.Writer.WritePropertyName("EventSourceName");
context.Writer.Write(publicRequest.EventSourceName);
}
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 CreateEventBusRequestMarshaller _instance = new CreateEventBusRequestMarshaller();
internal static CreateEventBusRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateEventBusRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateEventBus operation
/// </summary>
public class CreateEventBusResponseUnmarshaller : 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)
{
CreateEventBusResponse response = new CreateEventBusResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("EventBusArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.EventBusArn = 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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidStateException"))
{
return InvalidStateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OperationDisabledException"))
{
return OperationDisabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException"))
{
return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateEventBusResponseUnmarshaller _instance = new CreateEventBusResponseUnmarshaller();
internal static CreateEventBusResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateEventBusResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 134 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreatePartnerEventSource Request Marshaller
/// </summary>
public class CreatePartnerEventSourceRequestMarshaller : IMarshaller<IRequest, CreatePartnerEventSourceRequest> , 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((CreatePartnerEventSourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreatePartnerEventSourceRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.CreatePartnerEventSource";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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.IsSetAccount())
{
context.Writer.WritePropertyName("Account");
context.Writer.Write(publicRequest.Account);
}
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 CreatePartnerEventSourceRequestMarshaller _instance = new CreatePartnerEventSourceRequestMarshaller();
internal static CreatePartnerEventSourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreatePartnerEventSourceRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreatePartnerEventSource operation
/// </summary>
public class CreatePartnerEventSourceResponseUnmarshaller : 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)
{
CreatePartnerEventSourceResponse response = new CreatePartnerEventSourceResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("EventSourceArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.EventSourceArn = 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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OperationDisabledException"))
{
return OperationDisabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException"))
{
return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreatePartnerEventSourceResponseUnmarshaller _instance = new CreatePartnerEventSourceResponseUnmarshaller();
internal static CreatePartnerEventSourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreatePartnerEventSourceResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 126 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeactivateEventSource Request Marshaller
/// </summary>
public class DeactivateEventSourceRequestMarshaller : IMarshaller<IRequest, DeactivateEventSourceRequest> , 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((DeactivateEventSourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeactivateEventSourceRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DeactivateEventSource";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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 DeactivateEventSourceRequestMarshaller _instance = new DeactivateEventSourceRequestMarshaller();
internal static DeactivateEventSourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeactivateEventSourceRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeactivateEventSource operation
/// </summary>
public class DeactivateEventSourceResponseUnmarshaller : 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)
{
DeactivateEventSourceResponse response = new DeactivateEventSourceResponse();
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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidStateException"))
{
return InvalidStateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OperationDisabledException"))
{
return OperationDisabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeactivateEventSourceResponseUnmarshaller _instance = new DeactivateEventSourceResponseUnmarshaller();
internal static DeactivateEventSourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeactivateEventSourceResponseUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeadLetterConfig Marshaller
/// </summary>
public class DeadLetterConfigMarshaller : IRequestMarshaller<DeadLetterConfig, 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(DeadLetterConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetArn())
{
context.Writer.WritePropertyName("Arn");
context.Writer.Write(requestObject.Arn);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static DeadLetterConfigMarshaller Instance = new DeadLetterConfigMarshaller();
}
} | 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeadLetterConfig Object
/// </summary>
public class DeadLetterConfigUnmarshaller : IUnmarshaller<DeadLetterConfig, XmlUnmarshallerContext>, IUnmarshaller<DeadLetterConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
DeadLetterConfig IUnmarshaller<DeadLetterConfig, 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 DeadLetterConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
DeadLetterConfig unmarshalledObject = new DeadLetterConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Arn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Arn = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static DeadLetterConfigUnmarshaller _instance = new DeadLetterConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeadLetterConfigUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeauthorizeConnection Request Marshaller
/// </summary>
public class DeauthorizeConnectionRequestMarshaller : IMarshaller<IRequest, DeauthorizeConnectionRequest> , 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((DeauthorizeConnectionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeauthorizeConnectionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DeauthorizeConnection";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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 DeauthorizeConnectionRequestMarshaller _instance = new DeauthorizeConnectionRequestMarshaller();
internal static DeauthorizeConnectionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeauthorizeConnectionRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeauthorizeConnection operation
/// </summary>
public class DeauthorizeConnectionResponseUnmarshaller : 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)
{
DeauthorizeConnectionResponse response = new DeauthorizeConnectionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ConnectionArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ConnectionArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConnectionState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ConnectionState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastAuthorizedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.LastAuthorizedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastModifiedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.LastModifiedTime = 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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeauthorizeConnectionResponseUnmarshaller _instance = new DeauthorizeConnectionResponseUnmarshaller();
internal static DeauthorizeConnectionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeauthorizeConnectionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 142 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteApiDestination Request Marshaller
/// </summary>
public class DeleteApiDestinationRequestMarshaller : IMarshaller<IRequest, DeleteApiDestinationRequest> , 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((DeleteApiDestinationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteApiDestinationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DeleteApiDestination";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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 DeleteApiDestinationRequestMarshaller _instance = new DeleteApiDestinationRequestMarshaller();
internal static DeleteApiDestinationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteApiDestinationRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteApiDestination operation
/// </summary>
public class DeleteApiDestinationResponseUnmarshaller : 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)
{
DeleteApiDestinationResponse response = new DeleteApiDestinationResponse();
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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteApiDestinationResponseUnmarshaller _instance = new DeleteApiDestinationResponseUnmarshaller();
internal static DeleteApiDestinationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteApiDestinationResponseUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteArchive Request Marshaller
/// </summary>
public class DeleteArchiveRequestMarshaller : IMarshaller<IRequest, DeleteArchiveRequest> , 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((DeleteArchiveRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteArchiveRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DeleteArchive";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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.IsSetArchiveName())
{
context.Writer.WritePropertyName("ArchiveName");
context.Writer.Write(publicRequest.ArchiveName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeleteArchiveRequestMarshaller _instance = new DeleteArchiveRequestMarshaller();
internal static DeleteArchiveRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteArchiveRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteArchive operation
/// </summary>
public class DeleteArchiveResponseUnmarshaller : 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)
{
DeleteArchiveResponse response = new DeleteArchiveResponse();
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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteArchiveResponseUnmarshaller _instance = new DeleteArchiveResponseUnmarshaller();
internal static DeleteArchiveResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteArchiveResponseUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteConnection Request Marshaller
/// </summary>
public class DeleteConnectionRequestMarshaller : IMarshaller<IRequest, DeleteConnectionRequest> , 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((DeleteConnectionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteConnectionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DeleteConnection";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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 DeleteConnectionRequestMarshaller _instance = new DeleteConnectionRequestMarshaller();
internal static DeleteConnectionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteConnectionRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteConnection operation
/// </summary>
public class DeleteConnectionResponseUnmarshaller : 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)
{
DeleteConnectionResponse response = new DeleteConnectionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ConnectionArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ConnectionArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConnectionState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ConnectionState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastAuthorizedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.LastAuthorizedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastModifiedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.LastModifiedTime = 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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteConnectionResponseUnmarshaller _instance = new DeleteConnectionResponseUnmarshaller();
internal static DeleteConnectionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteConnectionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 142 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteEventBus Request Marshaller
/// </summary>
public class DeleteEventBusRequestMarshaller : IMarshaller<IRequest, DeleteEventBusRequest> , 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((DeleteEventBusRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteEventBusRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DeleteEventBus";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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 DeleteEventBusRequestMarshaller _instance = new DeleteEventBusRequestMarshaller();
internal static DeleteEventBusRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteEventBusRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteEventBus operation
/// </summary>
public class DeleteEventBusResponseUnmarshaller : 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)
{
DeleteEventBusResponse response = new DeleteEventBusResponse();
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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteEventBusResponseUnmarshaller _instance = new DeleteEventBusResponseUnmarshaller();
internal static DeleteEventBusResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteEventBusResponseUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeletePartnerEventSource Request Marshaller
/// </summary>
public class DeletePartnerEventSourceRequestMarshaller : IMarshaller<IRequest, DeletePartnerEventSourceRequest> , 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((DeletePartnerEventSourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeletePartnerEventSourceRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DeletePartnerEventSource";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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.IsSetAccount())
{
context.Writer.WritePropertyName("Account");
context.Writer.Write(publicRequest.Account);
}
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 DeletePartnerEventSourceRequestMarshaller _instance = new DeletePartnerEventSourceRequestMarshaller();
internal static DeletePartnerEventSourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeletePartnerEventSourceRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeletePartnerEventSource operation
/// </summary>
public class DeletePartnerEventSourceResponseUnmarshaller : 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)
{
DeletePartnerEventSourceResponse response = new DeletePartnerEventSourceResponse();
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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OperationDisabledException"))
{
return OperationDisabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeletePartnerEventSourceResponseUnmarshaller _instance = new DeletePartnerEventSourceResponseUnmarshaller();
internal static DeletePartnerEventSourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeletePartnerEventSourceResponseUnmarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteRule Request Marshaller
/// </summary>
public class DeleteRuleRequestMarshaller : IMarshaller<IRequest, DeleteRuleRequest> , 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((DeleteRuleRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteRuleRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DeleteRule";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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.IsSetEventBusName())
{
context.Writer.WritePropertyName("EventBusName");
context.Writer.Write(publicRequest.EventBusName);
}
if(publicRequest.IsSetForce())
{
context.Writer.WritePropertyName("Force");
context.Writer.Write(publicRequest.Force);
}
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 DeleteRuleRequestMarshaller _instance = new DeleteRuleRequestMarshaller();
internal static DeleteRuleRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteRuleRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteRule operation
/// </summary>
public class DeleteRuleResponseUnmarshaller : 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)
{
DeleteRuleResponse response = new DeleteRuleResponse();
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("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ManagedRuleException"))
{
return ManagedRuleExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteRuleResponseUnmarshaller _instance = new DeleteRuleResponseUnmarshaller();
internal static DeleteRuleResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteRuleResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 111 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeApiDestination Request Marshaller
/// </summary>
public class DescribeApiDestinationRequestMarshaller : IMarshaller<IRequest, DescribeApiDestinationRequest> , 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((DescribeApiDestinationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeApiDestinationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DescribeApiDestination";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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 DescribeApiDestinationRequestMarshaller _instance = new DescribeApiDestinationRequestMarshaller();
internal static DescribeApiDestinationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeApiDestinationRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeApiDestination operation
/// </summary>
public class DescribeApiDestinationResponseUnmarshaller : 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)
{
DescribeApiDestinationResponse response = new DescribeApiDestinationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ApiDestinationArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ApiDestinationArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ApiDestinationState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ApiDestinationState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConnectionArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ConnectionArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("HttpMethod", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.HttpMethod = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InvocationEndpoint", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.InvocationEndpoint = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InvocationRateLimitPerSecond", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
response.InvocationRateLimitPerSecond = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastModifiedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.LastModifiedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Name = 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("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DescribeApiDestinationResponseUnmarshaller _instance = new DescribeApiDestinationResponseUnmarshaller();
internal static DescribeApiDestinationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeApiDestinationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 168 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeArchive Request Marshaller
/// </summary>
public class DescribeArchiveRequestMarshaller : IMarshaller<IRequest, DescribeArchiveRequest> , 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((DescribeArchiveRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeArchiveRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DescribeArchive";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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.IsSetArchiveName())
{
context.Writer.WritePropertyName("ArchiveName");
context.Writer.Write(publicRequest.ArchiveName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DescribeArchiveRequestMarshaller _instance = new DescribeArchiveRequestMarshaller();
internal static DescribeArchiveRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeArchiveRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeArchive operation
/// </summary>
public class DescribeArchiveResponseUnmarshaller : 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)
{
DescribeArchiveResponse response = new DescribeArchiveResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ArchiveArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ArchiveArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ArchiveName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ArchiveName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EventCount", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
response.EventCount = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EventPattern", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.EventPattern = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EventSourceArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.EventSourceArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RetentionDays", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
response.RetentionDays = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SizeBytes", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
response.SizeBytes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("State", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.State = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StateReason", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.StateReason = 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("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException"))
{
return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DescribeArchiveResponseUnmarshaller _instance = new DescribeArchiveResponseUnmarshaller();
internal static DescribeArchiveResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeArchiveResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 178 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeConnection Request Marshaller
/// </summary>
public class DescribeConnectionRequestMarshaller : IMarshaller<IRequest, DescribeConnectionRequest> , 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((DescribeConnectionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeConnectionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DescribeConnection";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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 DescribeConnectionRequestMarshaller _instance = new DescribeConnectionRequestMarshaller();
internal static DescribeConnectionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeConnectionRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeConnection operation
/// </summary>
public class DescribeConnectionResponseUnmarshaller : 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)
{
DescribeConnectionResponse response = new DescribeConnectionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AuthorizationType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AuthorizationType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("AuthParameters", targetDepth))
{
var unmarshaller = ConnectionAuthResponseParametersUnmarshaller.Instance;
response.AuthParameters = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConnectionArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ConnectionArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConnectionState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ConnectionState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastAuthorizedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.LastAuthorizedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LastModifiedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.LastModifiedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SecretArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.SecretArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StateReason", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.StateReason = 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("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DescribeConnectionResponseUnmarshaller _instance = new DescribeConnectionResponseUnmarshaller();
internal static DescribeConnectionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeConnectionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 174 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeEventBus Request Marshaller
/// </summary>
public class DescribeEventBusRequestMarshaller : IMarshaller<IRequest, DescribeEventBusRequest> , 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((DescribeEventBusRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeEventBusRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DescribeEventBus";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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 DescribeEventBusRequestMarshaller _instance = new DescribeEventBusRequestMarshaller();
internal static DescribeEventBusRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeEventBusRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeEventBus operation
/// </summary>
public class DescribeEventBusResponseUnmarshaller : 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)
{
DescribeEventBusResponse response = new DescribeEventBusResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Arn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Arn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Policy", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Policy = 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("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DescribeEventBusResponseUnmarshaller _instance = new DescribeEventBusResponseUnmarshaller();
internal static DescribeEventBusResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeEventBusResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 126 |
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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeEventSource Request Marshaller
/// </summary>
public class DescribeEventSourceRequestMarshaller : IMarshaller<IRequest, DescribeEventSourceRequest> , 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((DescribeEventSourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeEventSourceRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudWatchEvents");
string target = "AWSEvents.DescribeEventSource";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-10-07";
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 DescribeEventSourceRequestMarshaller _instance = new DescribeEventSourceRequestMarshaller();
internal static DescribeEventSourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeEventSourceRequestMarshaller 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 events-2015-10-07.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.CloudWatchEvents.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudWatchEvents.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeEventSource operation
/// </summary>
public class DescribeEventSourceResponseUnmarshaller : 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)
{
DescribeEventSourceResponse response = new DescribeEventSourceResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Arn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Arn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreatedBy", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.CreatedBy = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CreationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ExpirationTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.ExpirationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("State", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.State = 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("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OperationDisabledException"))
{
return OperationDisabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudWatchEventsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DescribeEventSourceResponseUnmarshaller _instance = new DescribeEventSourceResponseUnmarshaller();
internal static DescribeEventSourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeEventSourceResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 148 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.