コード例 #1
0
        public async Task <CreateConfigurationResponse> CreateConfiguration(CreateConfigurationRequest o)
        {
            var result = new CreateConfigurationResponse(o.RequestId);

            result.Created = await Server.CreateSettings(o.Application, o.Key, o.Value);

            return(result);
        }
        public static CreateConfigurationResponse Unmarshall(UnmarshallerContext context)
        {
            CreateConfigurationResponse createConfigurationResponse = new CreateConfigurationResponse();

            createConfigurationResponse.HttpResponse = context.HttpResponse;
            createConfigurationResponse.RequestId    = context.StringValue("CreateConfiguration.RequestId");
            createConfigurationResponse.BizCode      = context.StringValue("CreateConfiguration.BizCode");

            return(createConfigurationResponse);
        }
コード例 #3
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)
        {
            CreateConfigurationResponse response = new CreateConfigurationResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("arn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Arn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("authenticationStrategy", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.AuthenticationStrategy = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("created", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.Created = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("id", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Id = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("latestRevision", targetDepth))
                {
                    var unmarshaller = ConfigurationRevisionUnmarshaller.Instance;
                    response.LatestRevision = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("name", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Name = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }