/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the elasticbeanstalk-2010-12-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.ElasticBeanstalk.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.ElasticBeanstalk.Model.Internal.MarshallTransformations { /// /// CreateEnvironment Request Marshaller /// public class CreateEnvironmentRequestMarshaller : IMarshaller , IMarshaller { /// /// Marshaller the request object to the HTTP request. /// /// /// public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateEnvironmentRequest)input); } /// /// Marshaller the request object to the HTTP request. /// /// /// public IRequest Marshall(CreateEnvironmentRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ElasticBeanstalk"); request.Parameters.Add("Action", "CreateEnvironment"); request.Parameters.Add("Version", "2010-12-01"); if(publicRequest != null) { if(publicRequest.IsSetApplicationName()) { request.Parameters.Add("ApplicationName", StringUtils.FromString(publicRequest.ApplicationName)); } if(publicRequest.IsSetCNAMEPrefix()) { request.Parameters.Add("CNAMEPrefix", StringUtils.FromString(publicRequest.CNAMEPrefix)); } if(publicRequest.IsSetDescription()) { request.Parameters.Add("Description", StringUtils.FromString(publicRequest.Description)); } if(publicRequest.IsSetEnvironmentName()) { request.Parameters.Add("EnvironmentName", StringUtils.FromString(publicRequest.EnvironmentName)); } if(publicRequest.IsSetGroupName()) { request.Parameters.Add("GroupName", StringUtils.FromString(publicRequest.GroupName)); } if(publicRequest.IsSetOperationsRole()) { request.Parameters.Add("OperationsRole", StringUtils.FromString(publicRequest.OperationsRole)); } if(publicRequest.IsSetOptionSettings()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.OptionSettings) { if(publicRequestlistValue.IsSetNamespace()) { request.Parameters.Add("OptionSettings" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Namespace", StringUtils.FromString(publicRequestlistValue.Namespace)); } if(publicRequestlistValue.IsSetOptionName()) { request.Parameters.Add("OptionSettings" + "." + "member" + "." + publicRequestlistValueIndex + "." + "OptionName", StringUtils.FromString(publicRequestlistValue.OptionName)); } if(publicRequestlistValue.IsSetResourceName()) { request.Parameters.Add("OptionSettings" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResourceName", StringUtils.FromString(publicRequestlistValue.ResourceName)); } if(publicRequestlistValue.IsSetValue()) { request.Parameters.Add("OptionSettings" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Value", StringUtils.FromString(publicRequestlistValue.Value)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetOptionsToRemove()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.OptionsToRemove) { if(publicRequestlistValue.IsSetNamespace()) { request.Parameters.Add("OptionsToRemove" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Namespace", StringUtils.FromString(publicRequestlistValue.Namespace)); } if(publicRequestlistValue.IsSetOptionName()) { request.Parameters.Add("OptionsToRemove" + "." + "member" + "." + publicRequestlistValueIndex + "." + "OptionName", StringUtils.FromString(publicRequestlistValue.OptionName)); } if(publicRequestlistValue.IsSetResourceName()) { request.Parameters.Add("OptionsToRemove" + "." + "member" + "." + publicRequestlistValueIndex + "." + "ResourceName", StringUtils.FromString(publicRequestlistValue.ResourceName)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetPlatformArn()) { request.Parameters.Add("PlatformArn", StringUtils.FromString(publicRequest.PlatformArn)); } if(publicRequest.IsSetSolutionStackName()) { request.Parameters.Add("SolutionStackName", StringUtils.FromString(publicRequest.SolutionStackName)); } if(publicRequest.IsSetTags()) { int publicRequestlistValueIndex = 1; foreach(var publicRequestlistValue in publicRequest.Tags) { if(publicRequestlistValue.IsSetKey()) { request.Parameters.Add("Tags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Key", StringUtils.FromString(publicRequestlistValue.Key)); } if(publicRequestlistValue.IsSetValue()) { request.Parameters.Add("Tags" + "." + "member" + "." + publicRequestlistValueIndex + "." + "Value", StringUtils.FromString(publicRequestlistValue.Value)); } publicRequestlistValueIndex++; } } if(publicRequest.IsSetTemplateName()) { request.Parameters.Add("TemplateName", StringUtils.FromString(publicRequest.TemplateName)); } if(publicRequest.IsSetTier()) { if(publicRequest.Tier.IsSetName()) { request.Parameters.Add("Tier" + "." + "Name", StringUtils.FromString(publicRequest.Tier.Name)); } if(publicRequest.Tier.IsSetType()) { request.Parameters.Add("Tier" + "." + "Type", StringUtils.FromString(publicRequest.Tier.Type)); } if(publicRequest.Tier.IsSetVersion()) { request.Parameters.Add("Tier" + "." + "Version", StringUtils.FromString(publicRequest.Tier.Version)); } } if(publicRequest.IsSetVersionLabel()) { request.Parameters.Add("VersionLabel", StringUtils.FromString(publicRequest.VersionLabel)); } } return request; } private static CreateEnvironmentRequestMarshaller _instance = new CreateEnvironmentRequestMarshaller(); internal static CreateEnvironmentRequestMarshaller GetInstance() { return _instance; } /// /// Gets the singleton. /// public static CreateEnvironmentRequestMarshaller Instance { get { return _instance; } } } }