CreateConfigurationTemplateRequestMarshaller

We found 10 examples in language CSharp for this search. You will see 16 fragments of code.

        internal static CreateConfigurationTemplateRequestMarshaller GetInstance()
        {
            return _instance;
        }


        internal static CreateConfigurationTemplateRequestMarshaller GetInstance()
        {
            return _instance;
        }


        internal static CreateConfigurationTemplateRequestMarshaller GetInstance()
        {
            return _instance;
        }


        internal static CreateConfigurationTemplateRequestMarshaller GetInstance()
        {
            return _instance;
        }


        internal static CreateConfigurationTemplateRequestMarshaller GetInstance()
        {
            return _instance;
        }


        internal static CreateConfigurationTemplateRequestMarshaller GetInstance()
        {
            return _instance;
        }


        public IRequest<CreateConfigurationTemplateRequest> Marshall(CreateConfigurationTemplateRequest createConfigurationTemplateRequest) 
        {
            IRequest<CreateConfigurationTemplateRequest> request = new DefaultRequest<CreateConfigurationTemplateRequest>(createConfigurationTemplateRequest, "AmazonElasticBeanstalk");
            request.Parameters.Add("Action", "CreateConfigurationTemplate");
            request.Parameters.Add("Version", "2010-12-01");
            if (createConfigurationTemplateRequest != null && createConfigurationTemplateRequest.IsSetApplicationName()) 
            {
                request.Parameters.Add("ApplicationName", StringUtils.FromString(createConfigurationTemplateRequest.ApplicationName));
            }
            if (createConfigurationTemplateRequest != null && createConfigurationTemplateRequest.IsSetTemplateName()) 
            {
                request.Parameters.Add("TemplateName", StringUtils.FromString(createConfigurationTemplateRequest.TemplateName));
            }
            if (createConfigurationTemplateRequest != null && createConfigurationTemplateRequest.IsSetSolutionStackName()) 
            {
                request.Parameters.Add("SolutionStackName", StringUtils.FromString(createConfigurationTemplateRequest.SolutionStackName));
            }
            if (createConfigurationTemplateRequest != null) 
            {
                SourceConfiguration sourceConfiguration = createConfigurationTemplateRequest.SourceConfiguration;
                if (sourceConfiguration != null && sourceConfiguration.IsSetApplicationName()) 
                {
                    request.Parameters.Add("SourceConfiguration.ApplicationName", StringUtils.FromString(sourceConfiguration.ApplicationName));
                }
                if (sourceConfiguration != null && sourceConfiguration.IsSetTemplateName()) 
                {
                    request.Parameters.Add("SourceConfiguration.TemplateName", StringUtils.FromString(sourceConfiguration.TemplateName));
                }
            }
            if (createConfigurationTemplateRequest != null && createConfigurationTemplateRequest.IsSetEnvironmentId()) 
            {
                request.Parameters.Add("EnvironmentId", StringUtils.FromString(createConfigurationTemplateRequest.EnvironmentId));
            }
            if (createConfigurationTemplateRequest != null && createConfigurationTemplateRequest.IsSetDescription()) 
            {
                request.Parameters.Add("Description", StringUtils.FromString(createConfigurationTemplateRequest.Description));
            }

            if (createConfigurationTemplateRequest != null) 
            {
                List<ConfigurationOptionSetting> optionSettingsList = createConfigurationTemplateRequest.OptionSettings;
                int optionSettingsListIndex = 1;
                foreach (ConfigurationOptionSetting optionSettingsListValue in optionSettingsList) 
                { 
                    if (optionSettingsListValue != null && optionSettingsListValue.IsSetNamespace()) 
                    {
                        request.Parameters.Add("OptionSettings.member." + optionSettingsListIndex + ".Namespace", StringUtils.FromString(optionSettingsListValue.Namespace));
                    }
                    if (optionSettingsListValue != null && optionSettingsListValue.IsSetOptionName()) 
                    {
                        request.Parameters.Add("OptionSettings.member." + optionSettingsListIndex + ".OptionName", StringUtils.FromString(optionSettingsListValue.OptionName));
                    }
                    if (optionSettingsListValue != null && optionSettingsListValue.IsSetValue()) 
                    {
                        request.Parameters.Add("OptionSettings.member." + optionSettingsListIndex + ".Value", StringUtils.FromString(optionSettingsListValue.Value));
                    }

                    optionSettingsListIndex++;
                }
            }


            return request;
        }

        public IRequest Marshall(CreateConfigurationTemplateRequest createConfigurationTemplateRequest)
        {
            IRequest request = new DefaultRequest(createConfigurationTemplateRequest, "AmazonElasticBeanstalk");
            request.Parameters.Add("Action", "CreateConfigurationTemplate");
            request.Parameters.Add("Version", "2010-12-01");
            if (createConfigurationTemplateRequest != null && createConfigurationTemplateRequest.IsSetApplicationName())
            {
                request.Parameters.Add("ApplicationName", StringUtils.FromString(createConfigurationTemplateRequest.ApplicationName));
            }
            if (createConfigurationTemplateRequest != null && createConfigurationTemplateRequest.IsSetTemplateName())
            {
                request.Parameters.Add("TemplateName", StringUtils.FromString(createConfigurationTemplateRequest.TemplateName));
            }
            if (createConfigurationTemplateRequest != null && createConfigurationTemplateRequest.IsSetSolutionStackName())
            {
                request.Parameters.Add("SolutionStackName", StringUtils.FromString(createConfigurationTemplateRequest.SolutionStackName));
            }
            if (createConfigurationTemplateRequest != null)
            {
                SourceConfiguration sourceConfiguration = createConfigurationTemplateRequest.SourceConfiguration;
                if (sourceConfiguration != null && sourceConfiguration.IsSetApplicationName())
                {
                    request.Parameters.Add("SourceConfiguration.ApplicationName", StringUtils.FromString(sourceConfiguration.ApplicationName));
                }
                if (sourceConfiguration != null && sourceConfiguration.IsSetTemplateName())
                {
                    request.Parameters.Add("SourceConfiguration.TemplateName", StringUtils.FromString(sourceConfiguration.TemplateName));
                }
            }
            if (createConfigurationTemplateRequest != null && createConfigurationTemplateRequest.IsSetEnvironmentId())
            {
                request.Parameters.Add("EnvironmentId", StringUtils.FromString(createConfigurationTemplateRequest.EnvironmentId));
            }
            if (createConfigurationTemplateRequest != null && createConfigurationTemplateRequest.IsSetDescription())
            {
                request.Parameters.Add("Description", StringUtils.FromString(createConfigurationTemplateRequest.Description));
            }

            if (createConfigurationTemplateRequest != null)
            {
                List<ConfigurationOptionSetting> optionSettingsList = createConfigurationTemplateRequest.OptionSettings;
                int optionSettingsListIndex = 1;
                foreach (ConfigurationOptionSetting optionSettingsListValue in optionSettingsList)
                {
                    if (optionSettingsListValue != null && optionSettingsListValue.IsSetNamespace())
                    {
                        request.Parameters.Add("OptionSettings.member." + optionSettingsListIndex + ".Namespace", StringUtils.FromString(optionSettingsListValue.Namespace));
                    }
                    if (optionSettingsListValue != null && optionSettingsListValue.IsSetOptionName())
                    {
                        request.Parameters.Add("OptionSettings.member." + optionSettingsListIndex + ".OptionName", StringUtils.FromString(optionSettingsListValue.OptionName));
                    }
                    if (optionSettingsListValue != null && optionSettingsListValue.IsSetValue())
                    {
                        request.Parameters.Add("OptionSettings.member." + optionSettingsListIndex + ".Value", StringUtils.FromString(optionSettingsListValue.Value));
                    }

                    optionSettingsListIndex++;
                }
            }

            return request;
        }

        /// <summary>
        /// Marshaller the request object to the HTTP request.
        /// </summary>  
        /// <param name="input"></param>
        /// <returns></returns>
        public IRequest Marshall(AmazonWebServiceRequest input)
        {
            return this.Marshall((CreateConfigurationTemplateRequest)input);
        }
    
        /// <summary>
        /// Marshaller the request object to the HTTP request.
        /// </summary>  
        /// <param name="publicRequest"></param>
        /// <returns></returns>
        public IRequest Marshall(CreateConfigurationTemplateRequest publicRequest)
        {
            IRequest request = new DefaultRequest(publicRequest, "Amazon.ElasticBeanstalk");
            request.Parameters.Add("Action", "CreateConfigurationTemplate");
            request.Parameters.Add("Version", "2010-12-01");

            if(publicRequest != null)
            {
                if(publicRequest.IsSetApplicationName())
                {
                    request.Parameters.Add("ApplicationName", StringUtils.FromString(publicRequest.ApplicationName));
                }
                if(publicRequest.IsSetDescription())
                {
                    request.Parameters.Add("Description", StringUtils.FromString(publicRequest.Description));
                }
                if(publicRequest.IsSetEnvironmentId())
                {
                    request.Parameters.Add("EnvironmentId", StringUtils.FromString(publicRequest.EnvironmentId));
                }
                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.IsSetSolutionStackName())
                {
                    request.Parameters.Add("SolutionStackName", StringUtils.FromString(publicRequest.SolutionStackName));
                }
                if(publicRequest.IsSetSourceConfiguration())
                {
                    if(publicRequest.SourceConfiguration.IsSetApplicationName())
                    {
                        request.Parameters.Add("SourceConfiguration" + "." + "ApplicationName", StringUtils.FromString(publicRequest.SourceConfiguration.ApplicationName));
                    }
                    if(publicRequest.SourceConfiguration.IsSetTemplateName())
                    {
                        request.Parameters.Add("SourceConfiguration" + "." + "TemplateName", StringUtils.FromString(publicRequest.SourceConfiguration.TemplateName));
                    }
                }
                if(publicRequest.IsSetTemplateName())
                {
                    request.Parameters.Add("TemplateName", StringUtils.FromString(publicRequest.TemplateName));
                }
            }
            return request;
        }

        
        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Query")]
        [TestCategory("ElasticBeanstalk")]
        public void AbortEnvironmentUpdateMarshallTest()
        {
            var operation = service_model.FindOperation("AbortEnvironmentUpdate");

            var request = InstantiateClassGenerator.Execute<AbortEnvironmentUpdateRequest>();
            var marshaller = new AbortEnvironmentUpdateRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();


        }

        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Query")]
        [TestCategory("ElasticBeanstalk")]
        public void AbortEnvironmentUpdate_InsufficientPrivilegesExceptionMarshallTest()
        {
            var operation = service_model.FindOperation("AbortEnvironmentUpdate");

            var request = InstantiateClassGenerator.Execute<AbortEnvironmentUpdateRequest>();
            var marshaller = new AbortEnvironmentUpdateRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);

            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();

            var exception = operation.Exceptions.First(e => e.Name.Equals("InsufficientPrivilegesException"));
            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception);
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true);
            var response = AbortEnvironmentUpdateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK);

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }

        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Query")]
        [TestCategory("ElasticBeanstalk")]
        public void ApplyEnvironmentManagedActionMarshallTest()
        {
            var operation = service_model.FindOperation("ApplyEnvironmentManagedAction");

            var request = InstantiateClassGenerator.Execute<ApplyEnvironmentManagedActionRequest>();
            var marshaller = new ApplyEnvironmentManagedActionRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();


            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null);
            var response = ApplyEnvironmentManagedActionResponseUnmarshaller.Instance.Unmarshall(context)
                as ApplyEnvironmentManagedActionResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }

        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Query")]
        [TestCategory("ElasticBeanstalk")]
        public void ApplyEnvironmentManagedAction_ElasticBeanstalkServiceExceptionMarshallTest()
        {
            var operation = service_model.FindOperation("ApplyEnvironmentManagedAction");

            var request = InstantiateClassGenerator.Execute<ApplyEnvironmentManagedActionRequest>();
            var marshaller = new ApplyEnvironmentManagedActionRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);

            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();

            var exception = operation.Exceptions.First(e => e.Name.Equals("ElasticBeanstalkServiceException"));
            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception);
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true);
            var response = ApplyEnvironmentManagedActionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK);

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }

        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Query")]
        [TestCategory("ElasticBeanstalk")]
        public void ApplyEnvironmentManagedAction_ManagedActionInvalidStateExceptionMarshallTest()
        {
            var operation = service_model.FindOperation("ApplyEnvironmentManagedAction");

            var request = InstantiateClassGenerator.Execute<ApplyEnvironmentManagedActionRequest>();
            var marshaller = new ApplyEnvironmentManagedActionRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);

            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();

            var exception = operation.Exceptions.First(e => e.Name.Equals("ManagedActionInvalidStateException"));
            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception);
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true);
            var response = ApplyEnvironmentManagedActionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK);

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }

        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Query")]
        [TestCategory("ElasticBeanstalk")]
        public void AssociateEnvironmentOperationsRoleMarshallTest()
        {
            var operation = service_model.FindOperation("AssociateEnvironmentOperationsRole");

            var request = InstantiateClassGenerator.Execute<AssociateEnvironmentOperationsRoleRequest>();
            var marshaller = new AssociateEnvironmentOperationsRoleRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();


        }

Amazon.ElasticBeanstalk.Model.Internal.MarshallTransformations.CreateConfigurationTemplateRequestMarshaller : IMarshaller

Constructors :

public CreateConfigurationTemplateRequestMarshaller()

Methods :

public IRequest Marshall(AmazonWebServiceRequest input = )
public IRequest Marshall(CreateConfigurationTemplateRequest publicRequest = )
public static CreateConfigurationTemplateRequestMarshaller get_Instance()
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()