/// <summary>
        /// <para> Creates the Amazon S3 storage location for the account. </para> <para> This location is used to store user log files. </para>
        /// </summary>
        ///
        /// <param name="createStorageLocationRequest">Container for the necessary parameters to execute the CreateStorageLocation service method on
        ///           AmazonElasticBeanstalk.</param>
        ///
        /// <returns>The response from the CreateStorageLocation service method, as returned by AmazonElasticBeanstalk.</returns>
        ///
        /// <exception cref="S3SubscriptionRequiredException"/>
        /// <exception cref="TooManyBucketsException"/>
        public CreateStorageLocationResponse CreateStorageLocation(CreateStorageLocationRequest createStorageLocationRequest)
        {
            IRequest <CreateStorageLocationRequest> request  = new CreateStorageLocationRequestMarshaller().Marshall(createStorageLocationRequest);
            CreateStorageLocationResponse           response = Invoke <CreateStorageLocationRequest, CreateStorageLocationResponse> (request, this.signer, CreateStorageLocationResponseUnmarshaller.GetInstance());

            return(response);
        }
Esempio n. 2
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            CreateStorageLocationResponse response = new CreateStorageLocationResponse();

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

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

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

            return(response);
        }
Esempio n. 3
0
        private static void UnmarshallResult(XmlUnmarshallerContext context, CreateStorageLocationResponse 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("S3Bucket", targetDepth))
                    {
                        var unmarshaller = StringUnmarshaller.Instance;
                        response.S3Bucket = unmarshaller.Unmarshall(context);
                        continue;
                    }
                }
            }

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

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


            return(response);
        }