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

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Namespace", targetDepth))
                {
                    var unmarshaller = NamespaceInfoV2Unmarshaller.Instance;
                    response.Namespace = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("RequestId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.RequestId = unmarshaller.Unmarshall(context);
                    continue;
                }
            }
            response.Status = (int)context.ResponseData.StatusCode;

            return(response);
        }
Exemplo 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(JsonUnmarshallerContext context)
        {
            DescribeNamespaceResponse response = new DescribeNamespaceResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("namespaceArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.NamespaceArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("namespaceName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.NamespaceName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("namespaceVersion", targetDepth))
                {
                    var unmarshaller = LongUnmarshaller.Instance;
                    response.NamespaceVersion = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("trackingNamespaceName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.TrackingNamespaceName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("trackingNamespaceVersion", targetDepth))
                {
                    var unmarshaller = LongUnmarshaller.Instance;
                    response.TrackingNamespaceVersion = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Exemplo n.º 3
0
        public static DescribeNamespaceResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeNamespaceResponse describeNamespaceResponse = new DescribeNamespaceResponse();

            describeNamespaceResponse.HttpResponse = context.HttpResponse;
            describeNamespaceResponse.RequestId    = context.StringValue("DescribeNamespace.RequestId");
            describeNamespaceResponse.Code         = context.StringValue("DescribeNamespace.Code");
            describeNamespaceResponse.Message      = context.StringValue("DescribeNamespace.Message");

            DescribeNamespaceResponse.DescribeNamespace__Namespace _namespace = new DescribeNamespaceResponse.DescribeNamespace__Namespace();
            _namespace.RegionId  = context.StringValue("DescribeNamespace.Namespace.RegionId");
            _namespace.Endpoint  = context.StringValue("DescribeNamespace.Namespace.Endpoint");
            _namespace.AccessKey = context.StringValue("DescribeNamespace.Namespace.AccessKey");
            _namespace.SecretKey = context.StringValue("DescribeNamespace.Namespace.SecretKey");
            _namespace.Name      = context.StringValue("DescribeNamespace.Namespace.Name");
            describeNamespaceResponse._Namespace = _namespace;

            return(describeNamespaceResponse);
        }
Exemplo n.º 4
0
        public static DescribeNamespaceResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeNamespaceResponse describeNamespaceResponse = new DescribeNamespaceResponse();

            describeNamespaceResponse.HttpResponse = context.HttpResponse;
            describeNamespaceResponse.RequestId    = context.StringValue("DescribeNamespace.RequestId");
            describeNamespaceResponse.Code         = context.StringValue("DescribeNamespace.Code");
            describeNamespaceResponse.ErrorCode    = context.StringValue("DescribeNamespace.ErrorCode");
            describeNamespaceResponse.Message      = context.StringValue("DescribeNamespace.Message");
            describeNamespaceResponse.Success      = context.BooleanValue("DescribeNamespace.Success");
            describeNamespaceResponse.TraceId      = context.StringValue("DescribeNamespace.TraceId");

            DescribeNamespaceResponse.DescribeNamespace_Data data = new DescribeNamespaceResponse.DescribeNamespace_Data();
            data.RegionId                  = context.StringValue("DescribeNamespace.Data.RegionId");
            data.NamespaceId               = context.StringValue("DescribeNamespace.Data.NamespaceId");
            data.NamespaceName             = context.StringValue("DescribeNamespace.Data.NamespaceName");
            data.NamespaceDescription      = context.StringValue("DescribeNamespace.Data.NamespaceDescription");
            describeNamespaceResponse.Data = data;

            return(describeNamespaceResponse);
        }