/// <summary>
        /// <para>Updates the specified application to have the specified properties. </para> <para><b>NOTE:</b> If a property (for example,
        /// description) is not provided, the value remains unchanged. To clear these properties, specify an empty string. </para>
        /// </summary>
        ///
        /// <param name="updateApplicationRequest">Container for the necessary parameters to execute the UpdateApplication service method on
        ///           AmazonElasticBeanstalk.</param>
        ///
        /// <returns>The response from the UpdateApplication service method, as returned by AmazonElasticBeanstalk.</returns>
        ///
        public UpdateApplicationResponse UpdateApplication(UpdateApplicationRequest updateApplicationRequest)
        {
            IRequest <UpdateApplicationRequest> request  = new UpdateApplicationRequestMarshaller().Marshall(updateApplicationRequest);
            UpdateApplicationResponse           response = Invoke <UpdateApplicationRequest, UpdateApplicationResponse> (request, this.signer, UpdateApplicationResponseUnmarshaller.GetInstance());

            return(response);
        }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>  
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UpdateApplicationResponse response = new UpdateApplicationResponse();


            return response;
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateApplicationResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Application", targetDepth))
                    {
                        response.Application = ApplicationDescriptionUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }



            return;
        }
Exemple #4
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UpdateApplicationResponse response = new UpdateApplicationResponse();


            return(response);
        }
Exemple #5
0
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            UpdateApplicationResponse response = new UpdateApplicationResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.IsStartElement)
                {
                    if (context.TestExpression("UpdateApplicationResult", 2))
                    {
                        UnmarshallResult(context, response);
                        continue;
                    }

                    if (context.TestExpression("ResponseMetadata", 2))
                    {
                        response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
                    }
                }
            }

            return(response);
        }
Exemple #6
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UpdateApplicationResponse response = new UpdateApplicationResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Description", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Description = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Id", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Id = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Name", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Name = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
        public async Task <UpdateApplicationResponse> Update(UpdateApplicationRequest o)
        {
            var result = new UpdateApplicationResponse(o.RequestId);

            result.Updated = await Server.Update(o.Id, o.Name, o.Description);

            return(result);
        }
Exemple #8
0
        public void CRUDApplication()
        {
            string applicationName = "dotnet-integ-app" + DateTime.Now.Ticks;
            CreateApplicationRequest createRequest = new CreateApplicationRequest()
            {
                ApplicationName = applicationName,
                Description     = "Test Application"
            };

            CreateApplicationResponse createResponse = Client.CreateApplication(createRequest);

            Assert.IsNotNull(createResponse.ResponseMetadata.RequestId);

            try
            {
                DescribeApplicationsResponse describeResponse = Client.DescribeApplications(new DescribeApplicationsRequest()
                {
                    ApplicationNames = new List <string>()
                    {
                        applicationName
                    }
                });
                Assert.AreEqual(1, describeResponse.Applications.Count);
                ApplicationDescription app = describeResponse.Applications[0];
                Assert.AreEqual(applicationName, app.ApplicationName);
                Assert.AreEqual("Test Application", app.Description);
                Assert.AreNotEqual(DateTime.MinValue, app.DateCreated);
                Assert.AreNotEqual(DateTime.MinValue, app.DateUpdated);

                UpdateApplicationRequest updateRequest = new UpdateApplicationRequest()
                {
                    ApplicationName = applicationName,
                    Description     = "updated description"
                };
                UpdateApplicationResponse updateResponse = Client.UpdateApplication(updateRequest);
                Assert.AreEqual(applicationName, updateResponse.Application.ApplicationName);
                Assert.AreEqual("updated description", updateResponse.Application.Description);
            }
            finally
            {
                Client.DeleteApplication(new DeleteApplicationRequest()
                {
                    ApplicationName = applicationName
                });
            }
        }
Exemple #9
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UpdateApplicationResponse response = new UpdateApplicationResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("ApplicationDetail", targetDepth))
                {
                    var unmarshaller = ApplicationDetailUnmarshaller.Instance;
                    response.ApplicationDetail = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            UpdateApplicationResponse response = new UpdateApplicationResponse();

            while (context.Read())
            {
                if (context.IsStartElement)
                {
                    if (context.TestExpression("UpdateApplicationResult", 2))
                    {
                        response.UpdateApplicationResult = UpdateApplicationResultUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                    if (context.TestExpression("ResponseMetadata", 2))
                    {
                        response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context);
                    }
                }
            }


            return(response);
        }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UpdateApplicationResponse response = new UpdateApplicationResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("applicationId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ApplicationId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("author", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Author = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("creationTime", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.CreationTime = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("description", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Description = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("labels", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance);
                    response.Labels = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("licenseUrl", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.LicenseUrl = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("name", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Name = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("readmeUrl", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ReadmeUrl = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("spdxLicenseId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.SpdxLicenseId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("version", targetDepth))
                {
                    var unmarshaller = VersionUnmarshaller.Instance;
                    response.Version = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }