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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFormation.Model { /// <summary> /// Container for the parameters to the UpdateStackInstances operation. /// Updates the parameter values for stack instances for the specified accounts, within /// the specified Amazon Web Services Regions. A stack instance refers to a stack in a /// specific account and Region. /// /// /// <para> /// You can only update stack instances in Amazon Web Services Regions and accounts where /// they already exist; to create additional stack instances, use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStackInstances.html">CreateStackInstances</a>. /// </para> /// /// <para> /// During stack set updates, any parameters overridden for a stack instance aren't updated, /// but retain their overridden value. /// </para> /// /// <para> /// You can only update the parameter <i>values</i> that are specified in the stack set; /// to add or delete a parameter itself, use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> /// to update the stack set template. If you add a parameter to a template, before you /// can override the parameter value specified in the stack set you must first use <a /// href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> /// to update all stack instances with the updated template and parameter value specified /// in the stack set. Once a stack instance has been updated with the new parameter, you /// can then override the parameter value using <code>UpdateStackInstances</code>. /// </para> /// </summary> public partial class UpdateStackInstancesRequest : AmazonCloudFormationRequest { private List<string> _accounts = new List<string>(); private CallAs _callAs; private DeploymentTargets _deploymentTargets; private string _operationId; private StackSetOperationPreferences _operationPreferences; private List<Parameter> _parameterOverrides = new List<Parameter>(); private List<string> _regions = new List<string>(); private string _stackSetName; /// <summary> /// Gets and sets the property Accounts. /// <para> /// [Self-managed permissions] The names of one or more Amazon Web Services accounts for /// which you want to update parameter values for stack instances. The overridden parameter /// values will be applied to all stack instances in the specified accounts and Amazon /// Web Services Regions. /// </para> /// /// <para> /// You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both. /// </para> /// </summary> public List<string> Accounts { get { return this._accounts; } set { this._accounts = value; } } // Check to see if Accounts property is set internal bool IsSetAccounts() { return this._accounts != null && this._accounts.Count > 0; } /// <summary> /// Gets and sets the property CallAs. /// <para> /// [Service-managed permissions] Specifies whether you are acting as an account administrator /// in the organization's management account or as a delegated administrator in a member /// account. /// </para> /// /// <para> /// By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with /// self-managed permissions. /// </para> /// <ul> <li> /// <para> /// If you are signed in to the management account, specify <code>SELF</code>. /// </para> /// </li> <li> /// <para> /// If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>. /// </para> /// /// <para> /// Your Amazon Web Services account must be registered as a delegated administrator in /// the management account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html">Register /// a delegated administrator</a> in the <i>CloudFormation User Guide</i>. /// </para> /// </li> </ul> /// </summary> public CallAs CallAs { get { return this._callAs; } set { this._callAs = value; } } // Check to see if CallAs property is set internal bool IsSetCallAs() { return this._callAs != null; } /// <summary> /// Gets and sets the property DeploymentTargets. /// <para> /// [Service-managed permissions] The Organizations accounts for which you want to update /// parameter values for stack instances. If your update targets OUs, the overridden parameter /// values only apply to the accounts that are currently in the target OUs and their child /// OUs. Accounts added to the target OUs and their child OUs in the future won't use /// the overridden values. /// </para> /// /// <para> /// You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both. /// </para> /// </summary> public DeploymentTargets DeploymentTargets { get { return this._deploymentTargets; } set { this._deploymentTargets = value; } } // Check to see if DeploymentTargets property is set internal bool IsSetDeploymentTargets() { return this._deploymentTargets != null; } /// <summary> /// Gets and sets the property OperationId. /// <para> /// The unique identifier for this stack set operation. /// </para> /// /// <para> /// The operation ID also functions as an idempotency token, to ensure that CloudFormation /// performs the stack set operation only once, even if you retry the request multiple /// times. You might retry stack set operation requests to ensure that CloudFormation /// successfully received them. /// </para> /// /// <para> /// If you don't specify an operation ID, the SDK generates one automatically. /// </para> /// </summary> [AWSProperty(Min=1, Max=128)] public string OperationId { get { return this._operationId; } set { this._operationId = value; } } // Check to see if OperationId property is set internal bool IsSetOperationId() { return this._operationId != null; } /// <summary> /// Gets and sets the property OperationPreferences. /// <para> /// Preferences for how CloudFormation performs this stack set operation. /// </para> /// </summary> public StackSetOperationPreferences OperationPreferences { get { return this._operationPreferences; } set { this._operationPreferences = value; } } // Check to see if OperationPreferences property is set internal bool IsSetOperationPreferences() { return this._operationPreferences != null; } /// <summary> /// Gets and sets the property ParameterOverrides. /// <para> /// A list of input parameters whose values you want to update for the specified stack /// instances. /// </para> /// /// <para> /// Any overridden parameter values will be applied to all stack instances in the specified /// accounts and Amazon Web Services Regions. When specifying parameters and their values, /// be aware of how CloudFormation sets parameter values during stack instance update /// operations: /// </para> /// <ul> <li> /// <para> /// To override the current value for a parameter, include the parameter and specify its /// value. /// </para> /// </li> <li> /// <para> /// To leave an overridden parameter set to its present value, include the parameter and /// specify <code>UsePreviousValue</code> as <code>true</code>. (You can't specify both /// a value and set <code>UsePreviousValue</code> to <code>true</code>.) /// </para> /// </li> <li> /// <para> /// To set an overridden parameter back to the value specified in the stack set, specify /// a parameter list but don't include the parameter in the list. /// </para> /// </li> <li> /// <para> /// To leave all parameters set to their present values, don't specify this property at /// all. /// </para> /// </li> </ul> /// <para> /// During stack set updates, any parameter values overridden for a stack instance aren't /// updated, but retain their overridden value. /// </para> /// /// <para> /// You can only override the parameter <i>values</i> that are specified in the stack /// set; to add or delete a parameter itself, use <code>UpdateStackSet</code> to update /// the stack set template. If you add a parameter to a template, before you can override /// the parameter value specified in the stack set you must first use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> /// to update all stack instances with the updated template and parameter value specified /// in the stack set. Once a stack instance has been updated with the new parameter, you /// can then override the parameter value using <code>UpdateStackInstances</code>. /// </para> /// </summary> public List<Parameter> ParameterOverrides { get { return this._parameterOverrides; } set { this._parameterOverrides = value; } } // Check to see if ParameterOverrides property is set internal bool IsSetParameterOverrides() { return this._parameterOverrides != null && this._parameterOverrides.Count > 0; } /// <summary> /// Gets and sets the property Regions. /// <para> /// The names of one or more Amazon Web Services Regions in which you want to update parameter /// values for stack instances. The overridden parameter values will be applied to all /// stack instances in the specified accounts and Amazon Web Services Regions. /// </para> /// </summary> [AWSProperty(Required=true)] public List<string> Regions { get { return this._regions; } set { this._regions = value; } } // Check to see if Regions property is set internal bool IsSetRegions() { return this._regions != null && this._regions.Count > 0; } /// <summary> /// Gets and sets the property StackSetName. /// <para> /// The name or unique ID of the stack set associated with the stack instances. /// </para> /// </summary> [AWSProperty(Required=true)] public string StackSetName { get { return this._stackSetName; } set { this._stackSetName = value; } } // Check to see if StackSetName property is set internal bool IsSetStackSetName() { return this._stackSetName != null; } } }
312
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFormation.Model { /// <summary> /// This is the response object from the UpdateStackInstances operation. /// </summary> public partial class UpdateStackInstancesResponse : AmazonWebServiceResponse { private string _operationId; /// <summary> /// Gets and sets the property OperationId. /// <para> /// The unique identifier for this stack set operation. /// </para> /// </summary> [AWSProperty(Min=1, Max=128)] public string OperationId { get { return this._operationId; } set { this._operationId = value; } } // Check to see if OperationId property is set internal bool IsSetOperationId() { return this._operationId != 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFormation.Model { /// <summary> /// Container for the parameters to the UpdateStack operation. /// Updates a stack as specified in the template. After the call completes successfully, /// the stack update starts. You can check the status of the stack through the <a>DescribeStacks</a> /// action. /// /// /// <para> /// To get a copy of the template for an existing stack, you can use the <a>GetTemplate</a> /// action. /// </para> /// /// <para> /// For more information about creating an update template, updating a stack, and monitoring /// the progress of the update, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html">Updating /// a Stack</a>. /// </para> /// </summary> public partial class UpdateStackRequest : AmazonCloudFormationRequest { private List<string> _capabilities = new List<string>(); private string _clientRequestToken; private bool? _disableRollback; private List<string> _notificationARNs = new List<string>(); private List<Parameter> _parameters = new List<Parameter>(); private List<string> _resourceTypes = new List<string>(); private string _roleARN; private RollbackConfiguration _rollbackConfiguration; private string _stackName; private string _stackPolicyBody; private string _stackPolicyDuringUpdateBody; private string _stackPolicyDuringUpdateURL; private string _stackPolicyURL; private List<Tag> _tags = new List<Tag>(); private string _templateBody; private string _templateURL; private bool? _usePreviousTemplate; /// <summary> /// Gets and sets the property Capabilities. /// <para> /// In some cases, you must explicitly acknowledge that your stack template contains certain /// capabilities in order for CloudFormation to update the stack. /// </para> /// <ul> <li> /// <para> /// <code>CAPABILITY_IAM</code> and <code>CAPABILITY_NAMED_IAM</code> /// </para> /// /// <para> /// Some stack templates might include resources that can affect permissions in your Amazon /// Web Services account; for example, by creating new Identity and Access Management /// (IAM) users. For those stacks, you must explicitly acknowledge this by specifying /// one of these capabilities. /// </para> /// /// <para> /// The following IAM resources require you to specify either the <code>CAPABILITY_IAM</code> /// or <code>CAPABILITY_NAMED_IAM</code> capability. /// </para> /// <ul> <li> /// <para> /// If you have IAM resources, you can specify either capability. /// </para> /// </li> <li> /// <para> /// If you have IAM resources with custom names, you <i>must</i> specify <code>CAPABILITY_NAMED_IAM</code>. /// </para> /// </li> <li> /// <para> /// If you don't specify either of these capabilities, CloudFormation returns an <code>InsufficientCapabilities</code> /// error. /// </para> /// </li> </ul> /// <para> /// If your stack template contains these resources, we suggest that you review all permissions /// associated with them and edit their permissions if necessary. /// </para> /// <ul> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html"> /// AWS::IAM::AccessKey</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html"> /// AWS::IAM::Group</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html">AWS::IAM::InstanceProfile</a> /// /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html"> /// AWS::IAM::Policy</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html"> /// AWS::IAM::Role</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html"> /// AWS::IAM::User</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html">AWS::IAM::UserToGroupAddition</a> /// /// </para> /// </li> </ul> /// <para> /// For more information, see <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging /// IAM Resources in CloudFormation Templates</a>. /// </para> /// </li> <li> /// <para> /// <code>CAPABILITY_AUTO_EXPAND</code> /// </para> /// /// <para> /// Some template contain macros. Macros perform custom processing on templates; this /// can include simple actions like find-and-replace operations, all the way to extensive /// transformations of entire templates. Because of this, users typically create a change /// set from the processed template, so that they can review the changes resulting from /// the macros before actually updating the stack. If your stack template contains one /// or more macros, and you choose to update a stack directly from the processed template, /// without first reviewing the resulting changes in a change set, you must acknowledge /// this capability. This includes the <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html">AWS::Include</a> /// and <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html">AWS::Serverless</a> /// transforms, which are macros hosted by CloudFormation. /// </para> /// /// <para> /// If you want to update a stack from a stack template that contains macros <i>and</i> /// nested stacks, you must update the stack directly from the template using this capability. /// </para> /// <important> /// <para> /// You should only update stacks directly from a stack template that contains macros /// if you know what processing the macro performs. /// </para> /// /// <para> /// Each macro relies on an underlying Lambda service function for processing stack templates. /// Be aware that the Lambda function owner can update the function operation without /// CloudFormation being notified. /// </para> /// </important> /// <para> /// For more information, see <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html">Using /// CloudFormation Macros to Perform Custom Processing on Templates</a>. /// </para> /// </li> </ul> /// </summary> public List<string> Capabilities { get { return this._capabilities; } set { this._capabilities = value; } } // Check to see if Capabilities property is set internal bool IsSetCapabilities() { return this._capabilities != null && this._capabilities.Count > 0; } /// <summary> /// Gets and sets the property ClientRequestToken. /// <para> /// A unique identifier for this <code>UpdateStack</code> request. Specify this token /// if you plan to retry requests so that CloudFormation knows that you're not attempting /// to update a stack with the same name. You might retry <code>UpdateStack</code> requests /// to ensure that CloudFormation successfully received them. /// </para> /// /// <para> /// All events triggered by a given stack operation are assigned the same client request /// token, which you can use to track operations. For example, if you execute a <code>CreateStack</code> /// operation with the token <code>token1</code>, then all the <code>StackEvents</code> /// generated by that operation will have <code>ClientRequestToken</code> set as <code>token1</code>. /// </para> /// /// <para> /// In the console, stack operations display the client request token on the Events tab. /// Stack operations that are initiated from the console use the token format <i>Console-StackOperation-ID</i>, /// which helps you easily identify the stack operation . For example, if you create a /// stack using the console, each stack event would be assigned the same token in the /// following format: <code>Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002</code>. /// </para> /// </summary> [AWSProperty(Min=1, Max=128)] public string ClientRequestToken { get { return this._clientRequestToken; } set { this._clientRequestToken = value; } } // Check to see if ClientRequestToken property is set internal bool IsSetClientRequestToken() { return this._clientRequestToken != null; } /// <summary> /// Gets and sets the property DisableRollback. /// <para> /// Preserve the state of previously provisioned resources when an operation fails. /// </para> /// /// <para> /// Default: <code>False</code> /// </para> /// </summary> public bool DisableRollback { get { return this._disableRollback.GetValueOrDefault(); } set { this._disableRollback = value; } } // Check to see if DisableRollback property is set internal bool IsSetDisableRollback() { return this._disableRollback.HasValue; } /// <summary> /// Gets and sets the property NotificationARNs. /// <para> /// Amazon Simple Notification Service topic Amazon Resource Names (ARNs) that CloudFormation /// associates with the stack. Specify an empty list to remove all notification topics. /// </para> /// </summary> [AWSProperty(Max=5)] public List<string> NotificationARNs { get { return this._notificationARNs; } set { this._notificationARNs = value; } } // Check to see if NotificationARNs property is set internal bool IsSetNotificationARNs() { return this._notificationARNs != null && this._notificationARNs.Count > 0; } /// <summary> /// Gets and sets the property Parameters. /// <para> /// A list of <code>Parameter</code> structures that specify input parameters for the /// stack. For more information, see the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html">Parameter</a> /// data type. /// </para> /// </summary> public List<Parameter> Parameters { get { return this._parameters; } set { this._parameters = value; } } // Check to see if Parameters property is set internal bool IsSetParameters() { return this._parameters != null && this._parameters.Count > 0; } /// <summary> /// Gets and sets the property ResourceTypes. /// <para> /// The template resource types that you have permissions to work with for this update /// stack action, such as <code>AWS::EC2::Instance</code>, <code>AWS::EC2::*</code>, or /// <code>Custom::MyCustomInstance</code>. /// </para> /// /// <para> /// If the list of resource types doesn't include a resource that you're updating, the /// stack update fails. By default, CloudFormation grants permissions to all resource /// types. Identity and Access Management (IAM) uses this parameter for CloudFormation-specific /// condition keys in IAM policies. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html">Controlling /// Access with Identity and Access Management</a>. /// </para> /// </summary> public List<string> ResourceTypes { get { return this._resourceTypes; } set { this._resourceTypes = value; } } // Check to see if ResourceTypes property is set internal bool IsSetResourceTypes() { return this._resourceTypes != null && this._resourceTypes.Count > 0; } /// <summary> /// Gets and sets the property RoleARN. /// <para> /// The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that /// CloudFormation assumes to update the stack. CloudFormation uses the role's credentials /// to make calls on your behalf. CloudFormation always uses this role for all future /// operations on the stack. Provided that users have permission to operate on the stack, /// CloudFormation uses this role even if the users don't have permission to pass it. /// Ensure that the role grants least privilege. /// </para> /// /// <para> /// If you don't specify a value, CloudFormation uses the role that was previously associated /// with the stack. If no role is available, CloudFormation uses a temporary session that /// is generated from your user credentials. /// </para> /// </summary> [AWSProperty(Min=20, Max=2048)] 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 RollbackConfiguration. /// <para> /// The rollback triggers for CloudFormation to monitor during stack creation and updating /// operations, and for the specified monitoring period afterwards. /// </para> /// </summary> public RollbackConfiguration RollbackConfiguration { get { return this._rollbackConfiguration; } set { this._rollbackConfiguration = value; } } // Check to see if RollbackConfiguration property is set internal bool IsSetRollbackConfiguration() { return this._rollbackConfiguration != null; } /// <summary> /// Gets and sets the property StackName. /// <para> /// The name or unique stack ID of the stack to update. /// </para> /// </summary> [AWSProperty(Required=true)] public string StackName { get { return this._stackName; } set { this._stackName = value; } } // Check to see if StackName property is set internal bool IsSetStackName() { return this._stackName != null; } /// <summary> /// Gets and sets the property StackPolicyBody. /// <para> /// Structure containing a new stack policy body. You can specify either the <code>StackPolicyBody</code> /// or the <code>StackPolicyURL</code> parameter, but not both. /// </para> /// /// <para> /// You might update the stack policy, for example, in order to protect a new resource /// that you created during a stack update. If you don't specify a stack policy, the current /// policy that is associated with the stack is unchanged. /// </para> /// </summary> [AWSProperty(Min=1, Max=16384)] public string StackPolicyBody { get { return this._stackPolicyBody; } set { this._stackPolicyBody = value; } } // Check to see if StackPolicyBody property is set internal bool IsSetStackPolicyBody() { return this._stackPolicyBody != null; } /// <summary> /// Gets and sets the property StackPolicyDuringUpdateBody. /// <para> /// Structure containing the temporary overriding stack policy body. You can specify either /// the <code>StackPolicyDuringUpdateBody</code> or the <code>StackPolicyDuringUpdateURL</code> /// parameter, but not both. /// </para> /// /// <para> /// If you want to update protected resources, specify a temporary overriding stack policy /// during this update. If you don't specify a stack policy, the current policy that is /// associated with the stack will be used. /// </para> /// </summary> [AWSProperty(Min=1, Max=16384)] public string StackPolicyDuringUpdateBody { get { return this._stackPolicyDuringUpdateBody; } set { this._stackPolicyDuringUpdateBody = value; } } // Check to see if StackPolicyDuringUpdateBody property is set internal bool IsSetStackPolicyDuringUpdateBody() { return this._stackPolicyDuringUpdateBody != null; } /// <summary> /// Gets and sets the property StackPolicyDuringUpdateURL. /// <para> /// Location of a file containing the temporary overriding stack policy. The URL must /// point to a policy (max size: 16KB) located in an S3 bucket in the same Region as the /// stack. You can specify either the <code>StackPolicyDuringUpdateBody</code> or the /// <code>StackPolicyDuringUpdateURL</code> parameter, but not both. /// </para> /// /// <para> /// If you want to update protected resources, specify a temporary overriding stack policy /// during this update. If you don't specify a stack policy, the current policy that is /// associated with the stack will be used. /// </para> /// </summary> [AWSProperty(Min=1, Max=1350)] public string StackPolicyDuringUpdateURL { get { return this._stackPolicyDuringUpdateURL; } set { this._stackPolicyDuringUpdateURL = value; } } // Check to see if StackPolicyDuringUpdateURL property is set internal bool IsSetStackPolicyDuringUpdateURL() { return this._stackPolicyDuringUpdateURL != null; } /// <summary> /// Gets and sets the property StackPolicyURL. /// <para> /// Location of a file containing the updated stack policy. The URL must point to a policy /// (max size: 16KB) located in an S3 bucket in the same Region as the stack. You can /// specify either the <code>StackPolicyBody</code> or the <code>StackPolicyURL</code> /// parameter, but not both. /// </para> /// /// <para> /// You might update the stack policy, for example, in order to protect a new resource /// that you created during a stack update. If you don't specify a stack policy, the current /// policy that is associated with the stack is unchanged. /// </para> /// </summary> [AWSProperty(Min=1, Max=1350)] public string StackPolicyURL { get { return this._stackPolicyURL; } set { this._stackPolicyURL = value; } } // Check to see if StackPolicyURL property is set internal bool IsSetStackPolicyURL() { return this._stackPolicyURL != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// Key-value pairs to associate with this stack. CloudFormation also propagates these /// tags to supported resources in the stack. You can specify a maximum number of 50 tags. /// </para> /// /// <para> /// If you don't specify this parameter, CloudFormation doesn't modify the stack's tags. /// If you specify an empty value, CloudFormation removes all associated tags. /// </para> /// </summary> [AWSProperty(Max=50)] 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; } /// <summary> /// Gets and sets the property TemplateBody. /// <para> /// Structure containing the template body with a minimum length of 1 byte and a maximum /// length of 51,200 bytes. (For more information, go to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html">Template /// Anatomy</a> in the CloudFormation User Guide.) /// </para> /// /// <para> /// Conditional: You must specify only one of the following parameters: <code>TemplateBody</code>, /// <code>TemplateURL</code>, or set the <code>UsePreviousTemplate</code> to <code>true</code>. /// </para> /// </summary> [AWSProperty(Min=1)] public string TemplateBody { get { return this._templateBody; } set { this._templateBody = value; } } // Check to see if TemplateBody property is set internal bool IsSetTemplateBody() { return this._templateBody != null; } /// <summary> /// Gets and sets the property TemplateURL. /// <para> /// Location of file containing the template body. The URL must point to a template that's /// located in an Amazon S3 bucket or a Systems Manager document. For more information, /// go to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html">Template /// Anatomy</a> in the CloudFormation User Guide. /// </para> /// /// <para> /// Conditional: You must specify only one of the following parameters: <code>TemplateBody</code>, /// <code>TemplateURL</code>, or set the <code>UsePreviousTemplate</code> to <code>true</code>. /// </para> /// </summary> [AWSProperty(Min=1, Max=1024)] public string TemplateURL { get { return this._templateURL; } set { this._templateURL = value; } } // Check to see if TemplateURL property is set internal bool IsSetTemplateURL() { return this._templateURL != null; } /// <summary> /// Gets and sets the property UsePreviousTemplate. /// <para> /// Reuse the existing template that is associated with the stack that you are updating. /// </para> /// /// <para> /// Conditional: You must specify only one of the following parameters: <code>TemplateBody</code>, /// <code>TemplateURL</code>, or set the <code>UsePreviousTemplate</code> to <code>true</code>. /// </para> /// </summary> public bool UsePreviousTemplate { get { return this._usePreviousTemplate.GetValueOrDefault(); } set { this._usePreviousTemplate = value; } } // Check to see if UsePreviousTemplate property is set internal bool IsSetUsePreviousTemplate() { return this._usePreviousTemplate.HasValue; } } }
607
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFormation.Model { /// <summary> /// The output for an <a>UpdateStack</a> action. /// </summary> public partial class UpdateStackResponse : AmazonWebServiceResponse { private string _stackId; /// <summary> /// Gets and sets the property StackId. /// <para> /// Unique identifier of the stack. /// </para> /// </summary> public string StackId { get { return this._stackId; } set { this._stackId = value; } } // Check to see if StackId property is set internal bool IsSetStackId() { return this._stackId != null; } } }
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFormation.Model { /// <summary> /// Container for the parameters to the UpdateStackSet operation. /// Updates the stack set, and associated stack instances in the specified accounts and /// Amazon Web Services Regions. /// /// /// <para> /// Even if the stack set operation created by updating the stack set fails (completely /// or partially, below or above a specified failure tolerance), the stack set is updated /// with your changes. Subsequent <a>CreateStackInstances</a> calls on the specified stack /// set use the updated stack set. /// </para> /// </summary> public partial class UpdateStackSetRequest : AmazonCloudFormationRequest { private List<string> _accounts = new List<string>(); private string _administrationRoleARN; private AutoDeployment _autoDeployment; private CallAs _callAs; private List<string> _capabilities = new List<string>(); private DeploymentTargets _deploymentTargets; private string _description; private string _executionRoleName; private ManagedExecution _managedExecution; private string _operationId; private StackSetOperationPreferences _operationPreferences; private List<Parameter> _parameters = new List<Parameter>(); private PermissionModels _permissionModel; private List<string> _regions = new List<string>(); private string _stackSetName; private List<Tag> _tags = new List<Tag>(); private string _templateBody; private string _templateURL; private bool? _usePreviousTemplate; /// <summary> /// Gets and sets the property Accounts. /// <para> /// [Self-managed permissions] The accounts in which to update associated stack instances. /// If you specify accounts, you must also specify the Amazon Web Services Regions in /// which to update stack set instances. /// </para> /// /// <para> /// To update <i>all</i> the stack instances associated with this stack set, don't specify /// the <code>Accounts</code> or <code>Regions</code> properties. /// </para> /// /// <para> /// If the stack set update includes changes to the template (that is, if the <code>TemplateBody</code> /// or <code>TemplateURL</code> properties are specified), or the <code>Parameters</code> /// property, CloudFormation marks all stack instances with a status of <code>OUTDATED</code> /// prior to updating the stack instances in the specified accounts and Amazon Web Services /// Regions. If the stack set update does not include changes to the template or parameters, /// CloudFormation updates the stack instances in the specified accounts and Amazon Web /// Services Regions, while leaving all other stack instances with their existing stack /// instance status. /// </para> /// </summary> public List<string> Accounts { get { return this._accounts; } set { this._accounts = value; } } // Check to see if Accounts property is set internal bool IsSetAccounts() { return this._accounts != null && this._accounts.Count > 0; } /// <summary> /// Gets and sets the property AdministrationRoleARN. /// <para> /// The Amazon Resource Name (ARN) of the IAM role to use to update this stack set. /// </para> /// /// <para> /// Specify an IAM role only if you are using customized administrator roles to control /// which users or groups can manage specific stack sets within the same administrator /// account. For more information, see <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html">Granting /// Permissions for Stack Set Operations</a> in the <i>CloudFormation User Guide</i>. /// </para> /// /// <para> /// If you specified a customized administrator role when you created the stack set, you /// must specify a customized administrator role, even if it is the same customized administrator /// role used with this stack set previously. /// </para> /// </summary> [AWSProperty(Min=20, Max=2048)] public string AdministrationRoleARN { get { return this._administrationRoleARN; } set { this._administrationRoleARN = value; } } // Check to see if AdministrationRoleARN property is set internal bool IsSetAdministrationRoleARN() { return this._administrationRoleARN != null; } /// <summary> /// Gets and sets the property AutoDeployment. /// <para> /// [Service-managed permissions] Describes whether StackSets automatically deploys to /// Organizations accounts that are added to a target organization or organizational unit /// (OU). /// </para> /// /// <para> /// If you specify <code>AutoDeployment</code>, don't specify <code>DeploymentTargets</code> /// or <code>Regions</code>. /// </para> /// </summary> public AutoDeployment AutoDeployment { get { return this._autoDeployment; } set { this._autoDeployment = value; } } // Check to see if AutoDeployment property is set internal bool IsSetAutoDeployment() { return this._autoDeployment != null; } /// <summary> /// Gets and sets the property CallAs. /// <para> /// [Service-managed permissions] Specifies whether you are acting as an account administrator /// in the organization's management account or as a delegated administrator in a member /// account. /// </para> /// /// <para> /// By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with /// self-managed permissions. /// </para> /// <ul> <li> /// <para> /// If you are signed in to the management account, specify <code>SELF</code>. /// </para> /// </li> <li> /// <para> /// If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>. /// </para> /// /// <para> /// Your Amazon Web Services account must be registered as a delegated administrator in /// the management account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html">Register /// a delegated administrator</a> in the <i>CloudFormation User Guide</i>. /// </para> /// </li> </ul> /// </summary> public CallAs CallAs { get { return this._callAs; } set { this._callAs = value; } } // Check to see if CallAs property is set internal bool IsSetCallAs() { return this._callAs != null; } /// <summary> /// Gets and sets the property Capabilities. /// <para> /// In some cases, you must explicitly acknowledge that your stack template contains certain /// capabilities in order for CloudFormation to update the stack set and its associated /// stack instances. /// </para> /// <ul> <li> /// <para> /// <code>CAPABILITY_IAM</code> and <code>CAPABILITY_NAMED_IAM</code> /// </para> /// /// <para> /// Some stack templates might include resources that can affect permissions in your Amazon /// Web Services account; for example, by creating new Identity and Access Management /// (IAM) users. For those stacks sets, you must explicitly acknowledge this by specifying /// one of these capabilities. /// </para> /// /// <para> /// The following IAM resources require you to specify either the <code>CAPABILITY_IAM</code> /// or <code>CAPABILITY_NAMED_IAM</code> capability. /// </para> /// <ul> <li> /// <para> /// If you have IAM resources, you can specify either capability. /// </para> /// </li> <li> /// <para> /// If you have IAM resources with custom names, you <i>must</i> specify <code>CAPABILITY_NAMED_IAM</code>. /// </para> /// </li> <li> /// <para> /// If you don't specify either of these capabilities, CloudFormation returns an <code>InsufficientCapabilities</code> /// error. /// </para> /// </li> </ul> /// <para> /// If your stack template contains these resources, we recommend that you review all /// permissions associated with them and edit their permissions if necessary. /// </para> /// <ul> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html"> /// AWS::IAM::AccessKey</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html"> /// AWS::IAM::Group</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html"> /// AWS::IAM::InstanceProfile</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html"> /// AWS::IAM::Policy</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html"> /// AWS::IAM::Role</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html"> /// AWS::IAM::User</a> /// </para> /// </li> <li> /// <para> /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html"> /// AWS::IAM::UserToGroupAddition</a> /// </para> /// </li> </ul> /// <para> /// For more information, see <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging /// IAM Resources in CloudFormation Templates</a>. /// </para> /// </li> <li> /// <para> /// <code>CAPABILITY_AUTO_EXPAND</code> /// </para> /// /// <para> /// Some templates reference macros. If your stack set template references one or more /// macros, you must update the stack set directly from the processed template, without /// first reviewing the resulting changes in a change set. To update the stack set directly, /// you must acknowledge this capability. For more information, see <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html">Using /// CloudFormation Macros to Perform Custom Processing on Templates</a>. /// </para> /// <important> /// <para> /// Stack sets with service-managed permissions do not currently support the use of macros /// in templates. (This includes the <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html">AWS::Include</a> /// and <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html">AWS::Serverless</a> /// transforms, which are macros hosted by CloudFormation.) Even if you specify this capability /// for a stack set with service-managed permissions, if you reference a macro in your /// template the stack set operation will fail. /// </para> /// </important> </li> </ul> /// </summary> public List<string> Capabilities { get { return this._capabilities; } set { this._capabilities = value; } } // Check to see if Capabilities property is set internal bool IsSetCapabilities() { return this._capabilities != null && this._capabilities.Count > 0; } /// <summary> /// Gets and sets the property DeploymentTargets. /// <para> /// [Service-managed permissions] The Organizations accounts in which to update associated /// stack instances. /// </para> /// /// <para> /// To update all the stack instances associated with this stack set, do not specify <code>DeploymentTargets</code> /// or <code>Regions</code>. /// </para> /// /// <para> /// If the stack set update includes changes to the template (that is, if <code>TemplateBody</code> /// or <code>TemplateURL</code> is specified), or the <code>Parameters</code>, CloudFormation /// marks all stack instances with a status of <code>OUTDATED</code> prior to updating /// the stack instances in the specified accounts and Amazon Web Services Regions. If /// the stack set update doesn't include changes to the template or parameters, CloudFormation /// updates the stack instances in the specified accounts and Regions, while leaving all /// other stack instances with their existing stack instance status. /// </para> /// </summary> public DeploymentTargets DeploymentTargets { get { return this._deploymentTargets; } set { this._deploymentTargets = value; } } // Check to see if DeploymentTargets property is set internal bool IsSetDeploymentTargets() { return this._deploymentTargets != null; } /// <summary> /// Gets and sets the property Description. /// <para> /// A brief description of updates that you are making. /// </para> /// </summary> [AWSProperty(Min=1, Max=1024)] public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property ExecutionRoleName. /// <para> /// The name of the IAM execution role to use to update the stack set. If you do not specify /// an execution role, CloudFormation uses the <code>AWSCloudFormationStackSetExecutionRole</code> /// role for the stack set operation. /// </para> /// /// <para> /// Specify an IAM role only if you are using customized execution roles to control which /// stack resources users and groups can include in their stack sets. /// </para> /// /// <para> /// If you specify a customized execution role, CloudFormation uses that role to update /// the stack. If you do not specify a customized execution role, CloudFormation performs /// the update using the role previously associated with the stack set, so long as you /// have permissions to perform operations on the stack set. /// </para> /// </summary> [AWSProperty(Min=1, Max=64)] public string ExecutionRoleName { get { return this._executionRoleName; } set { this._executionRoleName = value; } } // Check to see if ExecutionRoleName property is set internal bool IsSetExecutionRoleName() { return this._executionRoleName != null; } /// <summary> /// Gets and sets the property ManagedExecution. /// <para> /// Describes whether StackSets performs non-conflicting operations concurrently and queues /// conflicting operations. /// </para> /// </summary> public ManagedExecution ManagedExecution { get { return this._managedExecution; } set { this._managedExecution = value; } } // Check to see if ManagedExecution property is set internal bool IsSetManagedExecution() { return this._managedExecution != null; } /// <summary> /// Gets and sets the property OperationId. /// <para> /// The unique ID for this stack set operation. /// </para> /// /// <para> /// The operation ID also functions as an idempotency token, to ensure that CloudFormation /// performs the stack set operation only once, even if you retry the request multiple /// times. You might retry stack set operation requests to ensure that CloudFormation /// successfully received them. /// </para> /// /// <para> /// If you don't specify an operation ID, CloudFormation generates one automatically. /// </para> /// /// <para> /// Repeating this stack set operation with a new operation ID retries all stack instances /// whose status is <code>OUTDATED</code>. /// </para> /// </summary> [AWSProperty(Min=1, Max=128)] public string OperationId { get { return this._operationId; } set { this._operationId = value; } } // Check to see if OperationId property is set internal bool IsSetOperationId() { return this._operationId != null; } /// <summary> /// Gets and sets the property OperationPreferences. /// <para> /// Preferences for how CloudFormation performs this stack set operation. /// </para> /// </summary> public StackSetOperationPreferences OperationPreferences { get { return this._operationPreferences; } set { this._operationPreferences = value; } } // Check to see if OperationPreferences property is set internal bool IsSetOperationPreferences() { return this._operationPreferences != null; } /// <summary> /// Gets and sets the property Parameters. /// <para> /// A list of input parameters for the stack set template. /// </para> /// </summary> public List<Parameter> Parameters { get { return this._parameters; } set { this._parameters = value; } } // Check to see if Parameters property is set internal bool IsSetParameters() { return this._parameters != null && this._parameters.Count > 0; } /// <summary> /// Gets and sets the property PermissionModel. /// <para> /// Describes how the IAM roles required for stack set operations are created. You cannot /// modify <code>PermissionModel</code> if there are stack instances associated with your /// stack set. /// </para> /// <ul> <li> /// <para> /// With <code>self-managed</code> permissions, you must create the administrator and /// execution roles required to deploy to target accounts. For more information, see <a /// href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html">Grant /// Self-Managed Stack Set Permissions</a>. /// </para> /// </li> <li> /// <para> /// With <code>service-managed</code> permissions, StackSets automatically creates the /// IAM roles required to deploy to accounts managed by Organizations. For more information, /// see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html">Grant /// Service-Managed Stack Set Permissions</a>. /// </para> /// </li> </ul> /// </summary> public PermissionModels PermissionModel { get { return this._permissionModel; } set { this._permissionModel = value; } } // Check to see if PermissionModel property is set internal bool IsSetPermissionModel() { return this._permissionModel != null; } /// <summary> /// Gets and sets the property Regions. /// <para> /// The Amazon Web Services Regions in which to update associated stack instances. If /// you specify Regions, you must also specify accounts in which to update stack set instances. /// </para> /// /// <para> /// To update <i>all</i> the stack instances associated with this stack set, do not specify /// the <code>Accounts</code> or <code>Regions</code> properties. /// </para> /// /// <para> /// If the stack set update includes changes to the template (that is, if the <code>TemplateBody</code> /// or <code>TemplateURL</code> properties are specified), or the <code>Parameters</code> /// property, CloudFormation marks all stack instances with a status of <code>OUTDATED</code> /// prior to updating the stack instances in the specified accounts and Regions. If the /// stack set update does not include changes to the template or parameters, CloudFormation /// updates the stack instances in the specified accounts and Regions, while leaving all /// other stack instances with their existing stack instance status. /// </para> /// </summary> public List<string> Regions { get { return this._regions; } set { this._regions = value; } } // Check to see if Regions property is set internal bool IsSetRegions() { return this._regions != null && this._regions.Count > 0; } /// <summary> /// Gets and sets the property StackSetName. /// <para> /// The name or unique ID of the stack set that you want to update. /// </para> /// </summary> [AWSProperty(Required=true)] public string StackSetName { get { return this._stackSetName; } set { this._stackSetName = value; } } // Check to see if StackSetName property is set internal bool IsSetStackSetName() { return this._stackSetName != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The key-value pairs to associate with this stack set and the stacks created from it. /// CloudFormation also propagates these tags to supported resources that are created /// in the stacks. You can specify a maximum number of 50 tags. /// </para> /// /// <para> /// If you specify tags for this parameter, those tags replace any list of tags that are /// currently associated with this stack set. This means: /// </para> /// <ul> <li> /// <para> /// If you don't specify this parameter, CloudFormation doesn't modify the stack's tags. /// </para> /// </li> <li> /// <para> /// If you specify <i>any</i> tags using this parameter, you must specify <i>all</i> the /// tags that you want associated with this stack set, even tags you've specified before /// (for example, when creating the stack set or during a previous update of the stack /// set.). Any tags that you don't include in the updated list of tags are removed from /// the stack set, and therefore from the stacks and resources as well. /// </para> /// </li> <li> /// <para> /// If you specify an empty value, CloudFormation removes all currently associated tags. /// </para> /// </li> </ul> /// <para> /// If you specify new tags as part of an <code>UpdateStackSet</code> action, CloudFormation /// checks to see if you have the required IAM permission to tag resources. If you omit /// tags that are currently associated with the stack set from the list of tags you specify, /// CloudFormation assumes that you want to remove those tags from the stack set, and /// checks to see if you have permission to untag resources. If you don't have the necessary /// permission(s), the entire <code>UpdateStackSet</code> action fails with an <code>access /// denied</code> error, and the stack set is not updated. /// </para> /// </summary> [AWSProperty(Max=50)] 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; } /// <summary> /// Gets and sets the property TemplateBody. /// <para> /// The structure that contains the template body, with a minimum length of 1 byte and /// a maximum length of 51,200 bytes. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html">Template /// Anatomy</a> in the CloudFormation User Guide. /// </para> /// /// <para> /// Conditional: You must specify only one of the following parameters: <code>TemplateBody</code> /// or <code>TemplateURL</code>—or set <code>UsePreviousTemplate</code> to true. /// </para> /// </summary> [AWSProperty(Min=1)] public string TemplateBody { get { return this._templateBody; } set { this._templateBody = value; } } // Check to see if TemplateBody property is set internal bool IsSetTemplateBody() { return this._templateBody != null; } /// <summary> /// Gets and sets the property TemplateURL. /// <para> /// The location of the file that contains the template body. The URL must point to a /// template (maximum size: 460,800 bytes) that is located in an Amazon S3 bucket or a /// Systems Manager document. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html">Template /// Anatomy</a> in the CloudFormation User Guide. /// </para> /// /// <para> /// Conditional: You must specify only one of the following parameters: <code>TemplateBody</code> /// or <code>TemplateURL</code>—or set <code>UsePreviousTemplate</code> to true. /// </para> /// </summary> [AWSProperty(Min=1, Max=1024)] public string TemplateURL { get { return this._templateURL; } set { this._templateURL = value; } } // Check to see if TemplateURL property is set internal bool IsSetTemplateURL() { return this._templateURL != null; } /// <summary> /// Gets and sets the property UsePreviousTemplate. /// <para> /// Use the existing template that's associated with the stack set that you're updating. /// </para> /// /// <para> /// Conditional: You must specify only one of the following parameters: <code>TemplateBody</code> /// or <code>TemplateURL</code>—or set <code>UsePreviousTemplate</code> to true. /// </para> /// </summary> public bool UsePreviousTemplate { get { return this._usePreviousTemplate.GetValueOrDefault(); } set { this._usePreviousTemplate = value; } } // Check to see if UsePreviousTemplate property is set internal bool IsSetUsePreviousTemplate() { return this._usePreviousTemplate.HasValue; } } }
708
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFormation.Model { /// <summary> /// This is the response object from the UpdateStackSet operation. /// </summary> public partial class UpdateStackSetResponse : AmazonWebServiceResponse { private string _operationId; /// <summary> /// Gets and sets the property OperationId. /// <para> /// The unique ID for this stack set operation. /// </para> /// </summary> [AWSProperty(Min=1, Max=128)] public string OperationId { get { return this._operationId; } set { this._operationId = value; } } // Check to see if OperationId property is set internal bool IsSetOperationId() { return this._operationId != 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFormation.Model { /// <summary> /// Container for the parameters to the UpdateTerminationProtection operation. /// Updates termination protection for the specified stack. If a user attempts to delete /// a stack with termination protection enabled, the operation fails and the stack remains /// unchanged. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html">Protecting /// a Stack From Being Deleted</a> in the <i>CloudFormation User Guide</i>. /// /// /// <para> /// For <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">nested /// stacks</a>, termination protection is set on the root stack and can't be changed directly /// on the nested stack. /// </para> /// </summary> public partial class UpdateTerminationProtectionRequest : AmazonCloudFormationRequest { private bool? _enableTerminationProtection; private string _stackName; /// <summary> /// Gets and sets the property EnableTerminationProtection. /// <para> /// Whether to enable termination protection on the specified stack. /// </para> /// </summary> [AWSProperty(Required=true)] public bool EnableTerminationProtection { get { return this._enableTerminationProtection.GetValueOrDefault(); } set { this._enableTerminationProtection = value; } } // Check to see if EnableTerminationProtection property is set internal bool IsSetEnableTerminationProtection() { return this._enableTerminationProtection.HasValue; } /// <summary> /// Gets and sets the property StackName. /// <para> /// The name or unique ID of the stack for which you want to set termination protection. /// </para> /// </summary> [AWSProperty(Required=true, Min=1)] public string StackName { get { return this._stackName; } set { this._stackName = value; } } // Check to see if StackName property is set internal bool IsSetStackName() { return this._stackName != null; } } }
89
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFormation.Model { /// <summary> /// This is the response object from the UpdateTerminationProtection operation. /// </summary> public partial class UpdateTerminationProtectionResponse : AmazonWebServiceResponse { private string _stackId; /// <summary> /// Gets and sets the property StackId. /// <para> /// The unique ID of the stack. /// </para> /// </summary> public string StackId { get { return this._stackId; } set { this._stackId = value; } } // Check to see if StackId property is set internal bool IsSetStackId() { return this._stackId != null; } } }
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFormation.Model { /// <summary> /// Container for the parameters to the ValidateTemplate operation. /// Validates a specified template. CloudFormation first checks if the template is valid /// JSON. If it isn't, CloudFormation checks if the template is valid YAML. If both these /// checks fail, CloudFormation returns a template validation error. /// </summary> public partial class ValidateTemplateRequest : AmazonCloudFormationRequest { private string _templateBody; private string _templateURL; /// <summary> /// Gets and sets the property TemplateBody. /// <para> /// Structure containing the template body with a minimum length of 1 byte and a maximum /// length of 51,200 bytes. For more information, go to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html">Template /// Anatomy</a> in the CloudFormation User Guide. /// </para> /// /// <para> /// Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. /// If both are passed, only <code>TemplateBody</code> is used. /// </para> /// </summary> [AWSProperty(Min=1)] public string TemplateBody { get { return this._templateBody; } set { this._templateBody = value; } } // Check to see if TemplateBody property is set internal bool IsSetTemplateBody() { return this._templateBody != null; } /// <summary> /// Gets and sets the property TemplateURL. /// <para> /// Location of file containing the template body. The URL must point to a template (max /// size: 460,800 bytes) that is located in an Amazon S3 bucket or a Systems Manager document. /// For more information, go to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html">Template /// Anatomy</a> in the CloudFormation User Guide. /// </para> /// /// <para> /// Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. /// If both are passed, only <code>TemplateBody</code> is used. /// </para> /// </summary> [AWSProperty(Min=1, Max=1024)] public string TemplateURL { get { return this._templateURL; } set { this._templateURL = value; } } // Check to see if TemplateURL property is set internal bool IsSetTemplateURL() { return this._templateURL != null; } } }
96
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFormation.Model { /// <summary> /// The output for <a>ValidateTemplate</a> action. /// </summary> public partial class ValidateTemplateResponse : AmazonWebServiceResponse { private List<string> _capabilities = new List<string>(); private string _capabilitiesReason; private List<string> _declaredTransforms = new List<string>(); private string _description; private List<TemplateParameter> _parameters = new List<TemplateParameter>(); /// <summary> /// Gets and sets the property Capabilities. /// <para> /// The capabilities found within the template. If your template contains IAM resources, /// you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter /// when you use the <a>CreateStack</a> or <a>UpdateStack</a> actions with your template; /// otherwise, those actions return an InsufficientCapabilities error. /// </para> /// /// <para> /// For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging /// IAM Resources in CloudFormation Templates</a>. /// </para> /// </summary> public List<string> Capabilities { get { return this._capabilities; } set { this._capabilities = value; } } // Check to see if Capabilities property is set internal bool IsSetCapabilities() { return this._capabilities != null && this._capabilities.Count > 0; } /// <summary> /// Gets and sets the property CapabilitiesReason. /// <para> /// The list of resources that generated the values in the <code>Capabilities</code> response /// element. /// </para> /// </summary> public string CapabilitiesReason { get { return this._capabilitiesReason; } set { this._capabilitiesReason = value; } } // Check to see if CapabilitiesReason property is set internal bool IsSetCapabilitiesReason() { return this._capabilitiesReason != null; } /// <summary> /// Gets and sets the property DeclaredTransforms. /// <para> /// A list of the transforms that are declared in the template. /// </para> /// </summary> public List<string> DeclaredTransforms { get { return this._declaredTransforms; } set { this._declaredTransforms = value; } } // Check to see if DeclaredTransforms property is set internal bool IsSetDeclaredTransforms() { return this._declaredTransforms != null && this._declaredTransforms.Count > 0; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description found within the template. /// </para> /// </summary> [AWSProperty(Min=1, Max=1024)] public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property Parameters. /// <para> /// A list of <code>TemplateParameter</code> structures. /// </para> /// </summary> public List<TemplateParameter> Parameters { get { return this._parameters; } set { this._parameters = value; } } // Check to see if Parameters property is set internal bool IsSetParameters() { return this._parameters != null && this._parameters.Count > 0; } } }
143
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AccountGateResult Object /// </summary> public class AccountGateResultUnmarshaller : IUnmarshaller<AccountGateResult, XmlUnmarshallerContext>, IUnmarshaller<AccountGateResult, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AccountGateResult Unmarshall(XmlUnmarshallerContext context) { AccountGateResult unmarshalledObject = new AccountGateResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StatusReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StatusReason = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public AccountGateResult Unmarshall(JsonUnmarshallerContext context) { return null; } private static AccountGateResultUnmarshaller _instance = new AccountGateResultUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AccountGateResultUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AccountLimit Object /// </summary> public class AccountLimitUnmarshaller : IUnmarshaller<AccountLimit, XmlUnmarshallerContext>, IUnmarshaller<AccountLimit, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AccountLimit Unmarshall(XmlUnmarshallerContext context) { AccountLimit unmarshalledObject = new AccountLimit(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Value", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Value = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public AccountLimit Unmarshall(JsonUnmarshallerContext context) { return null; } private static AccountLimitUnmarshaller _instance = new AccountLimitUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AccountLimitUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// ActivateOrganizationsAccess Request Marshaller /// </summary> public class ActivateOrganizationsAccessRequestMarshaller : IMarshaller<IRequest, ActivateOrganizationsAccessRequest> , 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((ActivateOrganizationsAccessRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ActivateOrganizationsAccessRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "ActivateOrganizationsAccess"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { } return request; } private static ActivateOrganizationsAccessRequestMarshaller _instance = new ActivateOrganizationsAccessRequestMarshaller(); internal static ActivateOrganizationsAccessRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ActivateOrganizationsAccessRequestMarshaller Instance { get { return _instance; } } } }
83
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ActivateOrganizationsAccess operation /// </summary> public class ActivateOrganizationsAccessResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ActivateOrganizationsAccessResponse response = new ActivateOrganizationsAccessResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("ActivateOrganizationsAccessResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="response")] private static void UnmarshallResult(XmlUnmarshallerContext context, ActivateOrganizationsAccessResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOperationException")) { return InvalidOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotFoundException")) { return OperationNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static ActivateOrganizationsAccessResponseUnmarshaller _instance = new ActivateOrganizationsAccessResponseUnmarshaller(); internal static ActivateOrganizationsAccessResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ActivateOrganizationsAccessResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// ActivateType Request Marshaller /// </summary> public class ActivateTypeRequestMarshaller : IMarshaller<IRequest, ActivateTypeRequest> , 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((ActivateTypeRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ActivateTypeRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "ActivateType"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetAutoUpdate()) { request.Parameters.Add("AutoUpdate", StringUtils.FromBool(publicRequest.AutoUpdate)); } if(publicRequest.IsSetExecutionRoleArn()) { request.Parameters.Add("ExecutionRoleArn", StringUtils.FromString(publicRequest.ExecutionRoleArn)); } if(publicRequest.IsSetLoggingConfig()) { if(publicRequest.LoggingConfig.IsSetLogGroupName()) { request.Parameters.Add("LoggingConfig" + "." + "LogGroupName", StringUtils.FromString(publicRequest.LoggingConfig.LogGroupName)); } if(publicRequest.LoggingConfig.IsSetLogRoleArn()) { request.Parameters.Add("LoggingConfig" + "." + "LogRoleArn", StringUtils.FromString(publicRequest.LoggingConfig.LogRoleArn)); } } if(publicRequest.IsSetMajorVersion()) { request.Parameters.Add("MajorVersion", StringUtils.FromLong(publicRequest.MajorVersion)); } if(publicRequest.IsSetPublicTypeArn()) { request.Parameters.Add("PublicTypeArn", StringUtils.FromString(publicRequest.PublicTypeArn)); } if(publicRequest.IsSetPublisherId()) { request.Parameters.Add("PublisherId", StringUtils.FromString(publicRequest.PublisherId)); } if(publicRequest.IsSetType()) { request.Parameters.Add("Type", StringUtils.FromString(publicRequest.Type)); } if(publicRequest.IsSetTypeName()) { request.Parameters.Add("TypeName", StringUtils.FromString(publicRequest.TypeName)); } if(publicRequest.IsSetTypeNameAlias()) { request.Parameters.Add("TypeNameAlias", StringUtils.FromString(publicRequest.TypeNameAlias)); } if(publicRequest.IsSetVersionBump()) { request.Parameters.Add("VersionBump", StringUtils.FromString(publicRequest.VersionBump)); } } return request; } private static ActivateTypeRequestMarshaller _instance = new ActivateTypeRequestMarshaller(); internal static ActivateTypeRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ActivateTypeRequestMarshaller Instance { get { return _instance; } } } }
130
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ActivateType operation /// </summary> public class ActivateTypeResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ActivateTypeResponse response = new ActivateTypeResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("ActivateTypeResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, ActivateTypeResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Arn = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("CFNRegistryException")) { return CFNRegistryExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TypeNotFoundException")) { return TypeNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static ActivateTypeResponseUnmarshaller _instance = new ActivateTypeResponseUnmarshaller(); internal static ActivateTypeResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ActivateTypeResponseUnmarshaller Instance { get { return _instance; } } } }
145
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AlreadyExistsException operation /// </summary> public class AlreadyExistsExceptionUnmarshaller : IErrorResponseUnmarshaller<AlreadyExistsException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AlreadyExistsException Unmarshall(XmlUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public AlreadyExistsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { AlreadyExistsException response = new AlreadyExistsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static AlreadyExistsExceptionUnmarshaller _instance = new AlreadyExistsExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AlreadyExistsExceptionUnmarshaller Instance { get { return _instance; } } } }
88
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AutoDeployment Object /// </summary> public class AutoDeploymentUnmarshaller : IUnmarshaller<AutoDeployment, XmlUnmarshallerContext>, IUnmarshaller<AutoDeployment, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AutoDeployment Unmarshall(XmlUnmarshallerContext context) { AutoDeployment unmarshalledObject = new AutoDeployment(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Enabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Enabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RetainStacksOnAccountRemoval", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.RetainStacksOnAccountRemoval = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public AutoDeployment Unmarshall(JsonUnmarshallerContext context) { return null; } private static AutoDeploymentUnmarshaller _instance = new AutoDeploymentUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AutoDeploymentUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchDescribeTypeConfigurationsError Object /// </summary> public class BatchDescribeTypeConfigurationsErrorUnmarshaller : IUnmarshaller<BatchDescribeTypeConfigurationsError, XmlUnmarshallerContext>, IUnmarshaller<BatchDescribeTypeConfigurationsError, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchDescribeTypeConfigurationsError Unmarshall(XmlUnmarshallerContext context) { BatchDescribeTypeConfigurationsError unmarshalledObject = new BatchDescribeTypeConfigurationsError(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ErrorCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ErrorCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ErrorMessage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ErrorMessage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TypeConfigurationIdentifier", targetDepth)) { var unmarshaller = TypeConfigurationIdentifierUnmarshaller.Instance; unmarshalledObject.TypeConfigurationIdentifier = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchDescribeTypeConfigurationsError Unmarshall(JsonUnmarshallerContext context) { return null; } private static BatchDescribeTypeConfigurationsErrorUnmarshaller _instance = new BatchDescribeTypeConfigurationsErrorUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchDescribeTypeConfigurationsErrorUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// BatchDescribeTypeConfigurations Request Marshaller /// </summary> public class BatchDescribeTypeConfigurationsRequestMarshaller : IMarshaller<IRequest, BatchDescribeTypeConfigurationsRequest> , 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((BatchDescribeTypeConfigurationsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(BatchDescribeTypeConfigurationsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "BatchDescribeTypeConfigurations"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetTypeConfigurationIdentifiers()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.TypeConfigurationIdentifiers) { if(publicRequestlistValue.IsSetType()) { request.Parameters.Add("TypeConfigurationIdentifiers" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Type", StringUtils.FromString(publicRequestlistValue.Type)); } if(publicRequestlistValue.IsSetTypeArn()) { request.Parameters.Add("TypeConfigurationIdentifiers" + "." + "member" + "." + publicRequestlistValueIndex + "." + "TypeArn", StringUtils.FromString(publicRequestlistValue.TypeArn)); } if(publicRequestlistValue.IsSetTypeConfigurationAlias()) { request.Parameters.Add("TypeConfigurationIdentifiers" + "." + "member" + "." + publicRequestlistValueIndex + "." + "TypeConfigurationAlias", StringUtils.FromString(publicRequestlistValue.TypeConfigurationAlias)); } if(publicRequestlistValue.IsSetTypeConfigurationArn()) { request.Parameters.Add("TypeConfigurationIdentifiers" + "." + "member" + "." + publicRequestlistValueIndex + "." + "TypeConfigurationArn", StringUtils.FromString(publicRequestlistValue.TypeConfigurationArn)); } if(publicRequestlistValue.IsSetTypeName()) { request.Parameters.Add("TypeConfigurationIdentifiers" + "." + "member" + "." + publicRequestlistValueIndex + "." + "TypeName", StringUtils.FromString(publicRequestlistValue.TypeName)); } publicRequestlistValueIndex++; } } } return request; } private static BatchDescribeTypeConfigurationsRequestMarshaller _instance = new BatchDescribeTypeConfigurationsRequestMarshaller(); internal static BatchDescribeTypeConfigurationsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static BatchDescribeTypeConfigurationsRequestMarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchDescribeTypeConfigurations operation /// </summary> public class BatchDescribeTypeConfigurationsResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { BatchDescribeTypeConfigurationsResponse response = new BatchDescribeTypeConfigurationsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("BatchDescribeTypeConfigurationsResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, BatchDescribeTypeConfigurationsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Errors/member", targetDepth)) { var unmarshaller = BatchDescribeTypeConfigurationsErrorUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Errors.Add(item); continue; } if (context.TestExpression("TypeConfigurations/member", targetDepth)) { var unmarshaller = TypeConfigurationDetailsUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.TypeConfigurations.Add(item); continue; } if (context.TestExpression("UnprocessedTypeConfigurations/member", targetDepth)) { var unmarshaller = TypeConfigurationIdentifierUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.UnprocessedTypeConfigurations.Add(item); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("CFNRegistryException")) { return CFNRegistryExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TypeConfigurationNotFoundException")) { return TypeConfigurationNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static BatchDescribeTypeConfigurationsResponseUnmarshaller _instance = new BatchDescribeTypeConfigurationsResponseUnmarshaller(); internal static BatchDescribeTypeConfigurationsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static BatchDescribeTypeConfigurationsResponseUnmarshaller Instance { get { return _instance; } } } }
160
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// CancelUpdateStack Request Marshaller /// </summary> public class CancelUpdateStackRequestMarshaller : IMarshaller<IRequest, CancelUpdateStackRequest> , 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((CancelUpdateStackRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CancelUpdateStackRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "CancelUpdateStack"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetClientRequestToken()) { request.Parameters.Add("ClientRequestToken", StringUtils.FromString(publicRequest.ClientRequestToken)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static CancelUpdateStackRequestMarshaller _instance = new CancelUpdateStackRequestMarshaller(); internal static CancelUpdateStackRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CancelUpdateStackRequestMarshaller Instance { get { return _instance; } } } }
91
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CancelUpdateStack operation /// </summary> public class CancelUpdateStackResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CancelUpdateStackResponse response = new CancelUpdateStackResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("CancelUpdateStackResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="response")] private static void UnmarshallResult(XmlUnmarshallerContext context, CancelUpdateStackResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("TokenAlreadyExistsException")) { return TokenAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static CancelUpdateStackResponseUnmarshaller _instance = new CancelUpdateStackResponseUnmarshaller(); internal static CancelUpdateStackResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CancelUpdateStackResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CFNRegistryException operation /// </summary> public class CFNRegistryExceptionUnmarshaller : IErrorResponseUnmarshaller<CFNRegistryException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public CFNRegistryException Unmarshall(XmlUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public CFNRegistryException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { CFNRegistryException response = new CFNRegistryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static CFNRegistryExceptionUnmarshaller _instance = new CFNRegistryExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CFNRegistryExceptionUnmarshaller Instance { get { return _instance; } } } }
88
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ChangeSetHookResourceTargetDetails Object /// </summary> public class ChangeSetHookResourceTargetDetailsUnmarshaller : IUnmarshaller<ChangeSetHookResourceTargetDetails, XmlUnmarshallerContext>, IUnmarshaller<ChangeSetHookResourceTargetDetails, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ChangeSetHookResourceTargetDetails Unmarshall(XmlUnmarshallerContext context) { ChangeSetHookResourceTargetDetails unmarshalledObject = new ChangeSetHookResourceTargetDetails(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("LogicalResourceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LogicalResourceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ResourceAction", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceAction = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ResourceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceType = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public ChangeSetHookResourceTargetDetails Unmarshall(JsonUnmarshallerContext context) { return null; } private static ChangeSetHookResourceTargetDetailsUnmarshaller _instance = new ChangeSetHookResourceTargetDetailsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChangeSetHookResourceTargetDetailsUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ChangeSetHookTargetDetails Object /// </summary> public class ChangeSetHookTargetDetailsUnmarshaller : IUnmarshaller<ChangeSetHookTargetDetails, XmlUnmarshallerContext>, IUnmarshaller<ChangeSetHookTargetDetails, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ChangeSetHookTargetDetails Unmarshall(XmlUnmarshallerContext context) { ChangeSetHookTargetDetails unmarshalledObject = new ChangeSetHookTargetDetails(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ResourceTargetDetails", targetDepth)) { var unmarshaller = ChangeSetHookResourceTargetDetailsUnmarshaller.Instance; unmarshalledObject.ResourceTargetDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TargetType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TargetType = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public ChangeSetHookTargetDetails Unmarshall(JsonUnmarshallerContext context) { return null; } private static ChangeSetHookTargetDetailsUnmarshaller _instance = new ChangeSetHookTargetDetailsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChangeSetHookTargetDetailsUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ChangeSetHook Object /// </summary> public class ChangeSetHookUnmarshaller : IUnmarshaller<ChangeSetHook, XmlUnmarshallerContext>, IUnmarshaller<ChangeSetHook, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ChangeSetHook Unmarshall(XmlUnmarshallerContext context) { ChangeSetHook unmarshalledObject = new ChangeSetHook(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FailureMode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FailureMode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("InvocationPoint", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.InvocationPoint = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TargetDetails", targetDepth)) { var unmarshaller = ChangeSetHookTargetDetailsUnmarshaller.Instance; unmarshalledObject.TargetDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TypeConfigurationVersionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TypeConfigurationVersionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TypeName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TypeName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TypeVersionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TypeVersionId = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public ChangeSetHook Unmarshall(JsonUnmarshallerContext context) { return null; } private static ChangeSetHookUnmarshaller _instance = new ChangeSetHookUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChangeSetHookUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ChangeSetNotFoundException operation /// </summary> public class ChangeSetNotFoundExceptionUnmarshaller : IErrorResponseUnmarshaller<ChangeSetNotFoundException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ChangeSetNotFoundException Unmarshall(XmlUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public ChangeSetNotFoundException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { ChangeSetNotFoundException response = new ChangeSetNotFoundException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static ChangeSetNotFoundExceptionUnmarshaller _instance = new ChangeSetNotFoundExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChangeSetNotFoundExceptionUnmarshaller Instance { get { return _instance; } } } }
88
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ChangeSetSummary Object /// </summary> public class ChangeSetSummaryUnmarshaller : IUnmarshaller<ChangeSetSummary, XmlUnmarshallerContext>, IUnmarshaller<ChangeSetSummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ChangeSetSummary Unmarshall(XmlUnmarshallerContext context) { ChangeSetSummary unmarshalledObject = new ChangeSetSummary(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ChangeSetId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ChangeSetId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChangeSetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ChangeSetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExecutionStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ExecutionStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IncludeNestedStacks", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IncludeNestedStacks = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ParentChangeSetId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ParentChangeSetId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RootChangeSetId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RootChangeSetId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StackId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StackName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StatusReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StatusReason = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public ChangeSetSummary Unmarshall(JsonUnmarshallerContext context) { return null; } private static ChangeSetSummaryUnmarshaller _instance = new ChangeSetSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChangeSetSummaryUnmarshaller Instance { get { return _instance; } } } }
163
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Change Object /// </summary> public class ChangeUnmarshaller : IUnmarshaller<Change, XmlUnmarshallerContext>, IUnmarshaller<Change, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Change Unmarshall(XmlUnmarshallerContext context) { Change unmarshalledObject = new Change(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("HookInvocationCount", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.HookInvocationCount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ResourceChange", targetDepth)) { var unmarshaller = ResourceChangeUnmarshaller.Instance; unmarshalledObject.ResourceChange = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public Change Unmarshall(JsonUnmarshallerContext context) { return null; } private static ChangeUnmarshaller _instance = new ChangeUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChangeUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// ContinueUpdateRollback Request Marshaller /// </summary> public class ContinueUpdateRollbackRequestMarshaller : IMarshaller<IRequest, ContinueUpdateRollbackRequest> , 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((ContinueUpdateRollbackRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ContinueUpdateRollbackRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "ContinueUpdateRollback"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetClientRequestToken()) { request.Parameters.Add("ClientRequestToken", StringUtils.FromString(publicRequest.ClientRequestToken)); } if(publicRequest.IsSetResourcesToSkip()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.ResourcesToSkip) { request.Parameters.Add("ResourcesToSkip" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetRoleARN()) { request.Parameters.Add("RoleARN", StringUtils.FromString(publicRequest.RoleARN)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static ContinueUpdateRollbackRequestMarshaller _instance = new ContinueUpdateRollbackRequestMarshaller(); internal static ContinueUpdateRollbackRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ContinueUpdateRollbackRequestMarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ContinueUpdateRollback operation /// </summary> public class ContinueUpdateRollbackResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ContinueUpdateRollbackResponse response = new ContinueUpdateRollbackResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("ContinueUpdateRollbackResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="response")] private static void UnmarshallResult(XmlUnmarshallerContext context, ContinueUpdateRollbackResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("TokenAlreadyExistsException")) { return TokenAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static ContinueUpdateRollbackResponseUnmarshaller _instance = new ContinueUpdateRollbackResponseUnmarshaller(); internal static ContinueUpdateRollbackResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ContinueUpdateRollbackResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// CreateChangeSet Request Marshaller /// </summary> public class CreateChangeSetRequestMarshaller : IMarshaller<IRequest, CreateChangeSetRequest> , 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((CreateChangeSetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateChangeSetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "CreateChangeSet"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetCapabilities()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Capabilities) { request.Parameters.Add("Capabilities" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetChangeSetName()) { request.Parameters.Add("ChangeSetName", StringUtils.FromString(publicRequest.ChangeSetName)); } if(publicRequest.IsSetChangeSetType()) { request.Parameters.Add("ChangeSetType", StringUtils.FromString(publicRequest.ChangeSetType)); } if(publicRequest.IsSetClientToken()) { request.Parameters.Add("ClientToken", StringUtils.FromString(publicRequest.ClientToken)); } if(publicRequest.IsSetDescription()) { request.Parameters.Add("Description", StringUtils.FromString(publicRequest.Description)); } if(publicRequest.IsSetIncludeNestedStacks()) { request.Parameters.Add("IncludeNestedStacks", StringUtils.FromBool(publicRequest.IncludeNestedStacks)); } if(publicRequest.IsSetNotificationARNs()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.NotificationARNs) { request.Parameters.Add("NotificationARNs" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetOnStackFailure()) { request.Parameters.Add("OnStackFailure", StringUtils.FromString(publicRequest.OnStackFailure)); } if(publicRequest.IsSetParameters()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Parameters) { if(publicRequestlistValue.IsSetParameterKey()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterKey", StringUtils.FromString(publicRequestlistValue.ParameterKey)); } if(publicRequestlistValue.IsSetParameterValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterValue", StringUtils.FromString(publicRequestlistValue.ParameterValue)); } if(publicRequestlistValue.IsSetResolvedValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResolvedValue", StringUtils.FromString(publicRequestlistValue.ResolvedValue)); } if(publicRequestlistValue.IsSetUsePreviousValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "UsePreviousValue", StringUtils.FromBool(publicRequestlistValue.UsePreviousValue)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetResourcesToImport()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.ResourcesToImport) { if(publicRequestlistValue.IsSetLogicalResourceId()) { request.Parameters.Add("ResourcesToImport" + "." + "member" + "." + publicRequestlistValueIndex + "." + "LogicalResourceId", StringUtils.FromString(publicRequestlistValue.LogicalResourceId)); } if(publicRequestlistValue.IsSetResourceIdentifier()) { int mapIndex = 1; foreach(var key in publicRequestlistValue.ResourceIdentifier.Keys) { String value; bool hasValue = publicRequestlistValue.ResourceIdentifier.TryGetValue(key, out value); request.Parameters.Add("ResourcesToImport" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResourceIdentifier" + "." + "entry" + "." + mapIndex + "." + "key", StringUtils.FromString(key)); if (hasValue) { request.Parameters.Add("ResourcesToImport" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResourceIdentifier" + "." + "entry" + "." + mapIndex + "." + "value", StringUtils.FromString(value)); } mapIndex++; } } if(publicRequestlistValue.IsSetResourceType()) { request.Parameters.Add("ResourcesToImport" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResourceType", StringUtils.FromString(publicRequestlistValue.ResourceType)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetResourceTypes()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.ResourceTypes) { request.Parameters.Add("ResourceTypes" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetRoleARN()) { request.Parameters.Add("RoleARN", StringUtils.FromString(publicRequest.RoleARN)); } if(publicRequest.IsSetRollbackConfiguration()) { if(publicRequest.RollbackConfiguration.IsSetMonitoringTimeInMinutes()) { request.Parameters.Add("RollbackConfiguration" + "." + "MonitoringTimeInMinutes", StringUtils.FromInt(publicRequest.RollbackConfiguration.MonitoringTimeInMinutes)); } if(publicRequest.RollbackConfiguration.IsSetRollbackTriggers()) { int publicRequestRollbackConfigurationlistValueIndex = 1; foreach(var publicRequestRollbackConfigurationlistValue in publicRequest.RollbackConfiguration.RollbackTriggers) { if(publicRequestRollbackConfigurationlistValue.IsSetArn()) { request.Parameters.Add("RollbackConfiguration" + "." + "RollbackTriggers" + "." + "member" + "." + publicRequestRollbackConfigurationlistValueIndex + "." + "Arn", StringUtils.FromString(publicRequestRollbackConfigurationlistValue.Arn)); } if(publicRequestRollbackConfigurationlistValue.IsSetType()) { request.Parameters.Add("RollbackConfiguration" + "." + "RollbackTriggers" + "." + "member" + "." + publicRequestRollbackConfigurationlistValueIndex + "." + "Type", StringUtils.FromString(publicRequestRollbackConfigurationlistValue.Type)); } publicRequestRollbackConfigurationlistValueIndex++; } } } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } if(publicRequest.IsSetTags()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Tags) { if(publicRequestlistValue.IsSetKey()) { request.Parameters.Add("Tags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Key", StringUtils.FromString(publicRequestlistValue.Key)); } if(publicRequestlistValue.IsSetValue()) { request.Parameters.Add("Tags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Value", StringUtils.FromString(publicRequestlistValue.Value)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetTemplateBody()) { request.Parameters.Add("TemplateBody", StringUtils.FromString(publicRequest.TemplateBody)); } if(publicRequest.IsSetTemplateURL()) { request.Parameters.Add("TemplateURL", StringUtils.FromString(publicRequest.TemplateURL)); } if(publicRequest.IsSetUsePreviousTemplate()) { request.Parameters.Add("UsePreviousTemplate", StringUtils.FromBool(publicRequest.UsePreviousTemplate)); } } return request; } private static CreateChangeSetRequestMarshaller _instance = new CreateChangeSetRequestMarshaller(); internal static CreateChangeSetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChangeSetRequestMarshaller Instance { get { return _instance; } } } }
248
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateChangeSet operation /// </summary> public class CreateChangeSetResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateChangeSetResponse response = new CreateChangeSetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("CreateChangeSetResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, CreateChangeSetResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackId = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientCapabilitiesException")) { return InsufficientCapabilitiesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static CreateChangeSetResponseUnmarshaller _instance = new CreateChangeSetResponseUnmarshaller(); internal static CreateChangeSetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChangeSetResponseUnmarshaller Instance { get { return _instance; } } } }
155
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreatedButModifiedException operation /// </summary> public class CreatedButModifiedExceptionUnmarshaller : IErrorResponseUnmarshaller<CreatedButModifiedException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public CreatedButModifiedException Unmarshall(XmlUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public CreatedButModifiedException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { CreatedButModifiedException response = new CreatedButModifiedException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static CreatedButModifiedExceptionUnmarshaller _instance = new CreatedButModifiedExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CreatedButModifiedExceptionUnmarshaller Instance { get { return _instance; } } } }
88
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// CreateStackInstances Request Marshaller /// </summary> public class CreateStackInstancesRequestMarshaller : IMarshaller<IRequest, CreateStackInstancesRequest> , 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((CreateStackInstancesRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateStackInstancesRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "CreateStackInstances"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetAccounts()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Accounts) { request.Parameters.Add("Accounts" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetCallAs()) { request.Parameters.Add("CallAs", StringUtils.FromString(publicRequest.CallAs)); } if(publicRequest.IsSetDeploymentTargets()) { if(publicRequest.DeploymentTargets.IsSetAccountFilterType()) { request.Parameters.Add("DeploymentTargets" + "." + "AccountFilterType", StringUtils.FromString(publicRequest.DeploymentTargets.AccountFilterType)); } if(publicRequest.DeploymentTargets.IsSetAccounts()) { int publicRequestDeploymentTargetslistValueIndex = 1; foreach(var publicRequestDeploymentTargetslistValue in publicRequest.DeploymentTargets.Accounts) { request.Parameters.Add("DeploymentTargets" + "." + "Accounts" + "." + "member" + "." + publicRequestDeploymentTargetslistValueIndex, StringUtils.FromString(publicRequestDeploymentTargetslistValue)); publicRequestDeploymentTargetslistValueIndex++; } } if(publicRequest.DeploymentTargets.IsSetAccountsUrl()) { request.Parameters.Add("DeploymentTargets" + "." + "AccountsUrl", StringUtils.FromString(publicRequest.DeploymentTargets.AccountsUrl)); } if(publicRequest.DeploymentTargets.IsSetOrganizationalUnitIds()) { int publicRequestDeploymentTargetslistValueIndex = 1; foreach(var publicRequestDeploymentTargetslistValue in publicRequest.DeploymentTargets.OrganizationalUnitIds) { request.Parameters.Add("DeploymentTargets" + "." + "OrganizationalUnitIds" + "." + "member" + "." + publicRequestDeploymentTargetslistValueIndex, StringUtils.FromString(publicRequestDeploymentTargetslistValue)); publicRequestDeploymentTargetslistValueIndex++; } } } if(publicRequest.IsSetOperationId()) { request.Parameters.Add("OperationId", StringUtils.FromString(publicRequest.OperationId)); } else if(!(publicRequest.IsSetOperationId())) { request.Parameters.Add("OperationId", StringUtils.FromString(Guid.NewGuid().ToString())); } if(publicRequest.IsSetOperationPreferences()) { if(publicRequest.OperationPreferences.IsSetFailureToleranceCount()) { request.Parameters.Add("OperationPreferences" + "." + "FailureToleranceCount", StringUtils.FromInt(publicRequest.OperationPreferences.FailureToleranceCount)); } if(publicRequest.OperationPreferences.IsSetFailureTolerancePercentage()) { request.Parameters.Add("OperationPreferences" + "." + "FailureTolerancePercentage", StringUtils.FromInt(publicRequest.OperationPreferences.FailureTolerancePercentage)); } if(publicRequest.OperationPreferences.IsSetMaxConcurrentCount()) { request.Parameters.Add("OperationPreferences" + "." + "MaxConcurrentCount", StringUtils.FromInt(publicRequest.OperationPreferences.MaxConcurrentCount)); } if(publicRequest.OperationPreferences.IsSetMaxConcurrentPercentage()) { request.Parameters.Add("OperationPreferences" + "." + "MaxConcurrentPercentage", StringUtils.FromInt(publicRequest.OperationPreferences.MaxConcurrentPercentage)); } if(publicRequest.OperationPreferences.IsSetRegionConcurrencyType()) { request.Parameters.Add("OperationPreferences" + "." + "RegionConcurrencyType", StringUtils.FromString(publicRequest.OperationPreferences.RegionConcurrencyType)); } if(publicRequest.OperationPreferences.IsSetRegionOrder()) { int publicRequestOperationPreferenceslistValueIndex = 1; foreach(var publicRequestOperationPreferenceslistValue in publicRequest.OperationPreferences.RegionOrder) { request.Parameters.Add("OperationPreferences" + "." + "RegionOrder" + "." + "member" + "." + publicRequestOperationPreferenceslistValueIndex, StringUtils.FromString(publicRequestOperationPreferenceslistValue)); publicRequestOperationPreferenceslistValueIndex++; } } } if(publicRequest.IsSetParameterOverrides()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.ParameterOverrides) { if(publicRequestlistValue.IsSetParameterKey()) { request.Parameters.Add("ParameterOverrides" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterKey", StringUtils.FromString(publicRequestlistValue.ParameterKey)); } if(publicRequestlistValue.IsSetParameterValue()) { request.Parameters.Add("ParameterOverrides" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterValue", StringUtils.FromString(publicRequestlistValue.ParameterValue)); } if(publicRequestlistValue.IsSetResolvedValue()) { request.Parameters.Add("ParameterOverrides" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResolvedValue", StringUtils.FromString(publicRequestlistValue.ResolvedValue)); } if(publicRequestlistValue.IsSetUsePreviousValue()) { request.Parameters.Add("ParameterOverrides" + "." + "member" + "." + publicRequestlistValueIndex + "." + "UsePreviousValue", StringUtils.FromBool(publicRequestlistValue.UsePreviousValue)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetRegions()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Regions) { request.Parameters.Add("Regions" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetStackSetName()) { request.Parameters.Add("StackSetName", StringUtils.FromString(publicRequest.StackSetName)); } } return request; } private static CreateStackInstancesRequestMarshaller _instance = new CreateStackInstancesRequestMarshaller(); internal static CreateStackInstancesRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStackInstancesRequestMarshaller Instance { get { return _instance; } } } }
202
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateStackInstances operation /// </summary> public class CreateStackInstancesResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateStackInstancesResponse response = new CreateStackInstancesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("CreateStackInstancesResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, CreateStackInstancesResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("OperationId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OperationId = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOperationException")) { return InvalidOperationExceptionUnmarshaller.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("OperationIdAlreadyExistsException")) { return OperationIdAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationInProgressException")) { return OperationInProgressExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("StackSetNotFoundException")) { return StackSetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("StaleRequestException")) { return StaleRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static CreateStackInstancesResponseUnmarshaller _instance = new CreateStackInstancesResponseUnmarshaller(); internal static CreateStackInstancesResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStackInstancesResponseUnmarshaller Instance { get { return _instance; } } } }
161
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// CreateStack Request Marshaller /// </summary> public class CreateStackRequestMarshaller : IMarshaller<IRequest, CreateStackRequest> , 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((CreateStackRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateStackRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "CreateStack"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetCapabilities()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Capabilities) { request.Parameters.Add("Capabilities" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetClientRequestToken()) { request.Parameters.Add("ClientRequestToken", StringUtils.FromString(publicRequest.ClientRequestToken)); } if(publicRequest.IsSetDisableRollback()) { request.Parameters.Add("DisableRollback", StringUtils.FromBool(publicRequest.DisableRollback)); } if(publicRequest.IsSetEnableTerminationProtection()) { request.Parameters.Add("EnableTerminationProtection", StringUtils.FromBool(publicRequest.EnableTerminationProtection)); } if(publicRequest.IsSetNotificationARNs()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.NotificationARNs) { request.Parameters.Add("NotificationARNs" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetOnFailure()) { request.Parameters.Add("OnFailure", StringUtils.FromString(publicRequest.OnFailure)); } if(publicRequest.IsSetParameters()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Parameters) { if(publicRequestlistValue.IsSetParameterKey()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterKey", StringUtils.FromString(publicRequestlistValue.ParameterKey)); } if(publicRequestlistValue.IsSetParameterValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterValue", StringUtils.FromString(publicRequestlistValue.ParameterValue)); } if(publicRequestlistValue.IsSetResolvedValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResolvedValue", StringUtils.FromString(publicRequestlistValue.ResolvedValue)); } if(publicRequestlistValue.IsSetUsePreviousValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "UsePreviousValue", StringUtils.FromBool(publicRequestlistValue.UsePreviousValue)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetResourceTypes()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.ResourceTypes) { request.Parameters.Add("ResourceTypes" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetRoleARN()) { request.Parameters.Add("RoleARN", StringUtils.FromString(publicRequest.RoleARN)); } if(publicRequest.IsSetRollbackConfiguration()) { if(publicRequest.RollbackConfiguration.IsSetMonitoringTimeInMinutes()) { request.Parameters.Add("RollbackConfiguration" + "." + "MonitoringTimeInMinutes", StringUtils.FromInt(publicRequest.RollbackConfiguration.MonitoringTimeInMinutes)); } if(publicRequest.RollbackConfiguration.IsSetRollbackTriggers()) { int publicRequestRollbackConfigurationlistValueIndex = 1; foreach(var publicRequestRollbackConfigurationlistValue in publicRequest.RollbackConfiguration.RollbackTriggers) { if(publicRequestRollbackConfigurationlistValue.IsSetArn()) { request.Parameters.Add("RollbackConfiguration" + "." + "RollbackTriggers" + "." + "member" + "." + publicRequestRollbackConfigurationlistValueIndex + "." + "Arn", StringUtils.FromString(publicRequestRollbackConfigurationlistValue.Arn)); } if(publicRequestRollbackConfigurationlistValue.IsSetType()) { request.Parameters.Add("RollbackConfiguration" + "." + "RollbackTriggers" + "." + "member" + "." + publicRequestRollbackConfigurationlistValueIndex + "." + "Type", StringUtils.FromString(publicRequestRollbackConfigurationlistValue.Type)); } publicRequestRollbackConfigurationlistValueIndex++; } } } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } if(publicRequest.IsSetStackPolicyBody()) { request.Parameters.Add("StackPolicyBody", StringUtils.FromString(publicRequest.StackPolicyBody)); } if(publicRequest.IsSetStackPolicyURL()) { request.Parameters.Add("StackPolicyURL", StringUtils.FromString(publicRequest.StackPolicyURL)); } if(publicRequest.IsSetTags()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Tags) { if(publicRequestlistValue.IsSetKey()) { request.Parameters.Add("Tags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Key", StringUtils.FromString(publicRequestlistValue.Key)); } if(publicRequestlistValue.IsSetValue()) { request.Parameters.Add("Tags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Value", StringUtils.FromString(publicRequestlistValue.Value)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetTemplateBody()) { request.Parameters.Add("TemplateBody", StringUtils.FromString(publicRequest.TemplateBody)); } if(publicRequest.IsSetTemplateURL()) { request.Parameters.Add("TemplateURL", StringUtils.FromString(publicRequest.TemplateURL)); } if(publicRequest.IsSetTimeoutInMinutes()) { request.Parameters.Add("TimeoutInMinutes", StringUtils.FromInt(publicRequest.TimeoutInMinutes)); } } return request; } private static CreateStackRequestMarshaller _instance = new CreateStackRequestMarshaller(); internal static CreateStackRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStackRequestMarshaller Instance { get { return _instance; } } } }
217
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateStack operation /// </summary> public class CreateStackResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateStackResponse response = new CreateStackResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("CreateStackResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, CreateStackResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("StackId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackId = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientCapabilitiesException")) { return InsufficientCapabilitiesExceptionUnmarshaller.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("TokenAlreadyExistsException")) { return TokenAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static CreateStackResponseUnmarshaller _instance = new CreateStackResponseUnmarshaller(); internal static CreateStackResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStackResponseUnmarshaller Instance { get { return _instance; } } } }
153
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// CreateStackSet Request Marshaller /// </summary> public class CreateStackSetRequestMarshaller : IMarshaller<IRequest, CreateStackSetRequest> , 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((CreateStackSetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateStackSetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "CreateStackSet"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetAdministrationRoleARN()) { request.Parameters.Add("AdministrationRoleARN", StringUtils.FromString(publicRequest.AdministrationRoleARN)); } if(publicRequest.IsSetAutoDeployment()) { if(publicRequest.AutoDeployment.IsSetEnabled()) { request.Parameters.Add("AutoDeployment" + "." + "Enabled", StringUtils.FromBool(publicRequest.AutoDeployment.Enabled)); } if(publicRequest.AutoDeployment.IsSetRetainStacksOnAccountRemoval()) { request.Parameters.Add("AutoDeployment" + "." + "RetainStacksOnAccountRemoval", StringUtils.FromBool(publicRequest.AutoDeployment.RetainStacksOnAccountRemoval)); } } if(publicRequest.IsSetCallAs()) { request.Parameters.Add("CallAs", StringUtils.FromString(publicRequest.CallAs)); } if(publicRequest.IsSetCapabilities()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Capabilities) { request.Parameters.Add("Capabilities" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetClientRequestToken()) { request.Parameters.Add("ClientRequestToken", StringUtils.FromString(publicRequest.ClientRequestToken)); } else if(!(publicRequest.IsSetClientRequestToken())) { request.Parameters.Add("ClientRequestToken", StringUtils.FromString(Guid.NewGuid().ToString())); } if(publicRequest.IsSetDescription()) { request.Parameters.Add("Description", StringUtils.FromString(publicRequest.Description)); } if(publicRequest.IsSetExecutionRoleName()) { request.Parameters.Add("ExecutionRoleName", StringUtils.FromString(publicRequest.ExecutionRoleName)); } if(publicRequest.IsSetManagedExecution()) { if(publicRequest.ManagedExecution.IsSetActive()) { request.Parameters.Add("ManagedExecution" + "." + "Active", StringUtils.FromBool(publicRequest.ManagedExecution.Active)); } } if(publicRequest.IsSetParameters()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Parameters) { if(publicRequestlistValue.IsSetParameterKey()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterKey", StringUtils.FromString(publicRequestlistValue.ParameterKey)); } if(publicRequestlistValue.IsSetParameterValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterValue", StringUtils.FromString(publicRequestlistValue.ParameterValue)); } if(publicRequestlistValue.IsSetResolvedValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResolvedValue", StringUtils.FromString(publicRequestlistValue.ResolvedValue)); } if(publicRequestlistValue.IsSetUsePreviousValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "UsePreviousValue", StringUtils.FromBool(publicRequestlistValue.UsePreviousValue)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetPermissionModel()) { request.Parameters.Add("PermissionModel", StringUtils.FromString(publicRequest.PermissionModel)); } if(publicRequest.IsSetStackId()) { request.Parameters.Add("StackId", StringUtils.FromString(publicRequest.StackId)); } if(publicRequest.IsSetStackSetName()) { request.Parameters.Add("StackSetName", StringUtils.FromString(publicRequest.StackSetName)); } if(publicRequest.IsSetTags()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Tags) { if(publicRequestlistValue.IsSetKey()) { request.Parameters.Add("Tags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Key", StringUtils.FromString(publicRequestlistValue.Key)); } if(publicRequestlistValue.IsSetValue()) { request.Parameters.Add("Tags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Value", StringUtils.FromString(publicRequestlistValue.Value)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetTemplateBody()) { request.Parameters.Add("TemplateBody", StringUtils.FromString(publicRequest.TemplateBody)); } if(publicRequest.IsSetTemplateURL()) { request.Parameters.Add("TemplateURL", StringUtils.FromString(publicRequest.TemplateURL)); } } return request; } private static CreateStackSetRequestMarshaller _instance = new CreateStackSetRequestMarshaller(); internal static CreateStackSetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStackSetRequestMarshaller Instance { get { return _instance; } } } }
194
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateStackSet operation /// </summary> public class CreateStackSetResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateStackSetResponse response = new CreateStackSetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("CreateStackSetResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, CreateStackSetResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("StackSetId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackSetId = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("CreatedButModifiedException")) { return CreatedButModifiedExceptionUnmarshaller.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("NameAlreadyExistsException")) { return NameAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static CreateStackSetResponseUnmarshaller _instance = new CreateStackSetResponseUnmarshaller(); internal static CreateStackSetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStackSetResponseUnmarshaller Instance { get { return _instance; } } } }
149
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DeactivateOrganizationsAccess Request Marshaller /// </summary> public class DeactivateOrganizationsAccessRequestMarshaller : IMarshaller<IRequest, DeactivateOrganizationsAccessRequest> , 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((DeactivateOrganizationsAccessRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeactivateOrganizationsAccessRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DeactivateOrganizationsAccess"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { } return request; } private static DeactivateOrganizationsAccessRequestMarshaller _instance = new DeactivateOrganizationsAccessRequestMarshaller(); internal static DeactivateOrganizationsAccessRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeactivateOrganizationsAccessRequestMarshaller Instance { get { return _instance; } } } }
83
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeactivateOrganizationsAccess operation /// </summary> public class DeactivateOrganizationsAccessResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeactivateOrganizationsAccessResponse response = new DeactivateOrganizationsAccessResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DeactivateOrganizationsAccessResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="response")] private static void UnmarshallResult(XmlUnmarshallerContext context, DeactivateOrganizationsAccessResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOperationException")) { return InvalidOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotFoundException")) { return OperationNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeactivateOrganizationsAccessResponseUnmarshaller _instance = new DeactivateOrganizationsAccessResponseUnmarshaller(); internal static DeactivateOrganizationsAccessResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeactivateOrganizationsAccessResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DeactivateType Request Marshaller /// </summary> public class DeactivateTypeRequestMarshaller : IMarshaller<IRequest, DeactivateTypeRequest> , 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((DeactivateTypeRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeactivateTypeRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DeactivateType"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetArn()) { request.Parameters.Add("Arn", StringUtils.FromString(publicRequest.Arn)); } if(publicRequest.IsSetType()) { request.Parameters.Add("Type", StringUtils.FromString(publicRequest.Type)); } if(publicRequest.IsSetTypeName()) { request.Parameters.Add("TypeName", StringUtils.FromString(publicRequest.TypeName)); } } return request; } private static DeactivateTypeRequestMarshaller _instance = new DeactivateTypeRequestMarshaller(); internal static DeactivateTypeRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeactivateTypeRequestMarshaller Instance { get { return _instance; } } } }
95
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeactivateType operation /// </summary> public class DeactivateTypeResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeactivateTypeResponse response = new DeactivateTypeResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DeactivateTypeResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="response")] private static void UnmarshallResult(XmlUnmarshallerContext context, DeactivateTypeResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("CFNRegistryException")) { return CFNRegistryExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TypeNotFoundException")) { return TypeNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeactivateTypeResponseUnmarshaller _instance = new DeactivateTypeResponseUnmarshaller(); internal static DeactivateTypeResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeactivateTypeResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DeleteChangeSet Request Marshaller /// </summary> public class DeleteChangeSetRequestMarshaller : IMarshaller<IRequest, DeleteChangeSetRequest> , 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((DeleteChangeSetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteChangeSetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DeleteChangeSet"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetChangeSetName()) { request.Parameters.Add("ChangeSetName", StringUtils.FromString(publicRequest.ChangeSetName)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static DeleteChangeSetRequestMarshaller _instance = new DeleteChangeSetRequestMarshaller(); internal static DeleteChangeSetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChangeSetRequestMarshaller Instance { get { return _instance; } } } }
91
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteChangeSet operation /// </summary> public class DeleteChangeSetResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteChangeSetResponse response = new DeleteChangeSetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DeleteChangeSetResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="response")] private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteChangeSetResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidChangeSetStatus")) { return InvalidChangeSetStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeleteChangeSetResponseUnmarshaller _instance = new DeleteChangeSetResponseUnmarshaller(); internal static DeleteChangeSetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChangeSetResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DeleteStackInstances Request Marshaller /// </summary> public class DeleteStackInstancesRequestMarshaller : IMarshaller<IRequest, DeleteStackInstancesRequest> , 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((DeleteStackInstancesRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteStackInstancesRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DeleteStackInstances"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetAccounts()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Accounts) { request.Parameters.Add("Accounts" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetCallAs()) { request.Parameters.Add("CallAs", StringUtils.FromString(publicRequest.CallAs)); } if(publicRequest.IsSetDeploymentTargets()) { if(publicRequest.DeploymentTargets.IsSetAccountFilterType()) { request.Parameters.Add("DeploymentTargets" + "." + "AccountFilterType", StringUtils.FromString(publicRequest.DeploymentTargets.AccountFilterType)); } if(publicRequest.DeploymentTargets.IsSetAccounts()) { int publicRequestDeploymentTargetslistValueIndex = 1; foreach(var publicRequestDeploymentTargetslistValue in publicRequest.DeploymentTargets.Accounts) { request.Parameters.Add("DeploymentTargets" + "." + "Accounts" + "." + "member" + "." + publicRequestDeploymentTargetslistValueIndex, StringUtils.FromString(publicRequestDeploymentTargetslistValue)); publicRequestDeploymentTargetslistValueIndex++; } } if(publicRequest.DeploymentTargets.IsSetAccountsUrl()) { request.Parameters.Add("DeploymentTargets" + "." + "AccountsUrl", StringUtils.FromString(publicRequest.DeploymentTargets.AccountsUrl)); } if(publicRequest.DeploymentTargets.IsSetOrganizationalUnitIds()) { int publicRequestDeploymentTargetslistValueIndex = 1; foreach(var publicRequestDeploymentTargetslistValue in publicRequest.DeploymentTargets.OrganizationalUnitIds) { request.Parameters.Add("DeploymentTargets" + "." + "OrganizationalUnitIds" + "." + "member" + "." + publicRequestDeploymentTargetslistValueIndex, StringUtils.FromString(publicRequestDeploymentTargetslistValue)); publicRequestDeploymentTargetslistValueIndex++; } } } if(publicRequest.IsSetOperationId()) { request.Parameters.Add("OperationId", StringUtils.FromString(publicRequest.OperationId)); } else if(!(publicRequest.IsSetOperationId())) { request.Parameters.Add("OperationId", StringUtils.FromString(Guid.NewGuid().ToString())); } if(publicRequest.IsSetOperationPreferences()) { if(publicRequest.OperationPreferences.IsSetFailureToleranceCount()) { request.Parameters.Add("OperationPreferences" + "." + "FailureToleranceCount", StringUtils.FromInt(publicRequest.OperationPreferences.FailureToleranceCount)); } if(publicRequest.OperationPreferences.IsSetFailureTolerancePercentage()) { request.Parameters.Add("OperationPreferences" + "." + "FailureTolerancePercentage", StringUtils.FromInt(publicRequest.OperationPreferences.FailureTolerancePercentage)); } if(publicRequest.OperationPreferences.IsSetMaxConcurrentCount()) { request.Parameters.Add("OperationPreferences" + "." + "MaxConcurrentCount", StringUtils.FromInt(publicRequest.OperationPreferences.MaxConcurrentCount)); } if(publicRequest.OperationPreferences.IsSetMaxConcurrentPercentage()) { request.Parameters.Add("OperationPreferences" + "." + "MaxConcurrentPercentage", StringUtils.FromInt(publicRequest.OperationPreferences.MaxConcurrentPercentage)); } if(publicRequest.OperationPreferences.IsSetRegionConcurrencyType()) { request.Parameters.Add("OperationPreferences" + "." + "RegionConcurrencyType", StringUtils.FromString(publicRequest.OperationPreferences.RegionConcurrencyType)); } if(publicRequest.OperationPreferences.IsSetRegionOrder()) { int publicRequestOperationPreferenceslistValueIndex = 1; foreach(var publicRequestOperationPreferenceslistValue in publicRequest.OperationPreferences.RegionOrder) { request.Parameters.Add("OperationPreferences" + "." + "RegionOrder" + "." + "member" + "." + publicRequestOperationPreferenceslistValueIndex, StringUtils.FromString(publicRequestOperationPreferenceslistValue)); publicRequestOperationPreferenceslistValueIndex++; } } } if(publicRequest.IsSetRegions()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Regions) { request.Parameters.Add("Regions" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetRetainStacks()) { request.Parameters.Add("RetainStacks", StringUtils.FromBool(publicRequest.RetainStacks)); } if(publicRequest.IsSetStackSetName()) { request.Parameters.Add("StackSetName", StringUtils.FromString(publicRequest.StackSetName)); } } return request; } private static DeleteStackInstancesRequestMarshaller _instance = new DeleteStackInstancesRequestMarshaller(); internal static DeleteStackInstancesRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteStackInstancesRequestMarshaller Instance { get { return _instance; } } } }
182
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteStackInstances operation /// </summary> public class DeleteStackInstancesResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteStackInstancesResponse response = new DeleteStackInstancesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DeleteStackInstancesResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteStackInstancesResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("OperationId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OperationId = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOperationException")) { return InvalidOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationIdAlreadyExistsException")) { return OperationIdAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationInProgressException")) { return OperationInProgressExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("StackSetNotFoundException")) { return StackSetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("StaleRequestException")) { return StaleRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeleteStackInstancesResponseUnmarshaller _instance = new DeleteStackInstancesResponseUnmarshaller(); internal static DeleteStackInstancesResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteStackInstancesResponseUnmarshaller Instance { get { return _instance; } } } }
157
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DeleteStack Request Marshaller /// </summary> public class DeleteStackRequestMarshaller : IMarshaller<IRequest, DeleteStackRequest> , 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((DeleteStackRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteStackRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DeleteStack"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetClientRequestToken()) { request.Parameters.Add("ClientRequestToken", StringUtils.FromString(publicRequest.ClientRequestToken)); } if(publicRequest.IsSetRetainResources()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.RetainResources) { request.Parameters.Add("RetainResources" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetRoleARN()) { request.Parameters.Add("RoleARN", StringUtils.FromString(publicRequest.RoleARN)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static DeleteStackRequestMarshaller _instance = new DeleteStackRequestMarshaller(); internal static DeleteStackRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteStackRequestMarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteStack operation /// </summary> public class DeleteStackResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteStackResponse response = new DeleteStackResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DeleteStackResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="response")] private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteStackResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("TokenAlreadyExistsException")) { return TokenAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeleteStackResponseUnmarshaller _instance = new DeleteStackResponseUnmarshaller(); internal static DeleteStackResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteStackResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DeleteStackSet Request Marshaller /// </summary> public class DeleteStackSetRequestMarshaller : IMarshaller<IRequest, DeleteStackSetRequest> , 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((DeleteStackSetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteStackSetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DeleteStackSet"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetCallAs()) { request.Parameters.Add("CallAs", StringUtils.FromString(publicRequest.CallAs)); } if(publicRequest.IsSetStackSetName()) { request.Parameters.Add("StackSetName", StringUtils.FromString(publicRequest.StackSetName)); } } return request; } private static DeleteStackSetRequestMarshaller _instance = new DeleteStackSetRequestMarshaller(); internal static DeleteStackSetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteStackSetRequestMarshaller Instance { get { return _instance; } } } }
91
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteStackSet operation /// </summary> public class DeleteStackSetResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteStackSetResponse response = new DeleteStackSetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DeleteStackSetResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="response")] private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteStackSetResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("OperationInProgressException")) { return OperationInProgressExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("StackSetNotEmptyException")) { return StackSetNotEmptyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeleteStackSetResponseUnmarshaller _instance = new DeleteStackSetResponseUnmarshaller(); internal static DeleteStackSetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteStackSetResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeploymentTargets Object /// </summary> public class DeploymentTargetsUnmarshaller : IUnmarshaller<DeploymentTargets, XmlUnmarshallerContext>, IUnmarshaller<DeploymentTargets, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DeploymentTargets Unmarshall(XmlUnmarshallerContext context) { DeploymentTargets unmarshalledObject = new DeploymentTargets(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AccountFilterType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AccountFilterType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Accounts/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.Accounts.Add(item); continue; } if (context.TestExpression("AccountsUrl", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AccountsUrl = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OrganizationalUnitIds/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.OrganizationalUnitIds.Add(item); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public DeploymentTargets Unmarshall(JsonUnmarshallerContext context) { return null; } private static DeploymentTargetsUnmarshaller _instance = new DeploymentTargetsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DeploymentTargetsUnmarshaller Instance { get { return _instance; } } } }
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DeregisterType Request Marshaller /// </summary> public class DeregisterTypeRequestMarshaller : IMarshaller<IRequest, DeregisterTypeRequest> , 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((DeregisterTypeRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeregisterTypeRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DeregisterType"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetArn()) { request.Parameters.Add("Arn", StringUtils.FromString(publicRequest.Arn)); } if(publicRequest.IsSetType()) { request.Parameters.Add("Type", StringUtils.FromString(publicRequest.Type)); } if(publicRequest.IsSetTypeName()) { request.Parameters.Add("TypeName", StringUtils.FromString(publicRequest.TypeName)); } if(publicRequest.IsSetVersionId()) { request.Parameters.Add("VersionId", StringUtils.FromString(publicRequest.VersionId)); } } return request; } private static DeregisterTypeRequestMarshaller _instance = new DeregisterTypeRequestMarshaller(); internal static DeregisterTypeRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeregisterTypeRequestMarshaller Instance { get { return _instance; } } } }
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeregisterType operation /// </summary> public class DeregisterTypeResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeregisterTypeResponse response = new DeregisterTypeResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DeregisterTypeResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="response")] private static void UnmarshallResult(XmlUnmarshallerContext context, DeregisterTypeResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("CFNRegistryException")) { return CFNRegistryExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TypeNotFoundException")) { return TypeNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeregisterTypeResponseUnmarshaller _instance = new DeregisterTypeResponseUnmarshaller(); internal static DeregisterTypeResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeregisterTypeResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeAccountLimits Request Marshaller /// </summary> public class DescribeAccountLimitsRequestMarshaller : IMarshaller<IRequest, DescribeAccountLimitsRequest> , 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((DescribeAccountLimitsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeAccountLimitsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeAccountLimits"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetNextToken()) { request.Parameters.Add("NextToken", StringUtils.FromString(publicRequest.NextToken)); } } return request; } private static DescribeAccountLimitsRequestMarshaller _instance = new DescribeAccountLimitsRequestMarshaller(); internal static DescribeAccountLimitsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeAccountLimitsRequestMarshaller Instance { get { return _instance; } } } }
87
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeAccountLimits operation /// </summary> public class DescribeAccountLimitsResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeAccountLimitsResponse response = new DescribeAccountLimitsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeAccountLimitsResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeAccountLimitsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AccountLimits/member", targetDepth)) { var unmarshaller = AccountLimitUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.AccountLimits.Add(item); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeAccountLimitsResponseUnmarshaller _instance = new DescribeAccountLimitsResponseUnmarshaller(); internal static DescribeAccountLimitsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeAccountLimitsResponseUnmarshaller Instance { get { return _instance; } } } }
144
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeChangeSetHooks Request Marshaller /// </summary> public class DescribeChangeSetHooksRequestMarshaller : IMarshaller<IRequest, DescribeChangeSetHooksRequest> , 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((DescribeChangeSetHooksRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeChangeSetHooksRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeChangeSetHooks"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetChangeSetName()) { request.Parameters.Add("ChangeSetName", StringUtils.FromString(publicRequest.ChangeSetName)); } if(publicRequest.IsSetLogicalResourceId()) { request.Parameters.Add("LogicalResourceId", StringUtils.FromString(publicRequest.LogicalResourceId)); } if(publicRequest.IsSetNextToken()) { request.Parameters.Add("NextToken", StringUtils.FromString(publicRequest.NextToken)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static DescribeChangeSetHooksRequestMarshaller _instance = new DescribeChangeSetHooksRequestMarshaller(); internal static DescribeChangeSetHooksRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChangeSetHooksRequestMarshaller Instance { get { return _instance; } } } }
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeChangeSetHooks operation /// </summary> public class DescribeChangeSetHooksResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeChangeSetHooksResponse response = new DescribeChangeSetHooksResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeChangeSetHooksResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeChangeSetHooksResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ChangeSetId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChangeSetId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChangeSetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChangeSetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Hooks/member", targetDepth)) { var unmarshaller = ChangeSetHookUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Hooks.Add(item); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ChangeSetNotFound")) { return ChangeSetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeChangeSetHooksResponseUnmarshaller _instance = new DescribeChangeSetHooksResponseUnmarshaller(); internal static DescribeChangeSetHooksResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChangeSetHooksResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeChangeSet Request Marshaller /// </summary> public class DescribeChangeSetRequestMarshaller : IMarshaller<IRequest, DescribeChangeSetRequest> , 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((DescribeChangeSetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeChangeSetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeChangeSet"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetChangeSetName()) { request.Parameters.Add("ChangeSetName", StringUtils.FromString(publicRequest.ChangeSetName)); } if(publicRequest.IsSetNextToken()) { request.Parameters.Add("NextToken", StringUtils.FromString(publicRequest.NextToken)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static DescribeChangeSetRequestMarshaller _instance = new DescribeChangeSetRequestMarshaller(); internal static DescribeChangeSetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChangeSetRequestMarshaller Instance { get { return _instance; } } } }
95
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeChangeSet operation /// </summary> public class DescribeChangeSetResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeChangeSetResponse response = new DescribeChangeSetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeChangeSetResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeChangeSetResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Capabilities/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Capabilities.Add(item); continue; } if (context.TestExpression("Changes/member", targetDepth)) { var unmarshaller = ChangeUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Changes.Add(item); continue; } if (context.TestExpression("ChangeSetId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChangeSetId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChangeSetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChangeSetName = 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("ExecutionStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ExecutionStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IncludeNestedStacks", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.IncludeNestedStacks = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NotificationARNs/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.NotificationARNs.Add(item); continue; } if (context.TestExpression("OnStackFailure", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OnStackFailure = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Parameters/member", targetDepth)) { var unmarshaller = ParameterUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Parameters.Add(item); continue; } if (context.TestExpression("ParentChangeSetId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ParentChangeSetId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RollbackConfiguration", targetDepth)) { var unmarshaller = RollbackConfigurationUnmarshaller.Instance; response.RollbackConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RootChangeSetId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RootChangeSetId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StatusReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StatusReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Tags/member", targetDepth)) { var unmarshaller = TagUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Tags.Add(item); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ChangeSetNotFound")) { return ChangeSetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeChangeSetResponseUnmarshaller _instance = new DescribeChangeSetResponseUnmarshaller(); internal static DescribeChangeSetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChangeSetResponseUnmarshaller Instance { get { return _instance; } } } }
260
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeOrganizationsAccess Request Marshaller /// </summary> public class DescribeOrganizationsAccessRequestMarshaller : IMarshaller<IRequest, DescribeOrganizationsAccessRequest> , 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((DescribeOrganizationsAccessRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeOrganizationsAccessRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeOrganizationsAccess"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetCallAs()) { request.Parameters.Add("CallAs", StringUtils.FromString(publicRequest.CallAs)); } } return request; } private static DescribeOrganizationsAccessRequestMarshaller _instance = new DescribeOrganizationsAccessRequestMarshaller(); internal static DescribeOrganizationsAccessRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeOrganizationsAccessRequestMarshaller Instance { get { return _instance; } } } }
87
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeOrganizationsAccess operation /// </summary> public class DescribeOrganizationsAccessResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeOrganizationsAccessResponse response = new DescribeOrganizationsAccessResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeOrganizationsAccessResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeOrganizationsAccessResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOperationException")) { return InvalidOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotFoundException")) { return OperationNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeOrganizationsAccessResponseUnmarshaller _instance = new DescribeOrganizationsAccessResponseUnmarshaller(); internal static DescribeOrganizationsAccessResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeOrganizationsAccessResponseUnmarshaller Instance { get { return _instance; } } } }
145
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribePublisher Request Marshaller /// </summary> public class DescribePublisherRequestMarshaller : IMarshaller<IRequest, DescribePublisherRequest> , 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((DescribePublisherRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribePublisherRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribePublisher"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetPublisherId()) { request.Parameters.Add("PublisherId", StringUtils.FromString(publicRequest.PublisherId)); } } return request; } private static DescribePublisherRequestMarshaller _instance = new DescribePublisherRequestMarshaller(); internal static DescribePublisherRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribePublisherRequestMarshaller Instance { get { return _instance; } } } }
87
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribePublisher operation /// </summary> public class DescribePublisherResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribePublisherResponse response = new DescribePublisherResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribePublisherResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribePublisherResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("IdentityProvider", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.IdentityProvider = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PublisherId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PublisherId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PublisherProfile", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PublisherProfile = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PublisherStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PublisherStatus = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("CFNRegistryException")) { return CFNRegistryExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribePublisherResponseUnmarshaller _instance = new DescribePublisherResponseUnmarshaller(); internal static DescribePublisherResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribePublisherResponseUnmarshaller Instance { get { return _instance; } } } }
159
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeStackDriftDetectionStatus Request Marshaller /// </summary> public class DescribeStackDriftDetectionStatusRequestMarshaller : IMarshaller<IRequest, DescribeStackDriftDetectionStatusRequest> , 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((DescribeStackDriftDetectionStatusRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeStackDriftDetectionStatusRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeStackDriftDetectionStatus"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetStackDriftDetectionId()) { request.Parameters.Add("StackDriftDetectionId", StringUtils.FromString(publicRequest.StackDriftDetectionId)); } } return request; } private static DescribeStackDriftDetectionStatusRequestMarshaller _instance = new DescribeStackDriftDetectionStatusRequestMarshaller(); internal static DescribeStackDriftDetectionStatusRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackDriftDetectionStatusRequestMarshaller Instance { get { return _instance; } } } }
87
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeStackDriftDetectionStatus operation /// </summary> public class DescribeStackDriftDetectionStatusResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeStackDriftDetectionStatusResponse response = new DescribeStackDriftDetectionStatusResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeStackDriftDetectionStatusResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeStackDriftDetectionStatusResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("DetectionStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DetectionStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DetectionStatusReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DetectionStatusReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DriftedStackResourceCount", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.DriftedStackResourceCount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackDriftDetectionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackDriftDetectionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackDriftStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackDriftStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Timestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.Timestamp = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeStackDriftDetectionStatusResponseUnmarshaller _instance = new DescribeStackDriftDetectionStatusResponseUnmarshaller(); internal static DescribeStackDriftDetectionStatusResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackDriftDetectionStatusResponseUnmarshaller Instance { get { return _instance; } } } }
173
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeStackEvents Request Marshaller /// </summary> public class DescribeStackEventsRequestMarshaller : IMarshaller<IRequest, DescribeStackEventsRequest> , 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((DescribeStackEventsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeStackEventsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeStackEvents"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetNextToken()) { request.Parameters.Add("NextToken", StringUtils.FromString(publicRequest.NextToken)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static DescribeStackEventsRequestMarshaller _instance = new DescribeStackEventsRequestMarshaller(); internal static DescribeStackEventsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackEventsRequestMarshaller Instance { get { return _instance; } } } }
91
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeStackEvents operation /// </summary> public class DescribeStackEventsResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeStackEventsResponse response = new DescribeStackEventsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeStackEventsResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeStackEventsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackEvents/member", targetDepth)) { var unmarshaller = StackEventUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.StackEvents.Add(item); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeStackEventsResponseUnmarshaller _instance = new DescribeStackEventsResponseUnmarshaller(); internal static DescribeStackEventsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackEventsResponseUnmarshaller Instance { get { return _instance; } } } }
144
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeStackInstance Request Marshaller /// </summary> public class DescribeStackInstanceRequestMarshaller : IMarshaller<IRequest, DescribeStackInstanceRequest> , 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((DescribeStackInstanceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeStackInstanceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeStackInstance"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetCallAs()) { request.Parameters.Add("CallAs", StringUtils.FromString(publicRequest.CallAs)); } if(publicRequest.IsSetStackInstanceAccount()) { request.Parameters.Add("StackInstanceAccount", StringUtils.FromString(publicRequest.StackInstanceAccount)); } if(publicRequest.IsSetStackInstanceRegion()) { request.Parameters.Add("StackInstanceRegion", StringUtils.FromString(publicRequest.StackInstanceRegion)); } if(publicRequest.IsSetStackSetName()) { request.Parameters.Add("StackSetName", StringUtils.FromString(publicRequest.StackSetName)); } } return request; } private static DescribeStackInstanceRequestMarshaller _instance = new DescribeStackInstanceRequestMarshaller(); internal static DescribeStackInstanceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackInstanceRequestMarshaller Instance { get { return _instance; } } } }
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeStackInstance operation /// </summary> public class DescribeStackInstanceResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeStackInstanceResponse response = new DescribeStackInstanceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeStackInstanceResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeStackInstanceResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("StackInstance", targetDepth)) { var unmarshaller = StackInstanceUnmarshaller.Instance; response.StackInstance = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("StackInstanceNotFoundException")) { return StackInstanceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("StackSetNotFoundException")) { return StackSetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeStackInstanceResponseUnmarshaller _instance = new DescribeStackInstanceResponseUnmarshaller(); internal static DescribeStackInstanceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackInstanceResponseUnmarshaller Instance { get { return _instance; } } } }
145
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeStackResourceDrifts Request Marshaller /// </summary> public class DescribeStackResourceDriftsRequestMarshaller : IMarshaller<IRequest, DescribeStackResourceDriftsRequest> , 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((DescribeStackResourceDriftsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeStackResourceDriftsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeStackResourceDrifts"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetMaxResults()) { request.Parameters.Add("MaxResults", StringUtils.FromInt(publicRequest.MaxResults)); } if(publicRequest.IsSetNextToken()) { request.Parameters.Add("NextToken", StringUtils.FromString(publicRequest.NextToken)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } if(publicRequest.IsSetStackResourceDriftStatusFilters()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.StackResourceDriftStatusFilters) { request.Parameters.Add("StackResourceDriftStatusFilters" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } } return request; } private static DescribeStackResourceDriftsRequestMarshaller _instance = new DescribeStackResourceDriftsRequestMarshaller(); internal static DescribeStackResourceDriftsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackResourceDriftsRequestMarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeStackResourceDrifts operation /// </summary> public class DescribeStackResourceDriftsResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeStackResourceDriftsResponse response = new DescribeStackResourceDriftsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeStackResourceDriftsResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeStackResourceDriftsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackResourceDrifts/member", targetDepth)) { var unmarshaller = StackResourceDriftUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.StackResourceDrifts.Add(item); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeStackResourceDriftsResponseUnmarshaller _instance = new DescribeStackResourceDriftsResponseUnmarshaller(); internal static DescribeStackResourceDriftsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackResourceDriftsResponseUnmarshaller Instance { get { return _instance; } } } }
144
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeStackResource Request Marshaller /// </summary> public class DescribeStackResourceRequestMarshaller : IMarshaller<IRequest, DescribeStackResourceRequest> , 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((DescribeStackResourceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeStackResourceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeStackResource"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetLogicalResourceId()) { request.Parameters.Add("LogicalResourceId", StringUtils.FromString(publicRequest.LogicalResourceId)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static DescribeStackResourceRequestMarshaller _instance = new DescribeStackResourceRequestMarshaller(); internal static DescribeStackResourceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackResourceRequestMarshaller Instance { get { return _instance; } } } }
91
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeStackResource operation /// </summary> public class DescribeStackResourceResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeStackResourceResponse response = new DescribeStackResourceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeStackResourceResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeStackResourceResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("StackResourceDetail", targetDepth)) { var unmarshaller = StackResourceDetailUnmarshaller.Instance; response.StackResourceDetail = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeStackResourceResponseUnmarshaller _instance = new DescribeStackResourceResponseUnmarshaller(); internal static DescribeStackResourceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackResourceResponseUnmarshaller Instance { get { return _instance; } } } }
137
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeStackResources Request Marshaller /// </summary> public class DescribeStackResourcesRequestMarshaller : IMarshaller<IRequest, DescribeStackResourcesRequest> , 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((DescribeStackResourcesRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeStackResourcesRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeStackResources"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetLogicalResourceId()) { request.Parameters.Add("LogicalResourceId", StringUtils.FromString(publicRequest.LogicalResourceId)); } if(publicRequest.IsSetPhysicalResourceId()) { request.Parameters.Add("PhysicalResourceId", StringUtils.FromString(publicRequest.PhysicalResourceId)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static DescribeStackResourcesRequestMarshaller _instance = new DescribeStackResourcesRequestMarshaller(); internal static DescribeStackResourcesRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackResourcesRequestMarshaller Instance { get { return _instance; } } } }
95
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeStackResources operation /// </summary> public class DescribeStackResourcesResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeStackResourcesResponse response = new DescribeStackResourcesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeStackResourcesResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeStackResourcesResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("StackResources/member", targetDepth)) { var unmarshaller = StackResourceUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.StackResources.Add(item); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeStackResourcesResponseUnmarshaller _instance = new DescribeStackResourcesResponseUnmarshaller(); internal static DescribeStackResourcesResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackResourcesResponseUnmarshaller Instance { get { return _instance; } } } }
138
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeStackSetOperation Request Marshaller /// </summary> public class DescribeStackSetOperationRequestMarshaller : IMarshaller<IRequest, DescribeStackSetOperationRequest> , 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((DescribeStackSetOperationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeStackSetOperationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeStackSetOperation"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetCallAs()) { request.Parameters.Add("CallAs", StringUtils.FromString(publicRequest.CallAs)); } if(publicRequest.IsSetOperationId()) { request.Parameters.Add("OperationId", StringUtils.FromString(publicRequest.OperationId)); } if(publicRequest.IsSetStackSetName()) { request.Parameters.Add("StackSetName", StringUtils.FromString(publicRequest.StackSetName)); } } return request; } private static DescribeStackSetOperationRequestMarshaller _instance = new DescribeStackSetOperationRequestMarshaller(); internal static DescribeStackSetOperationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackSetOperationRequestMarshaller Instance { get { return _instance; } } } }
95
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeStackSetOperation operation /// </summary> public class DescribeStackSetOperationResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeStackSetOperationResponse response = new DescribeStackSetOperationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeStackSetOperationResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeStackSetOperationResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("StackSetOperation", targetDepth)) { var unmarshaller = StackSetOperationUnmarshaller.Instance; response.StackSetOperation = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotFoundException")) { return OperationNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("StackSetNotFoundException")) { return StackSetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeStackSetOperationResponseUnmarshaller _instance = new DescribeStackSetOperationResponseUnmarshaller(); internal static DescribeStackSetOperationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackSetOperationResponseUnmarshaller Instance { get { return _instance; } } } }
145
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeStackSet Request Marshaller /// </summary> public class DescribeStackSetRequestMarshaller : IMarshaller<IRequest, DescribeStackSetRequest> , 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((DescribeStackSetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeStackSetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeStackSet"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetCallAs()) { request.Parameters.Add("CallAs", StringUtils.FromString(publicRequest.CallAs)); } if(publicRequest.IsSetStackSetName()) { request.Parameters.Add("StackSetName", StringUtils.FromString(publicRequest.StackSetName)); } } return request; } private static DescribeStackSetRequestMarshaller _instance = new DescribeStackSetRequestMarshaller(); internal static DescribeStackSetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackSetRequestMarshaller Instance { get { return _instance; } } } }
91
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeStackSet operation /// </summary> public class DescribeStackSetResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeStackSetResponse response = new DescribeStackSetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeStackSetResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeStackSetResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("StackSet", targetDepth)) { var unmarshaller = StackSetUnmarshaller.Instance; response.StackSet = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("StackSetNotFoundException")) { return StackSetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeStackSetResponseUnmarshaller _instance = new DescribeStackSetResponseUnmarshaller(); internal static DescribeStackSetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStackSetResponseUnmarshaller Instance { get { return _instance; } } } }
141
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeStacks Request Marshaller /// </summary> public class DescribeStacksRequestMarshaller : IMarshaller<IRequest, DescribeStacksRequest> , 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((DescribeStacksRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeStacksRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeStacks"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetNextToken()) { request.Parameters.Add("NextToken", StringUtils.FromString(publicRequest.NextToken)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static DescribeStacksRequestMarshaller _instance = new DescribeStacksRequestMarshaller(); internal static DescribeStacksRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStacksRequestMarshaller Instance { get { return _instance; } } } }
91
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeStacks operation /// </summary> public class DescribeStacksResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeStacksResponse response = new DescribeStacksResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeStacksResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeStacksResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Stacks/member", targetDepth)) { var unmarshaller = StackUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Stacks.Add(item); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeStacksResponseUnmarshaller _instance = new DescribeStacksResponseUnmarshaller(); internal static DescribeStacksResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeStacksResponseUnmarshaller Instance { get { return _instance; } } } }
144
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeTypeRegistration Request Marshaller /// </summary> public class DescribeTypeRegistrationRequestMarshaller : IMarshaller<IRequest, DescribeTypeRegistrationRequest> , 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((DescribeTypeRegistrationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeTypeRegistrationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeTypeRegistration"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetRegistrationToken()) { request.Parameters.Add("RegistrationToken", StringUtils.FromString(publicRequest.RegistrationToken)); } } return request; } private static DescribeTypeRegistrationRequestMarshaller _instance = new DescribeTypeRegistrationRequestMarshaller(); internal static DescribeTypeRegistrationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeTypeRegistrationRequestMarshaller Instance { get { return _instance; } } } }
87
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeTypeRegistration operation /// </summary> public class DescribeTypeRegistrationResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeTypeRegistrationResponse response = new DescribeTypeRegistrationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeTypeRegistrationResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeTypeRegistrationResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProgressStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProgressStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TypeArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TypeArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TypeVersionArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TypeVersionArn = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("CFNRegistryException")) { return CFNRegistryExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeTypeRegistrationResponseUnmarshaller _instance = new DescribeTypeRegistrationResponseUnmarshaller(); internal static DescribeTypeRegistrationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeTypeRegistrationResponseUnmarshaller Instance { get { return _instance; } } } }
159
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DescribeType Request Marshaller /// </summary> public class DescribeTypeRequestMarshaller : IMarshaller<IRequest, DescribeTypeRequest> , 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((DescribeTypeRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeTypeRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DescribeType"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetArn()) { request.Parameters.Add("Arn", StringUtils.FromString(publicRequest.Arn)); } if(publicRequest.IsSetPublicVersionNumber()) { request.Parameters.Add("PublicVersionNumber", StringUtils.FromString(publicRequest.PublicVersionNumber)); } if(publicRequest.IsSetPublisherId()) { request.Parameters.Add("PublisherId", StringUtils.FromString(publicRequest.PublisherId)); } if(publicRequest.IsSetType()) { request.Parameters.Add("Type", StringUtils.FromString(publicRequest.Type)); } if(publicRequest.IsSetTypeName()) { request.Parameters.Add("TypeName", StringUtils.FromString(publicRequest.TypeName)); } if(publicRequest.IsSetVersionId()) { request.Parameters.Add("VersionId", StringUtils.FromString(publicRequest.VersionId)); } } return request; } private static DescribeTypeRequestMarshaller _instance = new DescribeTypeRequestMarshaller(); internal static DescribeTypeRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeTypeRequestMarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeType operation /// </summary> public class DescribeTypeResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeTypeResponse response = new DescribeTypeResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DescribeTypeResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeTypeResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AutoUpdate", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.AutoUpdate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ConfigurationSchema", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ConfigurationSchema = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DefaultVersionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DefaultVersionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeprecatedStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DeprecatedStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DocumentationUrl", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DocumentationUrl = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExecutionRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ExecutionRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IsActivated", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.IsActivated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IsDefaultVersion", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.IsDefaultVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastUpdated", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastUpdated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LatestPublicVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.LatestPublicVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LoggingConfig", targetDepth)) { var unmarshaller = LoggingConfigUnmarshaller.Instance; response.LoggingConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OriginalTypeArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OriginalTypeArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OriginalTypeName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OriginalTypeName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProvisioningType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProvisioningType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PublicVersionNumber", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PublicVersionNumber = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PublisherId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PublisherId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RequiredActivatedTypes/member", targetDepth)) { var unmarshaller = RequiredActivatedTypeUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.RequiredActivatedTypes.Add(item); continue; } if (context.TestExpression("Schema", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Schema = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SourceUrl", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SourceUrl = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TimeCreated", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.TimeCreated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Type = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TypeName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TypeName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TypeTestsStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TypeTestsStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TypeTestsStatusDescription", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TypeTestsStatusDescription = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Visibility", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Visibility = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("CFNRegistryException")) { return CFNRegistryExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TypeNotFoundException")) { return TypeNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeTypeResponseUnmarshaller _instance = new DescribeTypeResponseUnmarshaller(); internal static DescribeTypeResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeTypeResponseUnmarshaller Instance { get { return _instance; } } } }
302
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DetectStackDrift Request Marshaller /// </summary> public class DetectStackDriftRequestMarshaller : IMarshaller<IRequest, DetectStackDriftRequest> , 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((DetectStackDriftRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DetectStackDriftRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DetectStackDrift"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetLogicalResourceIds()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.LogicalResourceIds) { request.Parameters.Add("LogicalResourceIds" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); publicRequestlistValueIndex++; } } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static DetectStackDriftRequestMarshaller _instance = new DetectStackDriftRequestMarshaller(); internal static DetectStackDriftRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetectStackDriftRequestMarshaller Instance { get { return _instance; } } } }
96
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DetectStackDrift operation /// </summary> public class DetectStackDriftResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DetectStackDriftResponse response = new DetectStackDriftResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DetectStackDriftResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DetectStackDriftResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("StackDriftDetectionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackDriftDetectionId = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DetectStackDriftResponseUnmarshaller _instance = new DetectStackDriftResponseUnmarshaller(); internal static DetectStackDriftResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetectStackDriftResponseUnmarshaller Instance { get { return _instance; } } } }
137
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DetectStackResourceDrift Request Marshaller /// </summary> public class DetectStackResourceDriftRequestMarshaller : IMarshaller<IRequest, DetectStackResourceDriftRequest> , 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((DetectStackResourceDriftRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DetectStackResourceDriftRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DetectStackResourceDrift"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetLogicalResourceId()) { request.Parameters.Add("LogicalResourceId", StringUtils.FromString(publicRequest.LogicalResourceId)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static DetectStackResourceDriftRequestMarshaller _instance = new DetectStackResourceDriftRequestMarshaller(); internal static DetectStackResourceDriftRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetectStackResourceDriftRequestMarshaller Instance { get { return _instance; } } } }
91
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DetectStackResourceDrift operation /// </summary> public class DetectStackResourceDriftResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DetectStackResourceDriftResponse response = new DetectStackResourceDriftResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DetectStackResourceDriftResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DetectStackResourceDriftResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("StackResourceDrift", targetDepth)) { var unmarshaller = StackResourceDriftUnmarshaller.Instance; response.StackResourceDrift = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DetectStackResourceDriftResponseUnmarshaller _instance = new DetectStackResourceDriftResponseUnmarshaller(); internal static DetectStackResourceDriftResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetectStackResourceDriftResponseUnmarshaller Instance { get { return _instance; } } } }
137
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// DetectStackSetDrift Request Marshaller /// </summary> public class DetectStackSetDriftRequestMarshaller : IMarshaller<IRequest, DetectStackSetDriftRequest> , 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((DetectStackSetDriftRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DetectStackSetDriftRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "DetectStackSetDrift"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetCallAs()) { request.Parameters.Add("CallAs", StringUtils.FromString(publicRequest.CallAs)); } if(publicRequest.IsSetOperationId()) { request.Parameters.Add("OperationId", StringUtils.FromString(publicRequest.OperationId)); } else if(!(publicRequest.IsSetOperationId())) { request.Parameters.Add("OperationId", StringUtils.FromString(Guid.NewGuid().ToString())); } if(publicRequest.IsSetOperationPreferences()) { if(publicRequest.OperationPreferences.IsSetFailureToleranceCount()) { request.Parameters.Add("OperationPreferences" + "." + "FailureToleranceCount", StringUtils.FromInt(publicRequest.OperationPreferences.FailureToleranceCount)); } if(publicRequest.OperationPreferences.IsSetFailureTolerancePercentage()) { request.Parameters.Add("OperationPreferences" + "." + "FailureTolerancePercentage", StringUtils.FromInt(publicRequest.OperationPreferences.FailureTolerancePercentage)); } if(publicRequest.OperationPreferences.IsSetMaxConcurrentCount()) { request.Parameters.Add("OperationPreferences" + "." + "MaxConcurrentCount", StringUtils.FromInt(publicRequest.OperationPreferences.MaxConcurrentCount)); } if(publicRequest.OperationPreferences.IsSetMaxConcurrentPercentage()) { request.Parameters.Add("OperationPreferences" + "." + "MaxConcurrentPercentage", StringUtils.FromInt(publicRequest.OperationPreferences.MaxConcurrentPercentage)); } if(publicRequest.OperationPreferences.IsSetRegionConcurrencyType()) { request.Parameters.Add("OperationPreferences" + "." + "RegionConcurrencyType", StringUtils.FromString(publicRequest.OperationPreferences.RegionConcurrencyType)); } if(publicRequest.OperationPreferences.IsSetRegionOrder()) { int publicRequestOperationPreferenceslistValueIndex = 1; foreach(var publicRequestOperationPreferenceslistValue in publicRequest.OperationPreferences.RegionOrder) { request.Parameters.Add("OperationPreferences" + "." + "RegionOrder" + "." + "member" + "." + publicRequestOperationPreferenceslistValueIndex, StringUtils.FromString(publicRequestOperationPreferenceslistValue)); publicRequestOperationPreferenceslistValueIndex++; } } } if(publicRequest.IsSetStackSetName()) { request.Parameters.Add("StackSetName", StringUtils.FromString(publicRequest.StackSetName)); } } return request; } private static DetectStackSetDriftRequestMarshaller _instance = new DetectStackSetDriftRequestMarshaller(); internal static DetectStackSetDriftRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetectStackSetDriftRequestMarshaller Instance { get { return _instance; } } } }
131
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DetectStackSetDrift operation /// </summary> public class DetectStackSetDriftResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DetectStackSetDriftResponse response = new DetectStackSetDriftResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("DetectStackSetDriftResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DetectStackSetDriftResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("OperationId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OperationId = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOperationException")) { return InvalidOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationInProgressException")) { return OperationInProgressExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("StackSetNotFoundException")) { return StackSetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DetectStackSetDriftResponseUnmarshaller _instance = new DetectStackSetDriftResponseUnmarshaller(); internal static DetectStackSetDriftResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetectStackSetDriftResponseUnmarshaller Instance { get { return _instance; } } } }
149
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// EstimateTemplateCost Request Marshaller /// </summary> public class EstimateTemplateCostRequestMarshaller : IMarshaller<IRequest, EstimateTemplateCostRequest> , 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((EstimateTemplateCostRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(EstimateTemplateCostRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "EstimateTemplateCost"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetParameters()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Parameters) { if(publicRequestlistValue.IsSetParameterKey()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterKey", StringUtils.FromString(publicRequestlistValue.ParameterKey)); } if(publicRequestlistValue.IsSetParameterValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ParameterValue", StringUtils.FromString(publicRequestlistValue.ParameterValue)); } if(publicRequestlistValue.IsSetResolvedValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResolvedValue", StringUtils.FromString(publicRequestlistValue.ResolvedValue)); } if(publicRequestlistValue.IsSetUsePreviousValue()) { request.Parameters.Add("Parameters" + "." + "member" + "." + publicRequestlistValueIndex + "." + "UsePreviousValue", StringUtils.FromBool(publicRequestlistValue.UsePreviousValue)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetTemplateBody()) { request.Parameters.Add("TemplateBody", StringUtils.FromString(publicRequest.TemplateBody)); } if(publicRequest.IsSetTemplateURL()) { request.Parameters.Add("TemplateURL", StringUtils.FromString(publicRequest.TemplateURL)); } } return request; } private static EstimateTemplateCostRequestMarshaller _instance = new EstimateTemplateCostRequestMarshaller(); internal static EstimateTemplateCostRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static EstimateTemplateCostRequestMarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for EstimateTemplateCost operation /// </summary> public class EstimateTemplateCostResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { EstimateTemplateCostResponse response = new EstimateTemplateCostResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("EstimateTemplateCostResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, EstimateTemplateCostResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Url", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Url = unmarshaller.Unmarshall(context); continue; } } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static EstimateTemplateCostResponseUnmarshaller _instance = new EstimateTemplateCostResponseUnmarshaller(); internal static EstimateTemplateCostResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static EstimateTemplateCostResponseUnmarshaller Instance { get { return _instance; } } } }
137
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// ExecuteChangeSet Request Marshaller /// </summary> public class ExecuteChangeSetRequestMarshaller : IMarshaller<IRequest, ExecuteChangeSetRequest> , 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((ExecuteChangeSetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ExecuteChangeSetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "ExecuteChangeSet"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetChangeSetName()) { request.Parameters.Add("ChangeSetName", StringUtils.FromString(publicRequest.ChangeSetName)); } if(publicRequest.IsSetClientRequestToken()) { request.Parameters.Add("ClientRequestToken", StringUtils.FromString(publicRequest.ClientRequestToken)); } if(publicRequest.IsSetDisableRollback()) { request.Parameters.Add("DisableRollback", StringUtils.FromBool(publicRequest.DisableRollback)); } if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static ExecuteChangeSetRequestMarshaller _instance = new ExecuteChangeSetRequestMarshaller(); internal static ExecuteChangeSetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ExecuteChangeSetRequestMarshaller Instance { get { return _instance; } } } }
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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ExecuteChangeSet operation /// </summary> public class ExecuteChangeSetResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ExecuteChangeSetResponse response = new ExecuteChangeSetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("ExecuteChangeSetResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="response")] private static void UnmarshallResult(XmlUnmarshallerContext context, ExecuteChangeSetResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ChangeSetNotFound")) { return ChangeSetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientCapabilitiesException")) { return InsufficientCapabilitiesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidChangeSetStatus")) { return InvalidChangeSetStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TokenAlreadyExistsException")) { return TokenAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFormationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static ExecuteChangeSetResponseUnmarshaller _instance = new ExecuteChangeSetResponseUnmarshaller(); internal static ExecuteChangeSetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ExecuteChangeSetResponseUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Export Object /// </summary> public class ExportUnmarshaller : IUnmarshaller<Export, XmlUnmarshallerContext>, IUnmarshaller<Export, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Export Unmarshall(XmlUnmarshallerContext context) { Export unmarshalledObject = new Export(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ExportingStackId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ExportingStackId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Value", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Value = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <returns></returns> public Export Unmarshall(JsonUnmarshallerContext context) { return null; } private static ExportUnmarshaller _instance = new ExportUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ExportUnmarshaller 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 cloudformation-2010-05-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.CloudFormation.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFormation.Model.Internal.MarshallTransformations { /// <summary> /// GetStackPolicy Request Marshaller /// </summary> public class GetStackPolicyRequestMarshaller : IMarshaller<IRequest, GetStackPolicyRequest> , 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((GetStackPolicyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetStackPolicyRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudFormation"); request.Parameters.Add("Action", "GetStackPolicy"); request.Parameters.Add("Version", "2010-05-15"); if(publicRequest != null) { if(publicRequest.IsSetStackName()) { request.Parameters.Add("StackName", StringUtils.FromString(publicRequest.StackName)); } } return request; } private static GetStackPolicyRequestMarshaller _instance = new GetStackPolicyRequestMarshaller(); internal static GetStackPolicyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetStackPolicyRequestMarshaller Instance { get { return _instance; } } } }
87