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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Instance Object
/// </summary>
public class InstanceUnmarshaller : IUnmarshaller<Instance, XmlUnmarshallerContext>, IUnmarshaller<Instance, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public Instance Unmarshall(XmlUnmarshallerContext context)
{
Instance unmarshalledObject = new Instance();
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("AvailabilityZone", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AvailabilityZone = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("HealthStatus", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.HealthStatus = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InstanceId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.InstanceId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InstanceType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.InstanceType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LaunchConfigurationName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LaunchConfigurationName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LaunchTemplate", targetDepth))
{
var unmarshaller = LaunchTemplateSpecificationUnmarshaller.Instance;
unmarshalledObject.LaunchTemplate = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LifecycleState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LifecycleState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ProtectedFromScaleIn", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ProtectedFromScaleIn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("WeightedCapacity", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.WeightedCapacity = 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 Instance Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static InstanceUnmarshaller _instance = new InstanceUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static InstanceUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for InvalidNextTokenException operation
/// </summary>
public class InvalidNextTokenExceptionUnmarshaller : IErrorResponseUnmarshaller<InvalidNextTokenException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public InvalidNextTokenException 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 InvalidNextTokenException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
InvalidNextTokenException response = new InvalidNextTokenException(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 InvalidNextTokenExceptionUnmarshaller _instance = new InvalidNextTokenExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static InvalidNextTokenExceptionUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for IrreversibleInstanceRefreshException operation
/// </summary>
public class IrreversibleInstanceRefreshExceptionUnmarshaller : IErrorResponseUnmarshaller<IrreversibleInstanceRefreshException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public IrreversibleInstanceRefreshException 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 IrreversibleInstanceRefreshException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
IrreversibleInstanceRefreshException response = new IrreversibleInstanceRefreshException(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 IrreversibleInstanceRefreshExceptionUnmarshaller _instance = new IrreversibleInstanceRefreshExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static IrreversibleInstanceRefreshExceptionUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LaunchConfiguration Object
/// </summary>
public class LaunchConfigurationUnmarshaller : IUnmarshaller<LaunchConfiguration, XmlUnmarshallerContext>, IUnmarshaller<LaunchConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LaunchConfiguration Unmarshall(XmlUnmarshallerContext context)
{
LaunchConfiguration unmarshalledObject = new LaunchConfiguration();
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("AssociatePublicIpAddress", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.AssociatePublicIpAddress = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("BlockDeviceMappings/member", targetDepth))
{
var unmarshaller = BlockDeviceMappingUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.BlockDeviceMappings.Add(item);
continue;
}
if (context.TestExpression("ClassicLinkVPCId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ClassicLinkVPCId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ClassicLinkVPCSecurityGroups/member", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.ClassicLinkVPCSecurityGroups.Add(item);
continue;
}
if (context.TestExpression("CreatedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EbsOptimized", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EbsOptimized = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IamInstanceProfile", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.IamInstanceProfile = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ImageId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ImageId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InstanceMonitoring", targetDepth))
{
var unmarshaller = InstanceMonitoringUnmarshaller.Instance;
unmarshalledObject.InstanceMonitoring = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InstanceType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.InstanceType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("KernelId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.KernelId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("KeyName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.KeyName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LaunchConfigurationARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LaunchConfigurationARN = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LaunchConfigurationName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LaunchConfigurationName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MetadataOptions", targetDepth))
{
var unmarshaller = InstanceMetadataOptionsUnmarshaller.Instance;
unmarshalledObject.MetadataOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PlacementTenancy", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PlacementTenancy = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RamdiskId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.RamdiskId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SecurityGroups/member", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.SecurityGroups.Add(item);
continue;
}
if (context.TestExpression("SpotPrice", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SpotPrice = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UserData", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.UserData = 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 LaunchConfiguration Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static LaunchConfigurationUnmarshaller _instance = new LaunchConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LaunchConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 214 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LaunchTemplateOverrides Object
/// </summary>
public class LaunchTemplateOverridesUnmarshaller : IUnmarshaller<LaunchTemplateOverrides, XmlUnmarshallerContext>, IUnmarshaller<LaunchTemplateOverrides, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LaunchTemplateOverrides Unmarshall(XmlUnmarshallerContext context)
{
LaunchTemplateOverrides unmarshalledObject = new LaunchTemplateOverrides();
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("InstanceRequirements", targetDepth))
{
var unmarshaller = InstanceRequirementsUnmarshaller.Instance;
unmarshalledObject.InstanceRequirements = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InstanceType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.InstanceType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LaunchTemplateSpecification", targetDepth))
{
var unmarshaller = LaunchTemplateSpecificationUnmarshaller.Instance;
unmarshalledObject.LaunchTemplateSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("WeightedCapacity", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.WeightedCapacity = 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 LaunchTemplateOverrides Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static LaunchTemplateOverridesUnmarshaller _instance = new LaunchTemplateOverridesUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LaunchTemplateOverridesUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LaunchTemplateSpecification Object
/// </summary>
public class LaunchTemplateSpecificationUnmarshaller : IUnmarshaller<LaunchTemplateSpecification, XmlUnmarshallerContext>, IUnmarshaller<LaunchTemplateSpecification, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LaunchTemplateSpecification Unmarshall(XmlUnmarshallerContext context)
{
LaunchTemplateSpecification unmarshalledObject = new LaunchTemplateSpecification();
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("LaunchTemplateId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LaunchTemplateId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LaunchTemplateName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LaunchTemplateName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Version", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Version = 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 LaunchTemplateSpecification Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static LaunchTemplateSpecificationUnmarshaller _instance = new LaunchTemplateSpecificationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LaunchTemplateSpecificationUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LaunchTemplate Object
/// </summary>
public class LaunchTemplateUnmarshaller : IUnmarshaller<LaunchTemplate, XmlUnmarshallerContext>, IUnmarshaller<LaunchTemplate, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LaunchTemplate Unmarshall(XmlUnmarshallerContext context)
{
LaunchTemplate unmarshalledObject = new LaunchTemplate();
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("LaunchTemplateSpecification", targetDepth))
{
var unmarshaller = LaunchTemplateSpecificationUnmarshaller.Instance;
unmarshalledObject.LaunchTemplateSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Overrides/member", targetDepth))
{
var unmarshaller = LaunchTemplateOverridesUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.Overrides.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 LaunchTemplate Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static LaunchTemplateUnmarshaller _instance = new LaunchTemplateUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LaunchTemplateUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LifecycleHook Object
/// </summary>
public class LifecycleHookUnmarshaller : IUnmarshaller<LifecycleHook, XmlUnmarshallerContext>, IUnmarshaller<LifecycleHook, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LifecycleHook Unmarshall(XmlUnmarshallerContext context)
{
LifecycleHook unmarshalledObject = new LifecycleHook();
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("AutoScalingGroupName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AutoScalingGroupName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DefaultResult", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DefaultResult = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("GlobalTimeout", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.GlobalTimeout = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("HeartbeatTimeout", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.HeartbeatTimeout = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LifecycleHookName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LifecycleHookName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LifecycleTransition", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LifecycleTransition = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("NotificationMetadata", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.NotificationMetadata = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("NotificationTargetARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.NotificationTargetARN = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RoleARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.RoleARN = 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 LifecycleHook Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static LifecycleHookUnmarshaller _instance = new LifecycleHookUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LifecycleHookUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LimitExceededException operation
/// </summary>
public class LimitExceededExceptionUnmarshaller : IErrorResponseUnmarshaller<LimitExceededException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LimitExceededException 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 LimitExceededException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
LimitExceededException response = new LimitExceededException(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 LimitExceededExceptionUnmarshaller _instance = new LimitExceededExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LimitExceededExceptionUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LoadBalancerState Object
/// </summary>
public class LoadBalancerStateUnmarshaller : IUnmarshaller<LoadBalancerState, XmlUnmarshallerContext>, IUnmarshaller<LoadBalancerState, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LoadBalancerState Unmarshall(XmlUnmarshallerContext context)
{
LoadBalancerState unmarshalledObject = new LoadBalancerState();
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("LoadBalancerName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LoadBalancerName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("State", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.State = 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 LoadBalancerState Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static LoadBalancerStateUnmarshaller _instance = new LoadBalancerStateUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LoadBalancerStateUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LoadBalancerTargetGroupState Object
/// </summary>
public class LoadBalancerTargetGroupStateUnmarshaller : IUnmarshaller<LoadBalancerTargetGroupState, XmlUnmarshallerContext>, IUnmarshaller<LoadBalancerTargetGroupState, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LoadBalancerTargetGroupState Unmarshall(XmlUnmarshallerContext context)
{
LoadBalancerTargetGroupState unmarshalledObject = new LoadBalancerTargetGroupState();
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("LoadBalancerTargetGroupARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LoadBalancerTargetGroupARN = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("State", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.State = 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 LoadBalancerTargetGroupState Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static LoadBalancerTargetGroupStateUnmarshaller _instance = new LoadBalancerTargetGroupStateUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LoadBalancerTargetGroupStateUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LoadForecast Object
/// </summary>
public class LoadForecastUnmarshaller : IUnmarshaller<LoadForecast, XmlUnmarshallerContext>, IUnmarshaller<LoadForecast, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LoadForecast Unmarshall(XmlUnmarshallerContext context)
{
LoadForecast unmarshalledObject = new LoadForecast();
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("MetricSpecification", targetDepth))
{
var unmarshaller = PredictiveScalingMetricSpecificationUnmarshaller.Instance;
unmarshalledObject.MetricSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Timestamps/member", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.Timestamps.Add(item);
continue;
}
if (context.TestExpression("Values/member", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.Values.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 LoadForecast Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static LoadForecastUnmarshaller _instance = new LoadForecastUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LoadForecastUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for MemoryGiBPerVCpuRequest Object
/// </summary>
public class MemoryGiBPerVCpuRequestUnmarshaller : IUnmarshaller<MemoryGiBPerVCpuRequest, XmlUnmarshallerContext>, IUnmarshaller<MemoryGiBPerVCpuRequest, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public MemoryGiBPerVCpuRequest Unmarshall(XmlUnmarshallerContext context)
{
MemoryGiBPerVCpuRequest unmarshalledObject = new MemoryGiBPerVCpuRequest();
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("Max", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.Max = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Min", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.Min = 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 MemoryGiBPerVCpuRequest Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static MemoryGiBPerVCpuRequestUnmarshaller _instance = new MemoryGiBPerVCpuRequestUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static MemoryGiBPerVCpuRequestUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for MemoryMiBRequest Object
/// </summary>
public class MemoryMiBRequestUnmarshaller : IUnmarshaller<MemoryMiBRequest, XmlUnmarshallerContext>, IUnmarshaller<MemoryMiBRequest, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public MemoryMiBRequest Unmarshall(XmlUnmarshallerContext context)
{
MemoryMiBRequest unmarshalledObject = new MemoryMiBRequest();
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("Max", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Max = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Min", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Min = 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 MemoryMiBRequest Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static MemoryMiBRequestUnmarshaller _instance = new MemoryMiBRequestUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static MemoryMiBRequestUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for MetricCollectionType Object
/// </summary>
public class MetricCollectionTypeUnmarshaller : IUnmarshaller<MetricCollectionType, XmlUnmarshallerContext>, IUnmarshaller<MetricCollectionType, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public MetricCollectionType Unmarshall(XmlUnmarshallerContext context)
{
MetricCollectionType unmarshalledObject = new MetricCollectionType();
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("Metric", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Metric = 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 MetricCollectionType Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static MetricCollectionTypeUnmarshaller _instance = new MetricCollectionTypeUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static MetricCollectionTypeUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for MetricDataQuery Object
/// </summary>
public class MetricDataQueryUnmarshaller : IUnmarshaller<MetricDataQuery, XmlUnmarshallerContext>, IUnmarshaller<MetricDataQuery, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public MetricDataQuery Unmarshall(XmlUnmarshallerContext context)
{
MetricDataQuery unmarshalledObject = new MetricDataQuery();
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("Expression", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Expression = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Label", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Label = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MetricStat", targetDepth))
{
var unmarshaller = MetricStatUnmarshaller.Instance;
unmarshalledObject.MetricStat = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ReturnData", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ReturnData = 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 MetricDataQuery Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static MetricDataQueryUnmarshaller _instance = new MetricDataQueryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static MetricDataQueryUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 121 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for MetricDimension Object
/// </summary>
public class MetricDimensionUnmarshaller : IUnmarshaller<MetricDimension, XmlUnmarshallerContext>, IUnmarshaller<MetricDimension, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public MetricDimension Unmarshall(XmlUnmarshallerContext context)
{
MetricDimension unmarshalledObject = new MetricDimension();
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 = 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 MetricDimension Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static MetricDimensionUnmarshaller _instance = new MetricDimensionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static MetricDimensionUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for MetricGranularityType Object
/// </summary>
public class MetricGranularityTypeUnmarshaller : IUnmarshaller<MetricGranularityType, XmlUnmarshallerContext>, IUnmarshaller<MetricGranularityType, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public MetricGranularityType Unmarshall(XmlUnmarshallerContext context)
{
MetricGranularityType unmarshalledObject = new MetricGranularityType();
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("Granularity", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Granularity = 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 MetricGranularityType Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static MetricGranularityTypeUnmarshaller _instance = new MetricGranularityTypeUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static MetricGranularityTypeUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for MetricStat Object
/// </summary>
public class MetricStatUnmarshaller : IUnmarshaller<MetricStat, XmlUnmarshallerContext>, IUnmarshaller<MetricStat, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public MetricStat Unmarshall(XmlUnmarshallerContext context)
{
MetricStat unmarshalledObject = new MetricStat();
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("Metric", targetDepth))
{
var unmarshaller = MetricUnmarshaller.Instance;
unmarshalledObject.Metric = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Stat", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Stat = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Unit", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Unit = 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 MetricStat Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static MetricStatUnmarshaller _instance = new MetricStatUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static MetricStatUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Metric Object
/// </summary>
public class MetricUnmarshaller : IUnmarshaller<Metric, XmlUnmarshallerContext>, IUnmarshaller<Metric, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public Metric Unmarshall(XmlUnmarshallerContext context)
{
Metric unmarshalledObject = new Metric();
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("Dimensions/member", targetDepth))
{
var unmarshaller = MetricDimensionUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.Dimensions.Add(item);
continue;
}
if (context.TestExpression("MetricName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MetricName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Namespace", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Namespace = 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 Metric Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static MetricUnmarshaller _instance = new MetricUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static MetricUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 110 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for MixedInstancesPolicy Object
/// </summary>
public class MixedInstancesPolicyUnmarshaller : IUnmarshaller<MixedInstancesPolicy, XmlUnmarshallerContext>, IUnmarshaller<MixedInstancesPolicy, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public MixedInstancesPolicy Unmarshall(XmlUnmarshallerContext context)
{
MixedInstancesPolicy unmarshalledObject = new MixedInstancesPolicy();
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("InstancesDistribution", targetDepth))
{
var unmarshaller = InstancesDistributionUnmarshaller.Instance;
unmarshalledObject.InstancesDistribution = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LaunchTemplate", targetDepth))
{
var unmarshaller = LaunchTemplateUnmarshaller.Instance;
unmarshalledObject.LaunchTemplate = 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 MixedInstancesPolicy Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static MixedInstancesPolicyUnmarshaller _instance = new MixedInstancesPolicyUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static MixedInstancesPolicyUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for NetworkBandwidthGbpsRequest Object
/// </summary>
public class NetworkBandwidthGbpsRequestUnmarshaller : IUnmarshaller<NetworkBandwidthGbpsRequest, XmlUnmarshallerContext>, IUnmarshaller<NetworkBandwidthGbpsRequest, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public NetworkBandwidthGbpsRequest Unmarshall(XmlUnmarshallerContext context)
{
NetworkBandwidthGbpsRequest unmarshalledObject = new NetworkBandwidthGbpsRequest();
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("Max", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.Max = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Min", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.Min = 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 NetworkBandwidthGbpsRequest Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static NetworkBandwidthGbpsRequestUnmarshaller _instance = new NetworkBandwidthGbpsRequestUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static NetworkBandwidthGbpsRequestUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for NetworkInterfaceCountRequest Object
/// </summary>
public class NetworkInterfaceCountRequestUnmarshaller : IUnmarshaller<NetworkInterfaceCountRequest, XmlUnmarshallerContext>, IUnmarshaller<NetworkInterfaceCountRequest, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public NetworkInterfaceCountRequest Unmarshall(XmlUnmarshallerContext context)
{
NetworkInterfaceCountRequest unmarshalledObject = new NetworkInterfaceCountRequest();
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("Max", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Max = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Min", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Min = 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 NetworkInterfaceCountRequest Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static NetworkInterfaceCountRequestUnmarshaller _instance = new NetworkInterfaceCountRequestUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static NetworkInterfaceCountRequestUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for NotificationConfiguration Object
/// </summary>
public class NotificationConfigurationUnmarshaller : IUnmarshaller<NotificationConfiguration, XmlUnmarshallerContext>, IUnmarshaller<NotificationConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public NotificationConfiguration Unmarshall(XmlUnmarshallerContext context)
{
NotificationConfiguration unmarshalledObject = new NotificationConfiguration();
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("AutoScalingGroupName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AutoScalingGroupName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("NotificationType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.NotificationType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TopicARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TopicARN = 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 NotificationConfiguration Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static NotificationConfigurationUnmarshaller _instance = new NotificationConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static NotificationConfigurationUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PredefinedMetricSpecification Object
/// </summary>
public class PredefinedMetricSpecificationUnmarshaller : IUnmarshaller<PredefinedMetricSpecification, XmlUnmarshallerContext>, IUnmarshaller<PredefinedMetricSpecification, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public PredefinedMetricSpecification Unmarshall(XmlUnmarshallerContext context)
{
PredefinedMetricSpecification unmarshalledObject = new PredefinedMetricSpecification();
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("PredefinedMetricType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PredefinedMetricType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ResourceLabel", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResourceLabel = 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 PredefinedMetricSpecification Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static PredefinedMetricSpecificationUnmarshaller _instance = new PredefinedMetricSpecificationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PredefinedMetricSpecificationUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PredictiveScalingConfiguration Object
/// </summary>
public class PredictiveScalingConfigurationUnmarshaller : IUnmarshaller<PredictiveScalingConfiguration, XmlUnmarshallerContext>, IUnmarshaller<PredictiveScalingConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public PredictiveScalingConfiguration Unmarshall(XmlUnmarshallerContext context)
{
PredictiveScalingConfiguration unmarshalledObject = new PredictiveScalingConfiguration();
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("MaxCapacityBreachBehavior", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MaxCapacityBreachBehavior = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MaxCapacityBuffer", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MaxCapacityBuffer = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MetricSpecifications/member", targetDepth))
{
var unmarshaller = PredictiveScalingMetricSpecificationUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.MetricSpecifications.Add(item);
continue;
}
if (context.TestExpression("Mode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Mode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SchedulingBufferTime", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.SchedulingBufferTime = 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 PredictiveScalingConfiguration Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static PredictiveScalingConfigurationUnmarshaller _instance = new PredictiveScalingConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PredictiveScalingConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 122 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PredictiveScalingCustomizedCapacityMetric Object
/// </summary>
public class PredictiveScalingCustomizedCapacityMetricUnmarshaller : IUnmarshaller<PredictiveScalingCustomizedCapacityMetric, XmlUnmarshallerContext>, IUnmarshaller<PredictiveScalingCustomizedCapacityMetric, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public PredictiveScalingCustomizedCapacityMetric Unmarshall(XmlUnmarshallerContext context)
{
PredictiveScalingCustomizedCapacityMetric unmarshalledObject = new PredictiveScalingCustomizedCapacityMetric();
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("MetricDataQueries/member", targetDepth))
{
var unmarshaller = MetricDataQueryUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.MetricDataQueries.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 PredictiveScalingCustomizedCapacityMetric Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static PredictiveScalingCustomizedCapacityMetricUnmarshaller _instance = new PredictiveScalingCustomizedCapacityMetricUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PredictiveScalingCustomizedCapacityMetricUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PredictiveScalingCustomizedLoadMetric Object
/// </summary>
public class PredictiveScalingCustomizedLoadMetricUnmarshaller : IUnmarshaller<PredictiveScalingCustomizedLoadMetric, XmlUnmarshallerContext>, IUnmarshaller<PredictiveScalingCustomizedLoadMetric, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public PredictiveScalingCustomizedLoadMetric Unmarshall(XmlUnmarshallerContext context)
{
PredictiveScalingCustomizedLoadMetric unmarshalledObject = new PredictiveScalingCustomizedLoadMetric();
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("MetricDataQueries/member", targetDepth))
{
var unmarshaller = MetricDataQueryUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.MetricDataQueries.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 PredictiveScalingCustomizedLoadMetric Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static PredictiveScalingCustomizedLoadMetricUnmarshaller _instance = new PredictiveScalingCustomizedLoadMetricUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PredictiveScalingCustomizedLoadMetricUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PredictiveScalingCustomizedScalingMetric Object
/// </summary>
public class PredictiveScalingCustomizedScalingMetricUnmarshaller : IUnmarshaller<PredictiveScalingCustomizedScalingMetric, XmlUnmarshallerContext>, IUnmarshaller<PredictiveScalingCustomizedScalingMetric, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public PredictiveScalingCustomizedScalingMetric Unmarshall(XmlUnmarshallerContext context)
{
PredictiveScalingCustomizedScalingMetric unmarshalledObject = new PredictiveScalingCustomizedScalingMetric();
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("MetricDataQueries/member", targetDepth))
{
var unmarshaller = MetricDataQueryUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.MetricDataQueries.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 PredictiveScalingCustomizedScalingMetric Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static PredictiveScalingCustomizedScalingMetricUnmarshaller _instance = new PredictiveScalingCustomizedScalingMetricUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PredictiveScalingCustomizedScalingMetricUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PredictiveScalingMetricSpecification Object
/// </summary>
public class PredictiveScalingMetricSpecificationUnmarshaller : IUnmarshaller<PredictiveScalingMetricSpecification, XmlUnmarshallerContext>, IUnmarshaller<PredictiveScalingMetricSpecification, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public PredictiveScalingMetricSpecification Unmarshall(XmlUnmarshallerContext context)
{
PredictiveScalingMetricSpecification unmarshalledObject = new PredictiveScalingMetricSpecification();
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("CustomizedCapacityMetricSpecification", targetDepth))
{
var unmarshaller = PredictiveScalingCustomizedCapacityMetricUnmarshaller.Instance;
unmarshalledObject.CustomizedCapacityMetricSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CustomizedLoadMetricSpecification", targetDepth))
{
var unmarshaller = PredictiveScalingCustomizedLoadMetricUnmarshaller.Instance;
unmarshalledObject.CustomizedLoadMetricSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CustomizedScalingMetricSpecification", targetDepth))
{
var unmarshaller = PredictiveScalingCustomizedScalingMetricUnmarshaller.Instance;
unmarshalledObject.CustomizedScalingMetricSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PredefinedLoadMetricSpecification", targetDepth))
{
var unmarshaller = PredictiveScalingPredefinedLoadMetricUnmarshaller.Instance;
unmarshalledObject.PredefinedLoadMetricSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PredefinedMetricPairSpecification", targetDepth))
{
var unmarshaller = PredictiveScalingPredefinedMetricPairUnmarshaller.Instance;
unmarshalledObject.PredefinedMetricPairSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PredefinedScalingMetricSpecification", targetDepth))
{
var unmarshaller = PredictiveScalingPredefinedScalingMetricUnmarshaller.Instance;
unmarshalledObject.PredefinedScalingMetricSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TargetValue", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.TargetValue = 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 PredictiveScalingMetricSpecification Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static PredictiveScalingMetricSpecificationUnmarshaller _instance = new PredictiveScalingMetricSpecificationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PredictiveScalingMetricSpecificationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 133 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PredictiveScalingPredefinedLoadMetric Object
/// </summary>
public class PredictiveScalingPredefinedLoadMetricUnmarshaller : IUnmarshaller<PredictiveScalingPredefinedLoadMetric, XmlUnmarshallerContext>, IUnmarshaller<PredictiveScalingPredefinedLoadMetric, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public PredictiveScalingPredefinedLoadMetric Unmarshall(XmlUnmarshallerContext context)
{
PredictiveScalingPredefinedLoadMetric unmarshalledObject = new PredictiveScalingPredefinedLoadMetric();
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("PredefinedMetricType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PredefinedMetricType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ResourceLabel", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResourceLabel = 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 PredictiveScalingPredefinedLoadMetric Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static PredictiveScalingPredefinedLoadMetricUnmarshaller _instance = new PredictiveScalingPredefinedLoadMetricUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PredictiveScalingPredefinedLoadMetricUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PredictiveScalingPredefinedMetricPair Object
/// </summary>
public class PredictiveScalingPredefinedMetricPairUnmarshaller : IUnmarshaller<PredictiveScalingPredefinedMetricPair, XmlUnmarshallerContext>, IUnmarshaller<PredictiveScalingPredefinedMetricPair, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public PredictiveScalingPredefinedMetricPair Unmarshall(XmlUnmarshallerContext context)
{
PredictiveScalingPredefinedMetricPair unmarshalledObject = new PredictiveScalingPredefinedMetricPair();
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("PredefinedMetricType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PredefinedMetricType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ResourceLabel", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResourceLabel = 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 PredictiveScalingPredefinedMetricPair Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static PredictiveScalingPredefinedMetricPairUnmarshaller _instance = new PredictiveScalingPredefinedMetricPairUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PredictiveScalingPredefinedMetricPairUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PredictiveScalingPredefinedScalingMetric Object
/// </summary>
public class PredictiveScalingPredefinedScalingMetricUnmarshaller : IUnmarshaller<PredictiveScalingPredefinedScalingMetric, XmlUnmarshallerContext>, IUnmarshaller<PredictiveScalingPredefinedScalingMetric, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public PredictiveScalingPredefinedScalingMetric Unmarshall(XmlUnmarshallerContext context)
{
PredictiveScalingPredefinedScalingMetric unmarshalledObject = new PredictiveScalingPredefinedScalingMetric();
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("PredefinedMetricType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PredefinedMetricType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ResourceLabel", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResourceLabel = 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 PredictiveScalingPredefinedScalingMetric Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static PredictiveScalingPredefinedScalingMetricUnmarshaller _instance = new PredictiveScalingPredefinedScalingMetricUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PredictiveScalingPredefinedScalingMetricUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ProcessType Object
/// </summary>
public class ProcessTypeUnmarshaller : IUnmarshaller<ProcessType, XmlUnmarshallerContext>, IUnmarshaller<ProcessType, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ProcessType Unmarshall(XmlUnmarshallerContext context)
{
ProcessType unmarshalledObject = new ProcessType();
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("ProcessName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ProcessName = 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 ProcessType Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static ProcessTypeUnmarshaller _instance = new ProcessTypeUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ProcessTypeUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// PutLifecycleHook Request Marshaller
/// </summary>
public class PutLifecycleHookRequestMarshaller : IMarshaller<IRequest, PutLifecycleHookRequest> , 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((PutLifecycleHookRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(PutLifecycleHookRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "PutLifecycleHook");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetDefaultResult())
{
request.Parameters.Add("DefaultResult", StringUtils.FromString(publicRequest.DefaultResult));
}
if(publicRequest.IsSetHeartbeatTimeout())
{
request.Parameters.Add("HeartbeatTimeout", StringUtils.FromInt(publicRequest.HeartbeatTimeout));
}
if(publicRequest.IsSetLifecycleHookName())
{
request.Parameters.Add("LifecycleHookName", StringUtils.FromString(publicRequest.LifecycleHookName));
}
if(publicRequest.IsSetLifecycleTransition())
{
request.Parameters.Add("LifecycleTransition", StringUtils.FromString(publicRequest.LifecycleTransition));
}
if(publicRequest.IsSetNotificationMetadata())
{
request.Parameters.Add("NotificationMetadata", StringUtils.FromString(publicRequest.NotificationMetadata));
}
if(publicRequest.IsSetNotificationTargetARN())
{
request.Parameters.Add("NotificationTargetARN", StringUtils.FromString(publicRequest.NotificationTargetARN));
}
if(publicRequest.IsSetRoleARN())
{
request.Parameters.Add("RoleARN", StringUtils.FromString(publicRequest.RoleARN));
}
}
return request;
}
private static PutLifecycleHookRequestMarshaller _instance = new PutLifecycleHookRequestMarshaller();
internal static PutLifecycleHookRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutLifecycleHookRequestMarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PutLifecycleHook operation
/// </summary>
public class PutLifecycleHookResponseUnmarshaller : 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)
{
PutLifecycleHookResponse response = new PutLifecycleHookResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("PutLifecycleHookResult", 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, PutLifecycleHookResponse 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("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static PutLifecycleHookResponseUnmarshaller _instance = new PutLifecycleHookResponseUnmarshaller();
internal static PutLifecycleHookResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutLifecycleHookResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// PutNotificationConfiguration Request Marshaller
/// </summary>
public class PutNotificationConfigurationRequestMarshaller : IMarshaller<IRequest, PutNotificationConfigurationRequest> , 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((PutNotificationConfigurationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(PutNotificationConfigurationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "PutNotificationConfiguration");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetNotificationTypes())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.NotificationTypes)
{
request.Parameters.Add("NotificationTypes" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
if(publicRequest.IsSetTopicARN())
{
request.Parameters.Add("TopicARN", StringUtils.FromString(publicRequest.TopicARN));
}
}
return request;
}
private static PutNotificationConfigurationRequestMarshaller _instance = new PutNotificationConfigurationRequestMarshaller();
internal static PutNotificationConfigurationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutNotificationConfigurationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 100 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PutNotificationConfiguration operation
/// </summary>
public class PutNotificationConfigurationResponseUnmarshaller : 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)
{
PutNotificationConfigurationResponse response = new PutNotificationConfigurationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("PutNotificationConfigurationResult", 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, PutNotificationConfigurationResponse 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("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceLinkedRoleFailure"))
{
return ServiceLinkedRoleFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static PutNotificationConfigurationResponseUnmarshaller _instance = new PutNotificationConfigurationResponseUnmarshaller();
internal static PutNotificationConfigurationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutNotificationConfigurationResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// PutScalingPolicy Request Marshaller
/// </summary>
public class PutScalingPolicyRequestMarshaller : IMarshaller<IRequest, PutScalingPolicyRequest> , 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((PutScalingPolicyRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(PutScalingPolicyRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "PutScalingPolicy");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAdjustmentType())
{
request.Parameters.Add("AdjustmentType", StringUtils.FromString(publicRequest.AdjustmentType));
}
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetCooldown())
{
request.Parameters.Add("Cooldown", StringUtils.FromInt(publicRequest.Cooldown));
}
if(publicRequest.IsSetEnabled())
{
request.Parameters.Add("Enabled", StringUtils.FromBool(publicRequest.Enabled));
}
if(publicRequest.IsSetEstimatedInstanceWarmup())
{
request.Parameters.Add("EstimatedInstanceWarmup", StringUtils.FromInt(publicRequest.EstimatedInstanceWarmup));
}
if(publicRequest.IsSetMetricAggregationType())
{
request.Parameters.Add("MetricAggregationType", StringUtils.FromString(publicRequest.MetricAggregationType));
}
if(publicRequest.IsSetMinAdjustmentMagnitude())
{
request.Parameters.Add("MinAdjustmentMagnitude", StringUtils.FromInt(publicRequest.MinAdjustmentMagnitude));
}
if(publicRequest.IsSetMinAdjustmentStep())
{
request.Parameters.Add("MinAdjustmentStep", StringUtils.FromInt(publicRequest.MinAdjustmentStep));
}
if(publicRequest.IsSetPolicyName())
{
request.Parameters.Add("PolicyName", StringUtils.FromString(publicRequest.PolicyName));
}
if(publicRequest.IsSetPolicyType())
{
request.Parameters.Add("PolicyType", StringUtils.FromString(publicRequest.PolicyType));
}
if(publicRequest.IsSetPredictiveScalingConfiguration())
{
if(publicRequest.PredictiveScalingConfiguration.IsSetMaxCapacityBreachBehavior())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MaxCapacityBreachBehavior", StringUtils.FromString(publicRequest.PredictiveScalingConfiguration.MaxCapacityBreachBehavior));
}
if(publicRequest.PredictiveScalingConfiguration.IsSetMaxCapacityBuffer())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MaxCapacityBuffer", StringUtils.FromInt(publicRequest.PredictiveScalingConfiguration.MaxCapacityBuffer));
}
if(publicRequest.PredictiveScalingConfiguration.IsSetMetricSpecifications())
{
int publicRequestPredictiveScalingConfigurationlistValueIndex = 1;
foreach(var publicRequestPredictiveScalingConfigurationlistValue in publicRequest.PredictiveScalingConfiguration.MetricSpecifications)
{
if(publicRequestPredictiveScalingConfigurationlistValue.IsSetCustomizedCapacityMetricSpecification())
{
if(publicRequestPredictiveScalingConfigurationlistValue.CustomizedCapacityMetricSpecification.IsSetMetricDataQueries())
{
int publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex = 1;
foreach(var publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue in publicRequestPredictiveScalingConfigurationlistValue.CustomizedCapacityMetricSpecification.MetricDataQueries)
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.IsSetExpression())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedCapacityMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex + "." + "Expression", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.Expression));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.IsSetId())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedCapacityMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex + "." + "Id", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.Id));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.IsSetLabel())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedCapacityMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex + "." + "Label", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.Label));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.IsSetMetricStat())
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.IsSetMetric())
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.Metric.IsSetDimensions())
{
int publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueMetricStatMetriclistValueIndex = 1;
foreach(var publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueMetricStatMetriclistValue in publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.Metric.Dimensions)
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueMetricStatMetriclistValue.IsSetName())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedCapacityMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Dimensions" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueMetricStatMetriclistValueIndex + "." + "Name", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueMetricStatMetriclistValue.Name));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueMetricStatMetriclistValue.IsSetValue())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedCapacityMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Dimensions" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueMetricStatMetriclistValueIndex + "." + "Value", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueMetricStatMetriclistValue.Value));
}
publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueMetricStatMetriclistValueIndex++;
}
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.Metric.IsSetMetricName())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedCapacityMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "MetricName", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.Metric.MetricName));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.Metric.IsSetNamespace())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedCapacityMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Namespace", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.Metric.Namespace));
}
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.IsSetStat())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedCapacityMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Stat", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.Stat));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.IsSetUnit())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedCapacityMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Unit", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.MetricStat.Unit));
}
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.IsSetReturnData())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedCapacityMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex + "." + "ReturnData", StringUtils.FromBool(publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValue.ReturnData));
}
publicRequestPredictiveScalingConfigurationlistValueCustomizedCapacityMetricSpecificationlistValueIndex++;
}
}
}
if(publicRequestPredictiveScalingConfigurationlistValue.IsSetCustomizedLoadMetricSpecification())
{
if(publicRequestPredictiveScalingConfigurationlistValue.CustomizedLoadMetricSpecification.IsSetMetricDataQueries())
{
int publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex = 1;
foreach(var publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue in publicRequestPredictiveScalingConfigurationlistValue.CustomizedLoadMetricSpecification.MetricDataQueries)
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.IsSetExpression())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedLoadMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex + "." + "Expression", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.Expression));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.IsSetId())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedLoadMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex + "." + "Id", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.Id));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.IsSetLabel())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedLoadMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex + "." + "Label", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.Label));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.IsSetMetricStat())
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.IsSetMetric())
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.Metric.IsSetDimensions())
{
int publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueMetricStatMetriclistValueIndex = 1;
foreach(var publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueMetricStatMetriclistValue in publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.Metric.Dimensions)
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueMetricStatMetriclistValue.IsSetName())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedLoadMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Dimensions" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueMetricStatMetriclistValueIndex + "." + "Name", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueMetricStatMetriclistValue.Name));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueMetricStatMetriclistValue.IsSetValue())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedLoadMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Dimensions" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueMetricStatMetriclistValueIndex + "." + "Value", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueMetricStatMetriclistValue.Value));
}
publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueMetricStatMetriclistValueIndex++;
}
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.Metric.IsSetMetricName())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedLoadMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "MetricName", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.Metric.MetricName));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.Metric.IsSetNamespace())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedLoadMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Namespace", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.Metric.Namespace));
}
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.IsSetStat())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedLoadMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Stat", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.Stat));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.IsSetUnit())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedLoadMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Unit", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.MetricStat.Unit));
}
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.IsSetReturnData())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedLoadMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex + "." + "ReturnData", StringUtils.FromBool(publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValue.ReturnData));
}
publicRequestPredictiveScalingConfigurationlistValueCustomizedLoadMetricSpecificationlistValueIndex++;
}
}
}
if(publicRequestPredictiveScalingConfigurationlistValue.IsSetCustomizedScalingMetricSpecification())
{
if(publicRequestPredictiveScalingConfigurationlistValue.CustomizedScalingMetricSpecification.IsSetMetricDataQueries())
{
int publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex = 1;
foreach(var publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue in publicRequestPredictiveScalingConfigurationlistValue.CustomizedScalingMetricSpecification.MetricDataQueries)
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.IsSetExpression())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedScalingMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex + "." + "Expression", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.Expression));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.IsSetId())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedScalingMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex + "." + "Id", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.Id));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.IsSetLabel())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedScalingMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex + "." + "Label", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.Label));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.IsSetMetricStat())
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.IsSetMetric())
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.Metric.IsSetDimensions())
{
int publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueMetricStatMetriclistValueIndex = 1;
foreach(var publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueMetricStatMetriclistValue in publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.Metric.Dimensions)
{
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueMetricStatMetriclistValue.IsSetName())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedScalingMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Dimensions" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueMetricStatMetriclistValueIndex + "." + "Name", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueMetricStatMetriclistValue.Name));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueMetricStatMetriclistValue.IsSetValue())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedScalingMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Dimensions" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueMetricStatMetriclistValueIndex + "." + "Value", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueMetricStatMetriclistValue.Value));
}
publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueMetricStatMetriclistValueIndex++;
}
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.Metric.IsSetMetricName())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedScalingMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "MetricName", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.Metric.MetricName));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.Metric.IsSetNamespace())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedScalingMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Namespace", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.Metric.Namespace));
}
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.IsSetStat())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedScalingMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Stat", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.Stat));
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.IsSetUnit())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedScalingMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Unit", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.MetricStat.Unit));
}
}
if(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.IsSetReturnData())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "CustomizedScalingMetricSpecification" + "." + "MetricDataQueries" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex + "." + "ReturnData", StringUtils.FromBool(publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValue.ReturnData));
}
publicRequestPredictiveScalingConfigurationlistValueCustomizedScalingMetricSpecificationlistValueIndex++;
}
}
}
if(publicRequestPredictiveScalingConfigurationlistValue.IsSetPredefinedLoadMetricSpecification())
{
if(publicRequestPredictiveScalingConfigurationlistValue.PredefinedLoadMetricSpecification.IsSetPredefinedMetricType())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "PredefinedLoadMetricSpecification" + "." + "PredefinedMetricType", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValue.PredefinedLoadMetricSpecification.PredefinedMetricType));
}
if(publicRequestPredictiveScalingConfigurationlistValue.PredefinedLoadMetricSpecification.IsSetResourceLabel())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "PredefinedLoadMetricSpecification" + "." + "ResourceLabel", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValue.PredefinedLoadMetricSpecification.ResourceLabel));
}
}
if(publicRequestPredictiveScalingConfigurationlistValue.IsSetPredefinedMetricPairSpecification())
{
if(publicRequestPredictiveScalingConfigurationlistValue.PredefinedMetricPairSpecification.IsSetPredefinedMetricType())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "PredefinedMetricPairSpecification" + "." + "PredefinedMetricType", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValue.PredefinedMetricPairSpecification.PredefinedMetricType));
}
if(publicRequestPredictiveScalingConfigurationlistValue.PredefinedMetricPairSpecification.IsSetResourceLabel())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "PredefinedMetricPairSpecification" + "." + "ResourceLabel", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValue.PredefinedMetricPairSpecification.ResourceLabel));
}
}
if(publicRequestPredictiveScalingConfigurationlistValue.IsSetPredefinedScalingMetricSpecification())
{
if(publicRequestPredictiveScalingConfigurationlistValue.PredefinedScalingMetricSpecification.IsSetPredefinedMetricType())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "PredefinedScalingMetricSpecification" + "." + "PredefinedMetricType", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValue.PredefinedScalingMetricSpecification.PredefinedMetricType));
}
if(publicRequestPredictiveScalingConfigurationlistValue.PredefinedScalingMetricSpecification.IsSetResourceLabel())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "PredefinedScalingMetricSpecification" + "." + "ResourceLabel", StringUtils.FromString(publicRequestPredictiveScalingConfigurationlistValue.PredefinedScalingMetricSpecification.ResourceLabel));
}
}
if(publicRequestPredictiveScalingConfigurationlistValue.IsSetTargetValue())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "MetricSpecifications" + "." + "member" + "." + publicRequestPredictiveScalingConfigurationlistValueIndex + "." + "TargetValue", StringUtils.FromDouble(publicRequestPredictiveScalingConfigurationlistValue.TargetValue));
}
publicRequestPredictiveScalingConfigurationlistValueIndex++;
}
}
if(publicRequest.PredictiveScalingConfiguration.IsSetMode())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "Mode", StringUtils.FromString(publicRequest.PredictiveScalingConfiguration.Mode));
}
if(publicRequest.PredictiveScalingConfiguration.IsSetSchedulingBufferTime())
{
request.Parameters.Add("PredictiveScalingConfiguration" + "." + "SchedulingBufferTime", StringUtils.FromInt(publicRequest.PredictiveScalingConfiguration.SchedulingBufferTime));
}
}
if(publicRequest.IsSetScalingAdjustment())
{
request.Parameters.Add("ScalingAdjustment", StringUtils.FromInt(publicRequest.ScalingAdjustment));
}
if(publicRequest.IsSetStepAdjustments())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.StepAdjustments)
{
if(publicRequestlistValue.IsSetMetricIntervalLowerBound())
{
request.Parameters.Add("StepAdjustments" + "." + "member" + "." + publicRequestlistValueIndex + "." + "MetricIntervalLowerBound", StringUtils.FromDouble(publicRequestlistValue.MetricIntervalLowerBound));
}
if(publicRequestlistValue.IsSetMetricIntervalUpperBound())
{
request.Parameters.Add("StepAdjustments" + "." + "member" + "." + publicRequestlistValueIndex + "." + "MetricIntervalUpperBound", StringUtils.FromDouble(publicRequestlistValue.MetricIntervalUpperBound));
}
if(publicRequestlistValue.IsSetScalingAdjustment())
{
request.Parameters.Add("StepAdjustments" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ScalingAdjustment", StringUtils.FromInt(publicRequestlistValue.ScalingAdjustment));
}
publicRequestlistValueIndex++;
}
}
if(publicRequest.IsSetTargetTrackingConfiguration())
{
if(publicRequest.TargetTrackingConfiguration.IsSetCustomizedMetricSpecification())
{
if(publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.IsSetDimensions())
{
int publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex = 1;
foreach(var publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue in publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.Dimensions)
{
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.IsSetName())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Dimensions" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "Name", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.Name));
}
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.IsSetValue())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Dimensions" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "Value", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.Value));
}
publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex++;
}
}
if(publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.IsSetMetricName())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "MetricName", StringUtils.FromString(publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.MetricName));
}
if(publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.IsSetMetrics())
{
int publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex = 1;
foreach(var publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue in publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.Metrics)
{
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.IsSetExpression())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Metrics" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "Expression", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.Expression));
}
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.IsSetId())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Metrics" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "Id", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.Id));
}
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.IsSetLabel())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Metrics" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "Label", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.Label));
}
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.IsSetMetricStat())
{
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.IsSetMetric())
{
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.Metric.IsSetDimensions())
{
int publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueMetricStatMetriclistValueIndex = 1;
foreach(var publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueMetricStatMetriclistValue in publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.Metric.Dimensions)
{
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueMetricStatMetriclistValue.IsSetName())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Metrics" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Dimensions" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueMetricStatMetriclistValueIndex + "." + "Name", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueMetricStatMetriclistValue.Name));
}
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueMetricStatMetriclistValue.IsSetValue())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Metrics" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Dimensions" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueMetricStatMetriclistValueIndex + "." + "Value", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueMetricStatMetriclistValue.Value));
}
publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueMetricStatMetriclistValueIndex++;
}
}
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.Metric.IsSetMetricName())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Metrics" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "MetricName", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.Metric.MetricName));
}
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.Metric.IsSetNamespace())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Metrics" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Metric" + "." + "Namespace", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.Metric.Namespace));
}
}
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.IsSetStat())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Metrics" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Stat", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.Stat));
}
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.IsSetUnit())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Metrics" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "MetricStat" + "." + "Unit", StringUtils.FromString(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.MetricStat.Unit));
}
}
if(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.IsSetReturnData())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Metrics" + "." + "member" + "." + publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex + "." + "ReturnData", StringUtils.FromBool(publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValue.ReturnData));
}
publicRequestTargetTrackingConfigurationCustomizedMetricSpecificationlistValueIndex++;
}
}
if(publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.IsSetNamespace())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Namespace", StringUtils.FromString(publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.Namespace));
}
if(publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.IsSetStatistic())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Statistic", StringUtils.FromString(publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.Statistic));
}
if(publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.IsSetUnit())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "CustomizedMetricSpecification" + "." + "Unit", StringUtils.FromString(publicRequest.TargetTrackingConfiguration.CustomizedMetricSpecification.Unit));
}
}
if(publicRequest.TargetTrackingConfiguration.IsSetDisableScaleIn())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "DisableScaleIn", StringUtils.FromBool(publicRequest.TargetTrackingConfiguration.DisableScaleIn));
}
if(publicRequest.TargetTrackingConfiguration.IsSetPredefinedMetricSpecification())
{
if(publicRequest.TargetTrackingConfiguration.PredefinedMetricSpecification.IsSetPredefinedMetricType())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "PredefinedMetricSpecification" + "." + "PredefinedMetricType", StringUtils.FromString(publicRequest.TargetTrackingConfiguration.PredefinedMetricSpecification.PredefinedMetricType));
}
if(publicRequest.TargetTrackingConfiguration.PredefinedMetricSpecification.IsSetResourceLabel())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "PredefinedMetricSpecification" + "." + "ResourceLabel", StringUtils.FromString(publicRequest.TargetTrackingConfiguration.PredefinedMetricSpecification.ResourceLabel));
}
}
if(publicRequest.TargetTrackingConfiguration.IsSetTargetValue())
{
request.Parameters.Add("TargetTrackingConfiguration" + "." + "TargetValue", StringUtils.FromDouble(publicRequest.TargetTrackingConfiguration.TargetValue));
}
}
}
return request;
}
private static PutScalingPolicyRequestMarshaller _instance = new PutScalingPolicyRequestMarshaller();
internal static PutScalingPolicyRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutScalingPolicyRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 525 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PutScalingPolicy operation
/// </summary>
public class PutScalingPolicyResponseUnmarshaller : 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)
{
PutScalingPolicyResponse response = new PutScalingPolicyResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("PutScalingPolicyResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, PutScalingPolicyResponse 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("Alarms/member", targetDepth))
{
var unmarshaller = AlarmUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.Alarms.Add(item);
continue;
}
if (context.TestExpression("PolicyARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.PolicyARN = 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("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceLinkedRoleFailure"))
{
return ServiceLinkedRoleFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static PutScalingPolicyResponseUnmarshaller _instance = new PutScalingPolicyResponseUnmarshaller();
internal static PutScalingPolicyResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutScalingPolicyResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 156 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// PutScheduledUpdateGroupAction Request Marshaller
/// </summary>
public class PutScheduledUpdateGroupActionRequestMarshaller : IMarshaller<IRequest, PutScheduledUpdateGroupActionRequest> , 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((PutScheduledUpdateGroupActionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(PutScheduledUpdateGroupActionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "PutScheduledUpdateGroupAction");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetDesiredCapacity())
{
request.Parameters.Add("DesiredCapacity", StringUtils.FromInt(publicRequest.DesiredCapacity));
}
if(publicRequest.IsSetEndTimeUtc())
{
request.Parameters.Add("EndTime", StringUtils.FromDateTimeToISO8601(publicRequest.EndTimeUtc));
}
if(publicRequest.IsSetMaxSize())
{
request.Parameters.Add("MaxSize", StringUtils.FromInt(publicRequest.MaxSize));
}
if(publicRequest.IsSetMinSize())
{
request.Parameters.Add("MinSize", StringUtils.FromInt(publicRequest.MinSize));
}
if(publicRequest.IsSetRecurrence())
{
request.Parameters.Add("Recurrence", StringUtils.FromString(publicRequest.Recurrence));
}
if(publicRequest.IsSetScheduledActionName())
{
request.Parameters.Add("ScheduledActionName", StringUtils.FromString(publicRequest.ScheduledActionName));
}
if(publicRequest.IsSetStartTimeUtc())
{
request.Parameters.Add("StartTime", StringUtils.FromDateTimeToISO8601(publicRequest.StartTimeUtc));
}
if(publicRequest.IsSetTimeUtc())
{
request.Parameters.Add("Time", StringUtils.FromDateTimeToISO8601(publicRequest.TimeUtc));
}
if(publicRequest.IsSetTimeZone())
{
request.Parameters.Add("TimeZone", StringUtils.FromString(publicRequest.TimeZone));
}
}
return request;
}
private static PutScheduledUpdateGroupActionRequestMarshaller _instance = new PutScheduledUpdateGroupActionRequestMarshaller();
internal static PutScheduledUpdateGroupActionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutScheduledUpdateGroupActionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 123 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PutScheduledUpdateGroupAction operation
/// </summary>
public class PutScheduledUpdateGroupActionResponseUnmarshaller : 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)
{
PutScheduledUpdateGroupActionResponse response = new PutScheduledUpdateGroupActionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("PutScheduledUpdateGroupActionResult", 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, PutScheduledUpdateGroupActionResponse 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("AlreadyExists"))
{
return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static PutScheduledUpdateGroupActionResponseUnmarshaller _instance = new PutScheduledUpdateGroupActionResponseUnmarshaller();
internal static PutScheduledUpdateGroupActionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutScheduledUpdateGroupActionResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// PutWarmPool Request Marshaller
/// </summary>
public class PutWarmPoolRequestMarshaller : IMarshaller<IRequest, PutWarmPoolRequest> , 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((PutWarmPoolRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(PutWarmPoolRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "PutWarmPool");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetInstanceReusePolicy())
{
if(publicRequest.InstanceReusePolicy.IsSetReuseOnScaleIn())
{
request.Parameters.Add("InstanceReusePolicy" + "." + "ReuseOnScaleIn", StringUtils.FromBool(publicRequest.InstanceReusePolicy.ReuseOnScaleIn));
}
}
if(publicRequest.IsSetMaxGroupPreparedCapacity())
{
request.Parameters.Add("MaxGroupPreparedCapacity", StringUtils.FromInt(publicRequest.MaxGroupPreparedCapacity));
}
if(publicRequest.IsSetMinSize())
{
request.Parameters.Add("MinSize", StringUtils.FromInt(publicRequest.MinSize));
}
if(publicRequest.IsSetPoolState())
{
request.Parameters.Add("PoolState", StringUtils.FromString(publicRequest.PoolState));
}
}
return request;
}
private static PutWarmPoolRequestMarshaller _instance = new PutWarmPoolRequestMarshaller();
internal static PutWarmPoolRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutWarmPoolRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 106 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PutWarmPool operation
/// </summary>
public class PutWarmPoolResponseUnmarshaller : 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)
{
PutWarmPoolResponse response = new PutWarmPoolResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("PutWarmPoolResult", 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, PutWarmPoolResponse 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("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static PutWarmPoolResponseUnmarshaller _instance = new PutWarmPoolResponseUnmarshaller();
internal static PutWarmPoolResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutWarmPoolResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// RecordLifecycleActionHeartbeat Request Marshaller
/// </summary>
public class RecordLifecycleActionHeartbeatRequestMarshaller : IMarshaller<IRequest, RecordLifecycleActionHeartbeatRequest> , 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((RecordLifecycleActionHeartbeatRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(RecordLifecycleActionHeartbeatRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "RecordLifecycleActionHeartbeat");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetInstanceId())
{
request.Parameters.Add("InstanceId", StringUtils.FromString(publicRequest.InstanceId));
}
if(publicRequest.IsSetLifecycleActionToken())
{
request.Parameters.Add("LifecycleActionToken", StringUtils.FromString(publicRequest.LifecycleActionToken));
}
if(publicRequest.IsSetLifecycleHookName())
{
request.Parameters.Add("LifecycleHookName", StringUtils.FromString(publicRequest.LifecycleHookName));
}
}
return request;
}
private static RecordLifecycleActionHeartbeatRequestMarshaller _instance = new RecordLifecycleActionHeartbeatRequestMarshaller();
internal static RecordLifecycleActionHeartbeatRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static RecordLifecycleActionHeartbeatRequestMarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for RecordLifecycleActionHeartbeat operation
/// </summary>
public class RecordLifecycleActionHeartbeatResponseUnmarshaller : 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)
{
RecordLifecycleActionHeartbeatResponse response = new RecordLifecycleActionHeartbeatResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("RecordLifecycleActionHeartbeatResult", 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, RecordLifecycleActionHeartbeatResponse 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("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static RecordLifecycleActionHeartbeatResponseUnmarshaller _instance = new RecordLifecycleActionHeartbeatResponseUnmarshaller();
internal static RecordLifecycleActionHeartbeatResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static RecordLifecycleActionHeartbeatResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for RefreshPreferences Object
/// </summary>
public class RefreshPreferencesUnmarshaller : IUnmarshaller<RefreshPreferences, XmlUnmarshallerContext>, IUnmarshaller<RefreshPreferences, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public RefreshPreferences Unmarshall(XmlUnmarshallerContext context)
{
RefreshPreferences unmarshalledObject = new RefreshPreferences();
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("AutoRollback", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.AutoRollback = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CheckpointDelay", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.CheckpointDelay = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CheckpointPercentages/member", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.CheckpointPercentages.Add(item);
continue;
}
if (context.TestExpression("InstanceWarmup", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.InstanceWarmup = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MinHealthyPercentage", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MinHealthyPercentage = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ScaleInProtectedInstances", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ScaleInProtectedInstances = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SkipMatching", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.SkipMatching = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StandbyInstances", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StandbyInstances = 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 RefreshPreferences Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static RefreshPreferencesUnmarshaller _instance = new RefreshPreferencesUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static RefreshPreferencesUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ResourceContentionException operation
/// </summary>
public class ResourceContentionExceptionUnmarshaller : IErrorResponseUnmarshaller<ResourceContentionException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ResourceContentionException 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 ResourceContentionException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
ResourceContentionException response = new ResourceContentionException(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 ResourceContentionExceptionUnmarshaller _instance = new ResourceContentionExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ResourceContentionExceptionUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ResourceInUseException operation
/// </summary>
public class ResourceInUseExceptionUnmarshaller : IErrorResponseUnmarshaller<ResourceInUseException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ResourceInUseException 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 ResourceInUseException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
ResourceInUseException response = new ResourceInUseException(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 ResourceInUseExceptionUnmarshaller _instance = new ResourceInUseExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ResourceInUseExceptionUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// ResumeProcesses Request Marshaller
/// </summary>
public class ResumeProcessesRequestMarshaller : IMarshaller<IRequest, ResumeProcessesRequest> , 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((ResumeProcessesRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ResumeProcessesRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "ResumeProcesses");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetScalingProcesses())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.ScalingProcesses)
{
request.Parameters.Add("ScalingProcesses" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
}
return request;
}
private static ResumeProcessesRequestMarshaller _instance = new ResumeProcessesRequestMarshaller();
internal static ResumeProcessesRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ResumeProcessesRequestMarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ResumeProcesses operation
/// </summary>
public class ResumeProcessesResponseUnmarshaller : 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)
{
ResumeProcessesResponse response = new ResumeProcessesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("ResumeProcessesResult", 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, ResumeProcessesResponse 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("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUse"))
{
return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static ResumeProcessesResponseUnmarshaller _instance = new ResumeProcessesResponseUnmarshaller();
internal static ResumeProcessesResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ResumeProcessesResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for RollbackDetails Object
/// </summary>
public class RollbackDetailsUnmarshaller : IUnmarshaller<RollbackDetails, XmlUnmarshallerContext>, IUnmarshaller<RollbackDetails, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public RollbackDetails Unmarshall(XmlUnmarshallerContext context)
{
RollbackDetails unmarshalledObject = new RollbackDetails();
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("InstancesToUpdateOnRollback", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.InstancesToUpdateOnRollback = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PercentageCompleteOnRollback", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.PercentageCompleteOnRollback = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ProgressDetailsOnRollback", targetDepth))
{
var unmarshaller = InstanceRefreshProgressDetailsUnmarshaller.Instance;
unmarshalledObject.ProgressDetailsOnRollback = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RollbackReason", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.RollbackReason = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RollbackStartTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.RollbackStartTime = 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 RollbackDetails Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static RollbackDetailsUnmarshaller _instance = new RollbackDetailsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static RollbackDetailsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 121 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// RollbackInstanceRefresh Request Marshaller
/// </summary>
public class RollbackInstanceRefreshRequestMarshaller : IMarshaller<IRequest, RollbackInstanceRefreshRequest> , 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((RollbackInstanceRefreshRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(RollbackInstanceRefreshRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "RollbackInstanceRefresh");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
}
return request;
}
private static RollbackInstanceRefreshRequestMarshaller _instance = new RollbackInstanceRefreshRequestMarshaller();
internal static RollbackInstanceRefreshRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static RollbackInstanceRefreshRequestMarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for RollbackInstanceRefresh operation
/// </summary>
public class RollbackInstanceRefreshResponseUnmarshaller : 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)
{
RollbackInstanceRefreshResponse response = new RollbackInstanceRefreshResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("RollbackInstanceRefreshResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, RollbackInstanceRefreshResponse 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("InstanceRefreshId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.InstanceRefreshId = 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("ActiveInstanceRefreshNotFound"))
{
return ActiveInstanceRefreshNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("IrreversibleInstanceRefresh"))
{
return IrreversibleInstanceRefreshExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static RollbackInstanceRefreshResponseUnmarshaller _instance = new RollbackInstanceRefreshResponseUnmarshaller();
internal static RollbackInstanceRefreshResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static RollbackInstanceRefreshResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ScalingActivityInProgressException operation
/// </summary>
public class ScalingActivityInProgressExceptionUnmarshaller : IErrorResponseUnmarshaller<ScalingActivityInProgressException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ScalingActivityInProgressException 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 ScalingActivityInProgressException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
ScalingActivityInProgressException response = new ScalingActivityInProgressException(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 ScalingActivityInProgressExceptionUnmarshaller _instance = new ScalingActivityInProgressExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ScalingActivityInProgressExceptionUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ScalingPolicy Object
/// </summary>
public class ScalingPolicyUnmarshaller : IUnmarshaller<ScalingPolicy, XmlUnmarshallerContext>, IUnmarshaller<ScalingPolicy, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ScalingPolicy Unmarshall(XmlUnmarshallerContext context)
{
ScalingPolicy unmarshalledObject = new ScalingPolicy();
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("AdjustmentType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AdjustmentType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Alarms/member", targetDepth))
{
var unmarshaller = AlarmUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.Alarms.Add(item);
continue;
}
if (context.TestExpression("AutoScalingGroupName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AutoScalingGroupName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Cooldown", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Cooldown = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Enabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Enabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EstimatedInstanceWarmup", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.EstimatedInstanceWarmup = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MetricAggregationType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MetricAggregationType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MinAdjustmentMagnitude", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MinAdjustmentMagnitude = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MinAdjustmentStep", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MinAdjustmentStep = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PolicyARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PolicyARN = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PolicyName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PolicyName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PolicyType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PolicyType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PredictiveScalingConfiguration", targetDepth))
{
var unmarshaller = PredictiveScalingConfigurationUnmarshaller.Instance;
unmarshalledObject.PredictiveScalingConfiguration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ScalingAdjustment", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.ScalingAdjustment = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StepAdjustments/member", targetDepth))
{
var unmarshaller = StepAdjustmentUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
unmarshalledObject.StepAdjustments.Add(item);
continue;
}
if (context.TestExpression("TargetTrackingConfiguration", targetDepth))
{
var unmarshaller = TargetTrackingConfigurationUnmarshaller.Instance;
unmarshalledObject.TargetTrackingConfiguration = 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 ScalingPolicy Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static ScalingPolicyUnmarshaller _instance = new ScalingPolicyUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ScalingPolicyUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 189 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ScheduledUpdateGroupAction Object
/// </summary>
public class ScheduledUpdateGroupActionUnmarshaller : IUnmarshaller<ScheduledUpdateGroupAction, XmlUnmarshallerContext>, IUnmarshaller<ScheduledUpdateGroupAction, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ScheduledUpdateGroupAction Unmarshall(XmlUnmarshallerContext context)
{
ScheduledUpdateGroupAction unmarshalledObject = new ScheduledUpdateGroupAction();
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("AutoScalingGroupName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AutoScalingGroupName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DesiredCapacity", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.DesiredCapacity = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EndTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.EndTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MaxSize", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MaxSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MinSize", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MinSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Recurrence", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Recurrence = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ScheduledActionARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ScheduledActionARN = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ScheduledActionName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ScheduledActionName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StartTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.StartTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Time", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.Time = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TimeZone", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TimeZone = 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 ScheduledUpdateGroupAction Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static ScheduledUpdateGroupActionUnmarshaller _instance = new ScheduledUpdateGroupActionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ScheduledUpdateGroupActionUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ServiceLinkedRoleFailureException operation
/// </summary>
public class ServiceLinkedRoleFailureExceptionUnmarshaller : IErrorResponseUnmarshaller<ServiceLinkedRoleFailureException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ServiceLinkedRoleFailureException 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 ServiceLinkedRoleFailureException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
ServiceLinkedRoleFailureException response = new ServiceLinkedRoleFailureException(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 ServiceLinkedRoleFailureExceptionUnmarshaller _instance = new ServiceLinkedRoleFailureExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ServiceLinkedRoleFailureExceptionUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// SetDesiredCapacity Request Marshaller
/// </summary>
public class SetDesiredCapacityRequestMarshaller : IMarshaller<IRequest, SetDesiredCapacityRequest> , 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((SetDesiredCapacityRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(SetDesiredCapacityRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "SetDesiredCapacity");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetDesiredCapacity())
{
request.Parameters.Add("DesiredCapacity", StringUtils.FromInt(publicRequest.DesiredCapacity));
}
if(publicRequest.IsSetHonorCooldown())
{
request.Parameters.Add("HonorCooldown", StringUtils.FromBool(publicRequest.HonorCooldown));
}
}
return request;
}
private static SetDesiredCapacityRequestMarshaller _instance = new SetDesiredCapacityRequestMarshaller();
internal static SetDesiredCapacityRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static SetDesiredCapacityRequestMarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SetDesiredCapacity operation
/// </summary>
public class SetDesiredCapacityResponseUnmarshaller : 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)
{
SetDesiredCapacityResponse response = new SetDesiredCapacityResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("SetDesiredCapacityResult", 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, SetDesiredCapacityResponse 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("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ScalingActivityInProgress"))
{
return ScalingActivityInProgressExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static SetDesiredCapacityResponseUnmarshaller _instance = new SetDesiredCapacityResponseUnmarshaller();
internal static SetDesiredCapacityResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static SetDesiredCapacityResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// SetInstanceHealth Request Marshaller
/// </summary>
public class SetInstanceHealthRequestMarshaller : IMarshaller<IRequest, SetInstanceHealthRequest> , 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((SetInstanceHealthRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(SetInstanceHealthRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "SetInstanceHealth");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetHealthStatus())
{
request.Parameters.Add("HealthStatus", StringUtils.FromString(publicRequest.HealthStatus));
}
if(publicRequest.IsSetInstanceId())
{
request.Parameters.Add("InstanceId", StringUtils.FromString(publicRequest.InstanceId));
}
if(publicRequest.IsSetShouldRespectGracePeriod())
{
request.Parameters.Add("ShouldRespectGracePeriod", StringUtils.FromBool(publicRequest.ShouldRespectGracePeriod));
}
}
return request;
}
private static SetInstanceHealthRequestMarshaller _instance = new SetInstanceHealthRequestMarshaller();
internal static SetInstanceHealthRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static SetInstanceHealthRequestMarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SetInstanceHealth operation
/// </summary>
public class SetInstanceHealthResponseUnmarshaller : 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)
{
SetInstanceHealthResponse response = new SetInstanceHealthResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("SetInstanceHealthResult", 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, SetInstanceHealthResponse 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("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static SetInstanceHealthResponseUnmarshaller _instance = new SetInstanceHealthResponseUnmarshaller();
internal static SetInstanceHealthResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static SetInstanceHealthResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// SetInstanceProtection Request Marshaller
/// </summary>
public class SetInstanceProtectionRequestMarshaller : IMarshaller<IRequest, SetInstanceProtectionRequest> , 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((SetInstanceProtectionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(SetInstanceProtectionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "SetInstanceProtection");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetInstanceIds())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.InstanceIds)
{
request.Parameters.Add("InstanceIds" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
if(publicRequest.IsSetProtectedFromScaleIn())
{
request.Parameters.Add("ProtectedFromScaleIn", StringUtils.FromBool(publicRequest.ProtectedFromScaleIn));
}
}
return request;
}
private static SetInstanceProtectionRequestMarshaller _instance = new SetInstanceProtectionRequestMarshaller();
internal static SetInstanceProtectionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static SetInstanceProtectionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 100 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SetInstanceProtection operation
/// </summary>
public class SetInstanceProtectionResponseUnmarshaller : 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)
{
SetInstanceProtectionResponse response = new SetInstanceProtectionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("SetInstanceProtectionResult", 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, SetInstanceProtectionResponse 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("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static SetInstanceProtectionResponseUnmarshaller _instance = new SetInstanceProtectionResponseUnmarshaller();
internal static SetInstanceProtectionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static SetInstanceProtectionResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// StartInstanceRefresh Request Marshaller
/// </summary>
public class StartInstanceRefreshRequestMarshaller : IMarshaller<IRequest, StartInstanceRefreshRequest> , 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((StartInstanceRefreshRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(StartInstanceRefreshRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "StartInstanceRefresh");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetDesiredConfiguration())
{
if(publicRequest.DesiredConfiguration.IsSetLaunchTemplate())
{
if(publicRequest.DesiredConfiguration.LaunchTemplate.IsSetLaunchTemplateId())
{
request.Parameters.Add("DesiredConfiguration" + "." + "LaunchTemplate" + "." + "LaunchTemplateId", StringUtils.FromString(publicRequest.DesiredConfiguration.LaunchTemplate.LaunchTemplateId));
}
if(publicRequest.DesiredConfiguration.LaunchTemplate.IsSetLaunchTemplateName())
{
request.Parameters.Add("DesiredConfiguration" + "." + "LaunchTemplate" + "." + "LaunchTemplateName", StringUtils.FromString(publicRequest.DesiredConfiguration.LaunchTemplate.LaunchTemplateName));
}
if(publicRequest.DesiredConfiguration.LaunchTemplate.IsSetVersion())
{
request.Parameters.Add("DesiredConfiguration" + "." + "LaunchTemplate" + "." + "Version", StringUtils.FromString(publicRequest.DesiredConfiguration.LaunchTemplate.Version));
}
}
if(publicRequest.DesiredConfiguration.IsSetMixedInstancesPolicy())
{
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.IsSetInstancesDistribution())
{
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.IsSetOnDemandAllocationStrategy())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "OnDemandAllocationStrategy", StringUtils.FromString(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.OnDemandAllocationStrategy));
}
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.IsSetOnDemandBaseCapacity())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "OnDemandBaseCapacity", StringUtils.FromInt(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.OnDemandBaseCapacity));
}
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.IsSetOnDemandPercentageAboveBaseCapacity())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "OnDemandPercentageAboveBaseCapacity", StringUtils.FromInt(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.OnDemandPercentageAboveBaseCapacity));
}
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.IsSetSpotAllocationStrategy())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "SpotAllocationStrategy", StringUtils.FromString(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.SpotAllocationStrategy));
}
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.IsSetSpotInstancePools())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "SpotInstancePools", StringUtils.FromInt(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.SpotInstancePools));
}
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.IsSetSpotMaxPrice())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "SpotMaxPrice", StringUtils.FromString(publicRequest.DesiredConfiguration.MixedInstancesPolicy.InstancesDistribution.SpotMaxPrice));
}
}
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.IsSetLaunchTemplate())
{
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.LaunchTemplate.IsSetLaunchTemplateSpecification())
{
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.IsSetLaunchTemplateId())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "LaunchTemplateSpecification" + "." + "LaunchTemplateId", StringUtils.FromString(publicRequest.DesiredConfiguration.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.LaunchTemplateId));
}
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.IsSetLaunchTemplateName())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "LaunchTemplateSpecification" + "." + "LaunchTemplateName", StringUtils.FromString(publicRequest.DesiredConfiguration.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.LaunchTemplateName));
}
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.IsSetVersion())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "LaunchTemplateSpecification" + "." + "Version", StringUtils.FromString(publicRequest.DesiredConfiguration.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.Version));
}
}
if(publicRequest.DesiredConfiguration.MixedInstancesPolicy.LaunchTemplate.IsSetOverrides())
{
int publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex = 1;
foreach(var publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue in publicRequest.DesiredConfiguration.MixedInstancesPolicy.LaunchTemplate.Overrides)
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.IsSetInstanceRequirements())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAcceleratorCount())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorCount.IsSetMax())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorCount" + "." + "Max", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorCount.Max));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorCount.IsSetMin())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorCount" + "." + "Min", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorCount.Min));
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAcceleratorManufacturers())
{
int publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorManufacturers)
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorManufacturers" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAcceleratorNames())
{
int publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorNames)
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorNames" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAcceleratorTotalMemoryMiB())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorTotalMemoryMiB.IsSetMax())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorTotalMemoryMiB" + "." + "Max", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorTotalMemoryMiB.Max));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorTotalMemoryMiB.IsSetMin())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorTotalMemoryMiB" + "." + "Min", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorTotalMemoryMiB.Min));
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAcceleratorTypes())
{
int publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorTypes)
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorTypes" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAllowedInstanceTypes())
{
int publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AllowedInstanceTypes)
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AllowedInstanceTypes" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetBareMetal())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "BareMetal", StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BareMetal));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetBaselineEbsBandwidthMbps())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BaselineEbsBandwidthMbps.IsSetMax())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "BaselineEbsBandwidthMbps" + "." + "Max", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BaselineEbsBandwidthMbps.Max));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BaselineEbsBandwidthMbps.IsSetMin())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "BaselineEbsBandwidthMbps" + "." + "Min", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BaselineEbsBandwidthMbps.Min));
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetBurstablePerformance())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "BurstablePerformance", StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BurstablePerformance));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetCpuManufacturers())
{
int publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.CpuManufacturers)
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "CpuManufacturers" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetExcludedInstanceTypes())
{
int publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.ExcludedInstanceTypes)
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "ExcludedInstanceTypes" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetInstanceGenerations())
{
int publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.InstanceGenerations)
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "InstanceGenerations" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetLocalStorage())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "LocalStorage", StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.LocalStorage));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetLocalStorageTypes())
{
int publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.LocalStorageTypes)
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "LocalStorageTypes" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetMemoryGiBPerVCpu())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryGiBPerVCpu.IsSetMax())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "MemoryGiBPerVCpu" + "." + "Max", StringUtils.FromDouble(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryGiBPerVCpu.Max));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryGiBPerVCpu.IsSetMin())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "MemoryGiBPerVCpu" + "." + "Min", StringUtils.FromDouble(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryGiBPerVCpu.Min));
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetMemoryMiB())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryMiB.IsSetMax())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "MemoryMiB" + "." + "Max", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryMiB.Max));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryMiB.IsSetMin())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "MemoryMiB" + "." + "Min", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryMiB.Min));
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetNetworkBandwidthGbps())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkBandwidthGbps.IsSetMax())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "NetworkBandwidthGbps" + "." + "Max", StringUtils.FromDouble(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkBandwidthGbps.Max));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkBandwidthGbps.IsSetMin())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "NetworkBandwidthGbps" + "." + "Min", StringUtils.FromDouble(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkBandwidthGbps.Min));
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetNetworkInterfaceCount())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkInterfaceCount.IsSetMax())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "NetworkInterfaceCount" + "." + "Max", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkInterfaceCount.Max));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkInterfaceCount.IsSetMin())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "NetworkInterfaceCount" + "." + "Min", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkInterfaceCount.Min));
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetOnDemandMaxPricePercentageOverLowestPrice())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "OnDemandMaxPricePercentageOverLowestPrice", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.OnDemandMaxPricePercentageOverLowestPrice));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetRequireHibernateSupport())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "RequireHibernateSupport", StringUtils.FromBool(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.RequireHibernateSupport));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetSpotMaxPricePercentageOverLowestPrice())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "SpotMaxPricePercentageOverLowestPrice", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.SpotMaxPricePercentageOverLowestPrice));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetTotalLocalStorageGB())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.TotalLocalStorageGB.IsSetMax())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "TotalLocalStorageGB" + "." + "Max", StringUtils.FromDouble(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.TotalLocalStorageGB.Max));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.TotalLocalStorageGB.IsSetMin())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "TotalLocalStorageGB" + "." + "Min", StringUtils.FromDouble(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.TotalLocalStorageGB.Min));
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetVCpuCount())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.VCpuCount.IsSetMax())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "VCpuCount" + "." + "Max", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.VCpuCount.Max));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.VCpuCount.IsSetMin())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "VCpuCount" + "." + "Min", StringUtils.FromInt(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.VCpuCount.Min));
}
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.IsSetInstanceType())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceType", StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.InstanceType));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.IsSetLaunchTemplateSpecification())
{
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.IsSetLaunchTemplateId())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "LaunchTemplateSpecification" + "." + "LaunchTemplateId", StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.LaunchTemplateId));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.IsSetLaunchTemplateName())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "LaunchTemplateSpecification" + "." + "LaunchTemplateName", StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.LaunchTemplateName));
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.IsSetVersion())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "LaunchTemplateSpecification" + "." + "Version", StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.Version));
}
}
if(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.IsSetWeightedCapacity())
{
request.Parameters.Add("DesiredConfiguration" + "." + "MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "WeightedCapacity", StringUtils.FromString(publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValue.WeightedCapacity));
}
publicRequestDesiredConfigurationMixedInstancesPolicyLaunchTemplatelistValueIndex++;
}
}
}
}
}
if(publicRequest.IsSetPreferences())
{
if(publicRequest.Preferences.IsSetAutoRollback())
{
request.Parameters.Add("Preferences" + "." + "AutoRollback", StringUtils.FromBool(publicRequest.Preferences.AutoRollback));
}
if(publicRequest.Preferences.IsSetCheckpointDelay())
{
request.Parameters.Add("Preferences" + "." + "CheckpointDelay", StringUtils.FromInt(publicRequest.Preferences.CheckpointDelay));
}
if(publicRequest.Preferences.IsSetCheckpointPercentages())
{
int publicRequestPreferenceslistValueIndex = 1;
foreach(var publicRequestPreferenceslistValue in publicRequest.Preferences.CheckpointPercentages)
{
request.Parameters.Add("Preferences" + "." + "CheckpointPercentages" + "." + "member" + "." + publicRequestPreferenceslistValueIndex, StringUtils.FromInt(publicRequestPreferenceslistValue));
publicRequestPreferenceslistValueIndex++;
}
}
if(publicRequest.Preferences.IsSetInstanceWarmup())
{
request.Parameters.Add("Preferences" + "." + "InstanceWarmup", StringUtils.FromInt(publicRequest.Preferences.InstanceWarmup));
}
if(publicRequest.Preferences.IsSetMinHealthyPercentage())
{
request.Parameters.Add("Preferences" + "." + "MinHealthyPercentage", StringUtils.FromInt(publicRequest.Preferences.MinHealthyPercentage));
}
if(publicRequest.Preferences.IsSetScaleInProtectedInstances())
{
request.Parameters.Add("Preferences" + "." + "ScaleInProtectedInstances", StringUtils.FromString(publicRequest.Preferences.ScaleInProtectedInstances));
}
if(publicRequest.Preferences.IsSetSkipMatching())
{
request.Parameters.Add("Preferences" + "." + "SkipMatching", StringUtils.FromBool(publicRequest.Preferences.SkipMatching));
}
if(publicRequest.Preferences.IsSetStandbyInstances())
{
request.Parameters.Add("Preferences" + "." + "StandbyInstances", StringUtils.FromString(publicRequest.Preferences.StandbyInstances));
}
}
if(publicRequest.IsSetStrategy())
{
request.Parameters.Add("Strategy", StringUtils.FromString(publicRequest.Strategy));
}
}
return request;
}
private static StartInstanceRefreshRequestMarshaller _instance = new StartInstanceRefreshRequestMarshaller();
internal static StartInstanceRefreshRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StartInstanceRefreshRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 426 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for StartInstanceRefresh operation
/// </summary>
public class StartInstanceRefreshResponseUnmarshaller : 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)
{
StartInstanceRefreshResponse response = new StartInstanceRefreshResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("StartInstanceRefreshResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, StartInstanceRefreshResponse 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("InstanceRefreshId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.InstanceRefreshId = 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("InstanceRefreshInProgress"))
{
return InstanceRefreshInProgressExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static StartInstanceRefreshResponseUnmarshaller _instance = new StartInstanceRefreshResponseUnmarshaller();
internal static StartInstanceRefreshResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StartInstanceRefreshResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for StepAdjustment Object
/// </summary>
public class StepAdjustmentUnmarshaller : IUnmarshaller<StepAdjustment, XmlUnmarshallerContext>, IUnmarshaller<StepAdjustment, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public StepAdjustment Unmarshall(XmlUnmarshallerContext context)
{
StepAdjustment unmarshalledObject = new StepAdjustment();
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("MetricIntervalLowerBound", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.MetricIntervalLowerBound = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MetricIntervalUpperBound", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.MetricIntervalUpperBound = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ScalingAdjustment", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.ScalingAdjustment = 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 StepAdjustment Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static StepAdjustmentUnmarshaller _instance = new StepAdjustmentUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static StepAdjustmentUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SuspendedProcess Object
/// </summary>
public class SuspendedProcessUnmarshaller : IUnmarshaller<SuspendedProcess, XmlUnmarshallerContext>, IUnmarshaller<SuspendedProcess, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public SuspendedProcess Unmarshall(XmlUnmarshallerContext context)
{
SuspendedProcess unmarshalledObject = new SuspendedProcess();
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("ProcessName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ProcessName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SuspensionReason", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SuspensionReason = 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 SuspendedProcess Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static SuspendedProcessUnmarshaller _instance = new SuspendedProcessUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SuspendedProcessUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// SuspendProcesses Request Marshaller
/// </summary>
public class SuspendProcessesRequestMarshaller : IMarshaller<IRequest, SuspendProcessesRequest> , 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((SuspendProcessesRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(SuspendProcessesRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "SuspendProcesses");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetScalingProcesses())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.ScalingProcesses)
{
request.Parameters.Add("ScalingProcesses" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
}
return request;
}
private static SuspendProcessesRequestMarshaller _instance = new SuspendProcessesRequestMarshaller();
internal static SuspendProcessesRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static SuspendProcessesRequestMarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SuspendProcesses operation
/// </summary>
public class SuspendProcessesResponseUnmarshaller : 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)
{
SuspendProcessesResponse response = new SuspendProcessesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("SuspendProcessesResult", 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, SuspendProcessesResponse 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("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUse"))
{
return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static SuspendProcessesResponseUnmarshaller _instance = new SuspendProcessesResponseUnmarshaller();
internal static SuspendProcessesResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static SuspendProcessesResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TagDescription Object
/// </summary>
public class TagDescriptionUnmarshaller : IUnmarshaller<TagDescription, XmlUnmarshallerContext>, IUnmarshaller<TagDescription, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TagDescription Unmarshall(XmlUnmarshallerContext context)
{
TagDescription unmarshalledObject = new TagDescription();
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("Key", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Key = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PropagateAtLaunch", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.PropagateAtLaunch = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ResourceId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResourceId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ResourceType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResourceType = 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 TagDescription Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static TagDescriptionUnmarshaller _instance = new TagDescriptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TagDescriptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 121 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TargetTrackingConfiguration Object
/// </summary>
public class TargetTrackingConfigurationUnmarshaller : IUnmarshaller<TargetTrackingConfiguration, XmlUnmarshallerContext>, IUnmarshaller<TargetTrackingConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TargetTrackingConfiguration Unmarshall(XmlUnmarshallerContext context)
{
TargetTrackingConfiguration unmarshalledObject = new TargetTrackingConfiguration();
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("CustomizedMetricSpecification", targetDepth))
{
var unmarshaller = CustomizedMetricSpecificationUnmarshaller.Instance;
unmarshalledObject.CustomizedMetricSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DisableScaleIn", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.DisableScaleIn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PredefinedMetricSpecification", targetDepth))
{
var unmarshaller = PredefinedMetricSpecificationUnmarshaller.Instance;
unmarshalledObject.PredefinedMetricSpecification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TargetValue", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.TargetValue = 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 TargetTrackingConfiguration Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static TargetTrackingConfigurationUnmarshaller _instance = new TargetTrackingConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TargetTrackingConfigurationUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TargetTrackingMetricDataQuery Object
/// </summary>
public class TargetTrackingMetricDataQueryUnmarshaller : IUnmarshaller<TargetTrackingMetricDataQuery, XmlUnmarshallerContext>, IUnmarshaller<TargetTrackingMetricDataQuery, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TargetTrackingMetricDataQuery Unmarshall(XmlUnmarshallerContext context)
{
TargetTrackingMetricDataQuery unmarshalledObject = new TargetTrackingMetricDataQuery();
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("Expression", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Expression = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Label", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Label = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MetricStat", targetDepth))
{
var unmarshaller = TargetTrackingMetricStatUnmarshaller.Instance;
unmarshalledObject.MetricStat = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ReturnData", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ReturnData = 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 TargetTrackingMetricDataQuery Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static TargetTrackingMetricDataQueryUnmarshaller _instance = new TargetTrackingMetricDataQueryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TargetTrackingMetricDataQueryUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 121 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TargetTrackingMetricStat Object
/// </summary>
public class TargetTrackingMetricStatUnmarshaller : IUnmarshaller<TargetTrackingMetricStat, XmlUnmarshallerContext>, IUnmarshaller<TargetTrackingMetricStat, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TargetTrackingMetricStat Unmarshall(XmlUnmarshallerContext context)
{
TargetTrackingMetricStat unmarshalledObject = new TargetTrackingMetricStat();
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("Metric", targetDepth))
{
var unmarshaller = MetricUnmarshaller.Instance;
unmarshalledObject.Metric = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Stat", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Stat = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Unit", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Unit = 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 TargetTrackingMetricStat Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static TargetTrackingMetricStatUnmarshaller _instance = new TargetTrackingMetricStatUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TargetTrackingMetricStatUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// TerminateInstanceInAutoScalingGroup Request Marshaller
/// </summary>
public class TerminateInstanceInAutoScalingGroupRequestMarshaller : IMarshaller<IRequest, TerminateInstanceInAutoScalingGroupRequest> , 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((TerminateInstanceInAutoScalingGroupRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(TerminateInstanceInAutoScalingGroupRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "TerminateInstanceInAutoScalingGroup");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetInstanceId())
{
request.Parameters.Add("InstanceId", StringUtils.FromString(publicRequest.InstanceId));
}
if(publicRequest.IsSetShouldDecrementDesiredCapacity())
{
request.Parameters.Add("ShouldDecrementDesiredCapacity", StringUtils.FromBool(publicRequest.ShouldDecrementDesiredCapacity));
}
}
return request;
}
private static TerminateInstanceInAutoScalingGroupRequestMarshaller _instance = new TerminateInstanceInAutoScalingGroupRequestMarshaller();
internal static TerminateInstanceInAutoScalingGroupRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static TerminateInstanceInAutoScalingGroupRequestMarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TerminateInstanceInAutoScalingGroup operation
/// </summary>
public class TerminateInstanceInAutoScalingGroupResponseUnmarshaller : 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)
{
TerminateInstanceInAutoScalingGroupResponse response = new TerminateInstanceInAutoScalingGroupResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("TerminateInstanceInAutoScalingGroupResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, TerminateInstanceInAutoScalingGroupResponse 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("Activity", targetDepth))
{
var unmarshaller = ActivityUnmarshaller.Instance;
response.Activity = 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("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ScalingActivityInProgress"))
{
return ScalingActivityInProgressExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static TerminateInstanceInAutoScalingGroupResponseUnmarshaller _instance = new TerminateInstanceInAutoScalingGroupResponseUnmarshaller();
internal static TerminateInstanceInAutoScalingGroupResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static TerminateInstanceInAutoScalingGroupResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TotalLocalStorageGBRequest Object
/// </summary>
public class TotalLocalStorageGBRequestUnmarshaller : IUnmarshaller<TotalLocalStorageGBRequest, XmlUnmarshallerContext>, IUnmarshaller<TotalLocalStorageGBRequest, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TotalLocalStorageGBRequest Unmarshall(XmlUnmarshallerContext context)
{
TotalLocalStorageGBRequest unmarshalledObject = new TotalLocalStorageGBRequest();
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("Max", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.Max = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Min", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.Min = 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 TotalLocalStorageGBRequest Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static TotalLocalStorageGBRequestUnmarshaller _instance = new TotalLocalStorageGBRequestUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TotalLocalStorageGBRequestUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TrafficSourceIdentifier Object
/// </summary>
public class TrafficSourceIdentifierUnmarshaller : IUnmarshaller<TrafficSourceIdentifier, XmlUnmarshallerContext>, IUnmarshaller<TrafficSourceIdentifier, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TrafficSourceIdentifier Unmarshall(XmlUnmarshallerContext context)
{
TrafficSourceIdentifier unmarshalledObject = new TrafficSourceIdentifier();
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("Identifier", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Identifier = 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 TrafficSourceIdentifier Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static TrafficSourceIdentifierUnmarshaller _instance = new TrafficSourceIdentifierUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TrafficSourceIdentifierUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TrafficSourceState Object
/// </summary>
public class TrafficSourceStateUnmarshaller : IUnmarshaller<TrafficSourceState, XmlUnmarshallerContext>, IUnmarshaller<TrafficSourceState, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TrafficSourceState Unmarshall(XmlUnmarshallerContext context)
{
TrafficSourceState unmarshalledObject = new TrafficSourceState();
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("Identifier", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Identifier = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("State", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.State = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TrafficSource", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TrafficSource = 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 TrafficSourceState Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static TrafficSourceStateUnmarshaller _instance = new TrafficSourceStateUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TrafficSourceStateUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateAutoScalingGroup Request Marshaller
/// </summary>
public class UpdateAutoScalingGroupRequestMarshaller : IMarshaller<IRequest, UpdateAutoScalingGroupRequest> , 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((UpdateAutoScalingGroupRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateAutoScalingGroupRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AutoScaling");
request.Parameters.Add("Action", "UpdateAutoScalingGroup");
request.Parameters.Add("Version", "2011-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAutoScalingGroupName())
{
request.Parameters.Add("AutoScalingGroupName", StringUtils.FromString(publicRequest.AutoScalingGroupName));
}
if(publicRequest.IsSetAvailabilityZones())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.AvailabilityZones)
{
request.Parameters.Add("AvailabilityZones" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
if(publicRequest.IsSetCapacityRebalance())
{
request.Parameters.Add("CapacityRebalance", StringUtils.FromBool(publicRequest.CapacityRebalance));
}
if(publicRequest.IsSetContext())
{
request.Parameters.Add("Context", StringUtils.FromString(publicRequest.Context));
}
if(publicRequest.IsSetDefaultCooldown())
{
request.Parameters.Add("DefaultCooldown", StringUtils.FromInt(publicRequest.DefaultCooldown));
}
if(publicRequest.IsSetDefaultInstanceWarmup())
{
request.Parameters.Add("DefaultInstanceWarmup", StringUtils.FromInt(publicRequest.DefaultInstanceWarmup));
}
if(publicRequest.IsSetDesiredCapacity())
{
request.Parameters.Add("DesiredCapacity", StringUtils.FromInt(publicRequest.DesiredCapacity));
}
if(publicRequest.IsSetDesiredCapacityType())
{
request.Parameters.Add("DesiredCapacityType", StringUtils.FromString(publicRequest.DesiredCapacityType));
}
if(publicRequest.IsSetHealthCheckGracePeriod())
{
request.Parameters.Add("HealthCheckGracePeriod", StringUtils.FromInt(publicRequest.HealthCheckGracePeriod));
}
if(publicRequest.IsSetHealthCheckType())
{
request.Parameters.Add("HealthCheckType", StringUtils.FromString(publicRequest.HealthCheckType));
}
if(publicRequest.IsSetLaunchConfigurationName())
{
request.Parameters.Add("LaunchConfigurationName", StringUtils.FromString(publicRequest.LaunchConfigurationName));
}
if(publicRequest.IsSetLaunchTemplate())
{
if(publicRequest.LaunchTemplate.IsSetLaunchTemplateId())
{
request.Parameters.Add("LaunchTemplate" + "." + "LaunchTemplateId", StringUtils.FromString(publicRequest.LaunchTemplate.LaunchTemplateId));
}
if(publicRequest.LaunchTemplate.IsSetLaunchTemplateName())
{
request.Parameters.Add("LaunchTemplate" + "." + "LaunchTemplateName", StringUtils.FromString(publicRequest.LaunchTemplate.LaunchTemplateName));
}
if(publicRequest.LaunchTemplate.IsSetVersion())
{
request.Parameters.Add("LaunchTemplate" + "." + "Version", StringUtils.FromString(publicRequest.LaunchTemplate.Version));
}
}
if(publicRequest.IsSetMaxInstanceLifetime())
{
request.Parameters.Add("MaxInstanceLifetime", StringUtils.FromInt(publicRequest.MaxInstanceLifetime));
}
if(publicRequest.IsSetMaxSize())
{
request.Parameters.Add("MaxSize", StringUtils.FromInt(publicRequest.MaxSize));
}
if(publicRequest.IsSetMinSize())
{
request.Parameters.Add("MinSize", StringUtils.FromInt(publicRequest.MinSize));
}
if(publicRequest.IsSetMixedInstancesPolicy())
{
if(publicRequest.MixedInstancesPolicy.IsSetInstancesDistribution())
{
if(publicRequest.MixedInstancesPolicy.InstancesDistribution.IsSetOnDemandAllocationStrategy())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "OnDemandAllocationStrategy", StringUtils.FromString(publicRequest.MixedInstancesPolicy.InstancesDistribution.OnDemandAllocationStrategy));
}
if(publicRequest.MixedInstancesPolicy.InstancesDistribution.IsSetOnDemandBaseCapacity())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "OnDemandBaseCapacity", StringUtils.FromInt(publicRequest.MixedInstancesPolicy.InstancesDistribution.OnDemandBaseCapacity));
}
if(publicRequest.MixedInstancesPolicy.InstancesDistribution.IsSetOnDemandPercentageAboveBaseCapacity())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "OnDemandPercentageAboveBaseCapacity", StringUtils.FromInt(publicRequest.MixedInstancesPolicy.InstancesDistribution.OnDemandPercentageAboveBaseCapacity));
}
if(publicRequest.MixedInstancesPolicy.InstancesDistribution.IsSetSpotAllocationStrategy())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "SpotAllocationStrategy", StringUtils.FromString(publicRequest.MixedInstancesPolicy.InstancesDistribution.SpotAllocationStrategy));
}
if(publicRequest.MixedInstancesPolicy.InstancesDistribution.IsSetSpotInstancePools())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "SpotInstancePools", StringUtils.FromInt(publicRequest.MixedInstancesPolicy.InstancesDistribution.SpotInstancePools));
}
if(publicRequest.MixedInstancesPolicy.InstancesDistribution.IsSetSpotMaxPrice())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "InstancesDistribution" + "." + "SpotMaxPrice", StringUtils.FromString(publicRequest.MixedInstancesPolicy.InstancesDistribution.SpotMaxPrice));
}
}
if(publicRequest.MixedInstancesPolicy.IsSetLaunchTemplate())
{
if(publicRequest.MixedInstancesPolicy.LaunchTemplate.IsSetLaunchTemplateSpecification())
{
if(publicRequest.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.IsSetLaunchTemplateId())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "LaunchTemplateSpecification" + "." + "LaunchTemplateId", StringUtils.FromString(publicRequest.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.LaunchTemplateId));
}
if(publicRequest.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.IsSetLaunchTemplateName())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "LaunchTemplateSpecification" + "." + "LaunchTemplateName", StringUtils.FromString(publicRequest.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.LaunchTemplateName));
}
if(publicRequest.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.IsSetVersion())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "LaunchTemplateSpecification" + "." + "Version", StringUtils.FromString(publicRequest.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.Version));
}
}
if(publicRequest.MixedInstancesPolicy.LaunchTemplate.IsSetOverrides())
{
int publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex = 1;
foreach(var publicRequestMixedInstancesPolicyLaunchTemplatelistValue in publicRequest.MixedInstancesPolicy.LaunchTemplate.Overrides)
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.IsSetInstanceRequirements())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAcceleratorCount())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorCount.IsSetMax())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorCount" + "." + "Max", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorCount.Max));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorCount.IsSetMin())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorCount" + "." + "Min", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorCount.Min));
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAcceleratorManufacturers())
{
int publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorManufacturers)
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorManufacturers" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAcceleratorNames())
{
int publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorNames)
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorNames" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAcceleratorTotalMemoryMiB())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorTotalMemoryMiB.IsSetMax())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorTotalMemoryMiB" + "." + "Max", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorTotalMemoryMiB.Max));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorTotalMemoryMiB.IsSetMin())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorTotalMemoryMiB" + "." + "Min", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorTotalMemoryMiB.Min));
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAcceleratorTypes())
{
int publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AcceleratorTypes)
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AcceleratorTypes" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetAllowedInstanceTypes())
{
int publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.AllowedInstanceTypes)
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "AllowedInstanceTypes" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetBareMetal())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "BareMetal", StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BareMetal));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetBaselineEbsBandwidthMbps())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BaselineEbsBandwidthMbps.IsSetMax())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "BaselineEbsBandwidthMbps" + "." + "Max", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BaselineEbsBandwidthMbps.Max));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BaselineEbsBandwidthMbps.IsSetMin())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "BaselineEbsBandwidthMbps" + "." + "Min", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BaselineEbsBandwidthMbps.Min));
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetBurstablePerformance())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "BurstablePerformance", StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.BurstablePerformance));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetCpuManufacturers())
{
int publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.CpuManufacturers)
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "CpuManufacturers" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetExcludedInstanceTypes())
{
int publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.ExcludedInstanceTypes)
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "ExcludedInstanceTypes" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetInstanceGenerations())
{
int publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.InstanceGenerations)
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "InstanceGenerations" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetLocalStorage())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "LocalStorage", StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.LocalStorage));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetLocalStorageTypes())
{
int publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex = 1;
foreach(var publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue in publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.LocalStorageTypes)
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "LocalStorageTypes" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex, StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValue));
publicRequestMixedInstancesPolicyLaunchTemplatelistValueInstanceRequirementslistValueIndex++;
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetMemoryGiBPerVCpu())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryGiBPerVCpu.IsSetMax())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "MemoryGiBPerVCpu" + "." + "Max", StringUtils.FromDouble(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryGiBPerVCpu.Max));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryGiBPerVCpu.IsSetMin())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "MemoryGiBPerVCpu" + "." + "Min", StringUtils.FromDouble(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryGiBPerVCpu.Min));
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetMemoryMiB())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryMiB.IsSetMax())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "MemoryMiB" + "." + "Max", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryMiB.Max));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryMiB.IsSetMin())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "MemoryMiB" + "." + "Min", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.MemoryMiB.Min));
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetNetworkBandwidthGbps())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkBandwidthGbps.IsSetMax())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "NetworkBandwidthGbps" + "." + "Max", StringUtils.FromDouble(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkBandwidthGbps.Max));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkBandwidthGbps.IsSetMin())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "NetworkBandwidthGbps" + "." + "Min", StringUtils.FromDouble(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkBandwidthGbps.Min));
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetNetworkInterfaceCount())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkInterfaceCount.IsSetMax())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "NetworkInterfaceCount" + "." + "Max", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkInterfaceCount.Max));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkInterfaceCount.IsSetMin())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "NetworkInterfaceCount" + "." + "Min", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.NetworkInterfaceCount.Min));
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetOnDemandMaxPricePercentageOverLowestPrice())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "OnDemandMaxPricePercentageOverLowestPrice", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.OnDemandMaxPricePercentageOverLowestPrice));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetRequireHibernateSupport())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "RequireHibernateSupport", StringUtils.FromBool(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.RequireHibernateSupport));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetSpotMaxPricePercentageOverLowestPrice())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "SpotMaxPricePercentageOverLowestPrice", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.SpotMaxPricePercentageOverLowestPrice));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetTotalLocalStorageGB())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.TotalLocalStorageGB.IsSetMax())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "TotalLocalStorageGB" + "." + "Max", StringUtils.FromDouble(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.TotalLocalStorageGB.Max));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.TotalLocalStorageGB.IsSetMin())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "TotalLocalStorageGB" + "." + "Min", StringUtils.FromDouble(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.TotalLocalStorageGB.Min));
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.IsSetVCpuCount())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.VCpuCount.IsSetMax())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "VCpuCount" + "." + "Max", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.VCpuCount.Max));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.VCpuCount.IsSetMin())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceRequirements" + "." + "VCpuCount" + "." + "Min", StringUtils.FromInt(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceRequirements.VCpuCount.Min));
}
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.IsSetInstanceType())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "InstanceType", StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.InstanceType));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.IsSetLaunchTemplateSpecification())
{
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.IsSetLaunchTemplateId())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "LaunchTemplateSpecification" + "." + "LaunchTemplateId", StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.LaunchTemplateId));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.IsSetLaunchTemplateName())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "LaunchTemplateSpecification" + "." + "LaunchTemplateName", StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.LaunchTemplateName));
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.IsSetVersion())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "LaunchTemplateSpecification" + "." + "Version", StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.LaunchTemplateSpecification.Version));
}
}
if(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.IsSetWeightedCapacity())
{
request.Parameters.Add("MixedInstancesPolicy" + "." + "LaunchTemplate" + "." + "Overrides" + "." + "member" + "." + publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex + "." + "WeightedCapacity", StringUtils.FromString(publicRequestMixedInstancesPolicyLaunchTemplatelistValue.WeightedCapacity));
}
publicRequestMixedInstancesPolicyLaunchTemplatelistValueIndex++;
}
}
}
}
if(publicRequest.IsSetNewInstancesProtectedFromScaleIn())
{
request.Parameters.Add("NewInstancesProtectedFromScaleIn", StringUtils.FromBool(publicRequest.NewInstancesProtectedFromScaleIn));
}
if(publicRequest.IsSetPlacementGroup())
{
request.Parameters.Add("PlacementGroup", StringUtils.FromString(publicRequest.PlacementGroup));
}
if(publicRequest.IsSetServiceLinkedRoleARN())
{
request.Parameters.Add("ServiceLinkedRoleARN", StringUtils.FromString(publicRequest.ServiceLinkedRoleARN));
}
if(publicRequest.IsSetTerminationPolicies())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.TerminationPolicies)
{
request.Parameters.Add("TerminationPolicies" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
if(publicRequest.IsSetVPCZoneIdentifier())
{
request.Parameters.Add("VPCZoneIdentifier", StringUtils.FromString(publicRequest.VPCZoneIdentifier));
}
}
return request;
}
private static UpdateAutoScalingGroupRequestMarshaller _instance = new UpdateAutoScalingGroupRequestMarshaller();
internal static UpdateAutoScalingGroupRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateAutoScalingGroupRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 461 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateAutoScalingGroup operation
/// </summary>
public class UpdateAutoScalingGroupResponseUnmarshaller : 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)
{
UpdateAutoScalingGroupResponse response = new UpdateAutoScalingGroupResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("UpdateAutoScalingGroupResult", 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, UpdateAutoScalingGroupResponse 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("ResourceContention"))
{
return ResourceContentionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ScalingActivityInProgress"))
{
return ScalingActivityInProgressExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceLinkedRoleFailure"))
{
return ServiceLinkedRoleFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateAutoScalingGroupResponseUnmarshaller _instance = new UpdateAutoScalingGroupResponseUnmarshaller();
internal static UpdateAutoScalingGroupResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateAutoScalingGroupResponseUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for VCpuCountRequest Object
/// </summary>
public class VCpuCountRequestUnmarshaller : IUnmarshaller<VCpuCountRequest, XmlUnmarshallerContext>, IUnmarshaller<VCpuCountRequest, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public VCpuCountRequest Unmarshall(XmlUnmarshallerContext context)
{
VCpuCountRequest unmarshalledObject = new VCpuCountRequest();
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("Max", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Max = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Min", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Min = 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 VCpuCountRequest Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static VCpuCountRequestUnmarshaller _instance = new VCpuCountRequestUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static VCpuCountRequestUnmarshaller 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 autoscaling-2011-01-01.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.AutoScaling.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.AutoScaling.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for WarmPoolConfiguration Object
/// </summary>
public class WarmPoolConfigurationUnmarshaller : IUnmarshaller<WarmPoolConfiguration, XmlUnmarshallerContext>, IUnmarshaller<WarmPoolConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public WarmPoolConfiguration Unmarshall(XmlUnmarshallerContext context)
{
WarmPoolConfiguration unmarshalledObject = new WarmPoolConfiguration();
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("InstanceReusePolicy", targetDepth))
{
var unmarshaller = InstanceReusePolicyUnmarshaller.Instance;
unmarshalledObject.InstanceReusePolicy = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MaxGroupPreparedCapacity", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MaxGroupPreparedCapacity = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MinSize", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MinSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PoolState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PoolState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Status = 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 WarmPoolConfiguration Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static WarmPoolConfigurationUnmarshaller _instance = new WarmPoolConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static WarmPoolConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 121 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Paginators for the AutoScaling service
///</summary>
public class AutoScalingPaginatorFactory : IAutoScalingPaginatorFactory
{
private readonly IAmazonAutoScaling client;
internal AutoScalingPaginatorFactory(IAmazonAutoScaling client)
{
this.client = client;
}
/// <summary>
/// Paginator for DescribeAutoScalingGroups operation
///</summary>
public IDescribeAutoScalingGroupsPaginator DescribeAutoScalingGroups(DescribeAutoScalingGroupsRequest request)
{
return new DescribeAutoScalingGroupsPaginator(this.client, request);
}
/// <summary>
/// Paginator for DescribeAutoScalingInstances operation
///</summary>
public IDescribeAutoScalingInstancesPaginator DescribeAutoScalingInstances(DescribeAutoScalingInstancesRequest request)
{
return new DescribeAutoScalingInstancesPaginator(this.client, request);
}
/// <summary>
/// Paginator for DescribeLaunchConfigurations operation
///</summary>
public IDescribeLaunchConfigurationsPaginator DescribeLaunchConfigurations(DescribeLaunchConfigurationsRequest request)
{
return new DescribeLaunchConfigurationsPaginator(this.client, request);
}
/// <summary>
/// Paginator for DescribeNotificationConfigurations operation
///</summary>
public IDescribeNotificationConfigurationsPaginator DescribeNotificationConfigurations(DescribeNotificationConfigurationsRequest request)
{
return new DescribeNotificationConfigurationsPaginator(this.client, request);
}
/// <summary>
/// Paginator for DescribePolicies operation
///</summary>
public IDescribePoliciesPaginator DescribePolicies(DescribePoliciesRequest request)
{
return new DescribePoliciesPaginator(this.client, request);
}
/// <summary>
/// Paginator for DescribeScalingActivities operation
///</summary>
public IDescribeScalingActivitiesPaginator DescribeScalingActivities(DescribeScalingActivitiesRequest request)
{
return new DescribeScalingActivitiesPaginator(this.client, request);
}
/// <summary>
/// Paginator for DescribeScheduledActions operation
///</summary>
public IDescribeScheduledActionsPaginator DescribeScheduledActions(DescribeScheduledActionsRequest request)
{
return new DescribeScheduledActionsPaginator(this.client, request);
}
/// <summary>
/// Paginator for DescribeTags operation
///</summary>
public IDescribeTagsPaginator DescribeTags(DescribeTagsRequest request)
{
return new DescribeTagsPaginator(this.client, request);
}
/// <summary>
/// Paginator for DescribeTrafficSources operation
///</summary>
public IDescribeTrafficSourcesPaginator DescribeTrafficSources(DescribeTrafficSourcesRequest request)
{
return new DescribeTrafficSourcesPaginator(this.client, request);
}
}
}
| 110 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Base class for DescribeAutoScalingGroups paginators.
/// </summary>
internal sealed partial class DescribeAutoScalingGroupsPaginator : IPaginator<DescribeAutoScalingGroupsResponse>, IDescribeAutoScalingGroupsPaginator
{
private readonly IAmazonAutoScaling _client;
private readonly DescribeAutoScalingGroupsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<DescribeAutoScalingGroupsResponse> Responses => new PaginatedResponse<DescribeAutoScalingGroupsResponse>(this);
/// <summary>
/// Enumerable containing all of the AutoScalingGroups
/// </summary>
public IPaginatedEnumerable<AutoScalingGroup> AutoScalingGroups =>
new PaginatedResultKeyResponse<DescribeAutoScalingGroupsResponse, AutoScalingGroup>(this, (i) => i.AutoScalingGroups);
internal DescribeAutoScalingGroupsPaginator(IAmazonAutoScaling client, DescribeAutoScalingGroupsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<DescribeAutoScalingGroupsResponse> IPaginator<DescribeAutoScalingGroupsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeAutoScalingGroupsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.DescribeAutoScalingGroups(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<DescribeAutoScalingGroupsResponse> IPaginator<DescribeAutoScalingGroupsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeAutoScalingGroupsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.DescribeAutoScalingGroupsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Base class for DescribeAutoScalingInstances paginators.
/// </summary>
internal sealed partial class DescribeAutoScalingInstancesPaginator : IPaginator<DescribeAutoScalingInstancesResponse>, IDescribeAutoScalingInstancesPaginator
{
private readonly IAmazonAutoScaling _client;
private readonly DescribeAutoScalingInstancesRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<DescribeAutoScalingInstancesResponse> Responses => new PaginatedResponse<DescribeAutoScalingInstancesResponse>(this);
/// <summary>
/// Enumerable containing all of the AutoScalingInstances
/// </summary>
public IPaginatedEnumerable<AutoScalingInstanceDetails> AutoScalingInstances =>
new PaginatedResultKeyResponse<DescribeAutoScalingInstancesResponse, AutoScalingInstanceDetails>(this, (i) => i.AutoScalingInstances);
internal DescribeAutoScalingInstancesPaginator(IAmazonAutoScaling client, DescribeAutoScalingInstancesRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<DescribeAutoScalingInstancesResponse> IPaginator<DescribeAutoScalingInstancesResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeAutoScalingInstancesResponse response;
do
{
_request.NextToken = nextToken;
response = _client.DescribeAutoScalingInstances(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<DescribeAutoScalingInstancesResponse> IPaginator<DescribeAutoScalingInstancesResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeAutoScalingInstancesResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.DescribeAutoScalingInstancesAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Base class for DescribeLaunchConfigurations paginators.
/// </summary>
internal sealed partial class DescribeLaunchConfigurationsPaginator : IPaginator<DescribeLaunchConfigurationsResponse>, IDescribeLaunchConfigurationsPaginator
{
private readonly IAmazonAutoScaling _client;
private readonly DescribeLaunchConfigurationsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<DescribeLaunchConfigurationsResponse> Responses => new PaginatedResponse<DescribeLaunchConfigurationsResponse>(this);
/// <summary>
/// Enumerable containing all of the LaunchConfigurations
/// </summary>
public IPaginatedEnumerable<LaunchConfiguration> LaunchConfigurations =>
new PaginatedResultKeyResponse<DescribeLaunchConfigurationsResponse, LaunchConfiguration>(this, (i) => i.LaunchConfigurations);
internal DescribeLaunchConfigurationsPaginator(IAmazonAutoScaling client, DescribeLaunchConfigurationsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<DescribeLaunchConfigurationsResponse> IPaginator<DescribeLaunchConfigurationsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeLaunchConfigurationsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.DescribeLaunchConfigurations(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<DescribeLaunchConfigurationsResponse> IPaginator<DescribeLaunchConfigurationsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeLaunchConfigurationsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.DescribeLaunchConfigurationsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Base class for DescribeNotificationConfigurations paginators.
/// </summary>
internal sealed partial class DescribeNotificationConfigurationsPaginator : IPaginator<DescribeNotificationConfigurationsResponse>, IDescribeNotificationConfigurationsPaginator
{
private readonly IAmazonAutoScaling _client;
private readonly DescribeNotificationConfigurationsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<DescribeNotificationConfigurationsResponse> Responses => new PaginatedResponse<DescribeNotificationConfigurationsResponse>(this);
/// <summary>
/// Enumerable containing all of the NotificationConfigurations
/// </summary>
public IPaginatedEnumerable<NotificationConfiguration> NotificationConfigurations =>
new PaginatedResultKeyResponse<DescribeNotificationConfigurationsResponse, NotificationConfiguration>(this, (i) => i.NotificationConfigurations);
internal DescribeNotificationConfigurationsPaginator(IAmazonAutoScaling client, DescribeNotificationConfigurationsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<DescribeNotificationConfigurationsResponse> IPaginator<DescribeNotificationConfigurationsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeNotificationConfigurationsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.DescribeNotificationConfigurations(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<DescribeNotificationConfigurationsResponse> IPaginator<DescribeNotificationConfigurationsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeNotificationConfigurationsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.DescribeNotificationConfigurationsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Base class for DescribePolicies paginators.
/// </summary>
internal sealed partial class DescribePoliciesPaginator : IPaginator<DescribePoliciesResponse>, IDescribePoliciesPaginator
{
private readonly IAmazonAutoScaling _client;
private readonly DescribePoliciesRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<DescribePoliciesResponse> Responses => new PaginatedResponse<DescribePoliciesResponse>(this);
/// <summary>
/// Enumerable containing all of the ScalingPolicies
/// </summary>
public IPaginatedEnumerable<ScalingPolicy> ScalingPolicies =>
new PaginatedResultKeyResponse<DescribePoliciesResponse, ScalingPolicy>(this, (i) => i.ScalingPolicies);
internal DescribePoliciesPaginator(IAmazonAutoScaling client, DescribePoliciesRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<DescribePoliciesResponse> IPaginator<DescribePoliciesResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribePoliciesResponse response;
do
{
_request.NextToken = nextToken;
response = _client.DescribePolicies(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<DescribePoliciesResponse> IPaginator<DescribePoliciesResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribePoliciesResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.DescribePoliciesAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Base class for DescribeScalingActivities paginators.
/// </summary>
internal sealed partial class DescribeScalingActivitiesPaginator : IPaginator<DescribeScalingActivitiesResponse>, IDescribeScalingActivitiesPaginator
{
private readonly IAmazonAutoScaling _client;
private readonly DescribeScalingActivitiesRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<DescribeScalingActivitiesResponse> Responses => new PaginatedResponse<DescribeScalingActivitiesResponse>(this);
/// <summary>
/// Enumerable containing all of the Activities
/// </summary>
public IPaginatedEnumerable<Activity> Activities =>
new PaginatedResultKeyResponse<DescribeScalingActivitiesResponse, Activity>(this, (i) => i.Activities);
internal DescribeScalingActivitiesPaginator(IAmazonAutoScaling client, DescribeScalingActivitiesRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<DescribeScalingActivitiesResponse> IPaginator<DescribeScalingActivitiesResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeScalingActivitiesResponse response;
do
{
_request.NextToken = nextToken;
response = _client.DescribeScalingActivities(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<DescribeScalingActivitiesResponse> IPaginator<DescribeScalingActivitiesResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeScalingActivitiesResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.DescribeScalingActivitiesAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Base class for DescribeScheduledActions paginators.
/// </summary>
internal sealed partial class DescribeScheduledActionsPaginator : IPaginator<DescribeScheduledActionsResponse>, IDescribeScheduledActionsPaginator
{
private readonly IAmazonAutoScaling _client;
private readonly DescribeScheduledActionsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<DescribeScheduledActionsResponse> Responses => new PaginatedResponse<DescribeScheduledActionsResponse>(this);
/// <summary>
/// Enumerable containing all of the ScheduledUpdateGroupActions
/// </summary>
public IPaginatedEnumerable<ScheduledUpdateGroupAction> ScheduledUpdateGroupActions =>
new PaginatedResultKeyResponse<DescribeScheduledActionsResponse, ScheduledUpdateGroupAction>(this, (i) => i.ScheduledUpdateGroupActions);
internal DescribeScheduledActionsPaginator(IAmazonAutoScaling client, DescribeScheduledActionsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<DescribeScheduledActionsResponse> IPaginator<DescribeScheduledActionsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeScheduledActionsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.DescribeScheduledActions(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<DescribeScheduledActionsResponse> IPaginator<DescribeScheduledActionsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeScheduledActionsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.DescribeScheduledActionsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Base class for DescribeTags paginators.
/// </summary>
internal sealed partial class DescribeTagsPaginator : IPaginator<DescribeTagsResponse>, IDescribeTagsPaginator
{
private readonly IAmazonAutoScaling _client;
private readonly DescribeTagsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<DescribeTagsResponse> Responses => new PaginatedResponse<DescribeTagsResponse>(this);
/// <summary>
/// Enumerable containing all of the Tags
/// </summary>
public IPaginatedEnumerable<TagDescription> Tags =>
new PaginatedResultKeyResponse<DescribeTagsResponse, TagDescription>(this, (i) => i.Tags);
internal DescribeTagsPaginator(IAmazonAutoScaling client, DescribeTagsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<DescribeTagsResponse> IPaginator<DescribeTagsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeTagsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.DescribeTags(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<DescribeTagsResponse> IPaginator<DescribeTagsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeTagsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.DescribeTagsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Base class for DescribeTrafficSources paginators.
/// </summary>
internal sealed partial class DescribeTrafficSourcesPaginator : IPaginator<DescribeTrafficSourcesResponse>, IDescribeTrafficSourcesPaginator
{
private readonly IAmazonAutoScaling _client;
private readonly DescribeTrafficSourcesRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<DescribeTrafficSourcesResponse> Responses => new PaginatedResponse<DescribeTrafficSourcesResponse>(this);
internal DescribeTrafficSourcesPaginator(IAmazonAutoScaling client, DescribeTrafficSourcesRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<DescribeTrafficSourcesResponse> IPaginator<DescribeTrafficSourcesResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeTrafficSourcesResponse response;
do
{
_request.NextToken = nextToken;
response = _client.DescribeTrafficSources(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<DescribeTrafficSourcesResponse> IPaginator<DescribeTrafficSourcesResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
DescribeTrafficSourcesResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.DescribeTrafficSourcesAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 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 autoscaling-2011-01-01.normal.json service model.
*/
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Paginators for the AutoScaling service
///</summary>
public interface IAutoScalingPaginatorFactory
{
/// <summary>
/// Paginator for DescribeAutoScalingGroups operation
///</summary>
IDescribeAutoScalingGroupsPaginator DescribeAutoScalingGroups(DescribeAutoScalingGroupsRequest request);
/// <summary>
/// Paginator for DescribeAutoScalingInstances operation
///</summary>
IDescribeAutoScalingInstancesPaginator DescribeAutoScalingInstances(DescribeAutoScalingInstancesRequest request);
/// <summary>
/// Paginator for DescribeLaunchConfigurations operation
///</summary>
IDescribeLaunchConfigurationsPaginator DescribeLaunchConfigurations(DescribeLaunchConfigurationsRequest request);
/// <summary>
/// Paginator for DescribeNotificationConfigurations operation
///</summary>
IDescribeNotificationConfigurationsPaginator DescribeNotificationConfigurations(DescribeNotificationConfigurationsRequest request);
/// <summary>
/// Paginator for DescribePolicies operation
///</summary>
IDescribePoliciesPaginator DescribePolicies(DescribePoliciesRequest request);
/// <summary>
/// Paginator for DescribeScalingActivities operation
///</summary>
IDescribeScalingActivitiesPaginator DescribeScalingActivities(DescribeScalingActivitiesRequest request);
/// <summary>
/// Paginator for DescribeScheduledActions operation
///</summary>
IDescribeScheduledActionsPaginator DescribeScheduledActions(DescribeScheduledActionsRequest request);
/// <summary>
/// Paginator for DescribeTags operation
///</summary>
IDescribeTagsPaginator DescribeTags(DescribeTagsRequest request);
/// <summary>
/// Paginator for DescribeTrafficSources operation
///</summary>
IDescribeTrafficSourcesPaginator DescribeTrafficSources(DescribeTrafficSourcesRequest request);
}
}
| 73 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Paginator for the DescribeAutoScalingGroups operation
///</summary>
public interface IDescribeAutoScalingGroupsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<DescribeAutoScalingGroupsResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the AutoScalingGroups
/// </summary>
IPaginatedEnumerable<AutoScalingGroup> AutoScalingGroups { get; }
}
}
| 38 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Paginator for the DescribeAutoScalingInstances operation
///</summary>
public interface IDescribeAutoScalingInstancesPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<DescribeAutoScalingInstancesResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the AutoScalingInstances
/// </summary>
IPaginatedEnumerable<AutoScalingInstanceDetails> AutoScalingInstances { get; }
}
}
| 38 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Paginator for the DescribeLaunchConfigurations operation
///</summary>
public interface IDescribeLaunchConfigurationsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<DescribeLaunchConfigurationsResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the LaunchConfigurations
/// </summary>
IPaginatedEnumerable<LaunchConfiguration> LaunchConfigurations { get; }
}
}
| 38 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Paginator for the DescribeNotificationConfigurations operation
///</summary>
public interface IDescribeNotificationConfigurationsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<DescribeNotificationConfigurationsResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the NotificationConfigurations
/// </summary>
IPaginatedEnumerable<NotificationConfiguration> NotificationConfigurations { get; }
}
}
| 38 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Paginator for the DescribePolicies operation
///</summary>
public interface IDescribePoliciesPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<DescribePoliciesResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the ScalingPolicies
/// </summary>
IPaginatedEnumerable<ScalingPolicy> ScalingPolicies { get; }
}
}
| 38 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.AutoScaling.Model
{
/// <summary>
/// Paginator for the DescribeScalingActivities operation
///</summary>
public interface IDescribeScalingActivitiesPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<DescribeScalingActivitiesResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the Activities
/// </summary>
IPaginatedEnumerable<Activity> Activities { get; }
}
}
| 38 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.