Beispiel #1
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)
        {
            CreatePatchBaselineResponse response = new CreatePatchBaselineResponse();

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

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

            return(response);
        }
        public static CreatePatchBaselineResponse Unmarshall(UnmarshallerContext _ctx)
        {
            CreatePatchBaselineResponse createPatchBaselineResponse = new CreatePatchBaselineResponse();

            createPatchBaselineResponse.HttpResponse = _ctx.HttpResponse;
            createPatchBaselineResponse.RequestId    = _ctx.StringValue("CreatePatchBaseline.RequestId");

            CreatePatchBaselineResponse.CreatePatchBaseline_PatchBaseline patchBaseline = new CreatePatchBaselineResponse.CreatePatchBaseline_PatchBaseline();
            patchBaseline.Id                          = _ctx.StringValue("CreatePatchBaseline.PatchBaseline.Id");
            patchBaseline.Name                        = _ctx.StringValue("CreatePatchBaseline.PatchBaseline.Name");
            patchBaseline.CreatedDate                 = _ctx.StringValue("CreatePatchBaseline.PatchBaseline.CreatedDate");
            patchBaseline.CreatedBy                   = _ctx.StringValue("CreatePatchBaseline.PatchBaseline.CreatedBy");
            patchBaseline.UpdatedDate                 = _ctx.StringValue("CreatePatchBaseline.PatchBaseline.UpdatedDate");
            patchBaseline.UpdatedBy                   = _ctx.StringValue("CreatePatchBaseline.PatchBaseline.UpdatedBy");
            patchBaseline.Description                 = _ctx.StringValue("CreatePatchBaseline.PatchBaseline.Description");
            patchBaseline.ShareType                   = _ctx.StringValue("CreatePatchBaseline.PatchBaseline.ShareType");
            patchBaseline.OperationSystem             = _ctx.StringValue("CreatePatchBaseline.PatchBaseline.OperationSystem");
            patchBaseline.ApprovalRules               = _ctx.StringValue("CreatePatchBaseline.PatchBaseline.ApprovalRules");
            createPatchBaselineResponse.PatchBaseline = patchBaseline;

            return(createPatchBaselineResponse);
        }