public static GetPatchBaselineResponse Unmarshall(UnmarshallerContext _ctx)
        {
            GetPatchBaselineResponse getPatchBaselineResponse = new GetPatchBaselineResponse();

            getPatchBaselineResponse.HttpResponse = _ctx.HttpResponse;
            getPatchBaselineResponse.RequestId    = _ctx.StringValue("GetPatchBaseline.RequestId");

            GetPatchBaselineResponse.GetPatchBaseline_PatchBaseline patchBaseline = new GetPatchBaselineResponse.GetPatchBaseline_PatchBaseline();
            patchBaseline.Id                       = _ctx.StringValue("GetPatchBaseline.PatchBaseline.Id");
            patchBaseline.Name                     = _ctx.StringValue("GetPatchBaseline.PatchBaseline.Name");
            patchBaseline.CreatedDate              = _ctx.StringValue("GetPatchBaseline.PatchBaseline.CreatedDate");
            patchBaseline.CreatedBy                = _ctx.StringValue("GetPatchBaseline.PatchBaseline.CreatedBy");
            patchBaseline.UpdatedDate              = _ctx.StringValue("GetPatchBaseline.PatchBaseline.UpdatedDate");
            patchBaseline.UpdatedBy                = _ctx.StringValue("GetPatchBaseline.PatchBaseline.UpdatedBy");
            patchBaseline.Description              = _ctx.StringValue("GetPatchBaseline.PatchBaseline.Description");
            patchBaseline.ShareType                = _ctx.StringValue("GetPatchBaseline.PatchBaseline.ShareType");
            patchBaseline.OperationSystem          = _ctx.StringValue("GetPatchBaseline.PatchBaseline.OperationSystem");
            patchBaseline.ApprovalRules            = _ctx.StringValue("GetPatchBaseline.PatchBaseline.ApprovalRules");
            getPatchBaselineResponse.PatchBaseline = patchBaseline;

            return(getPatchBaselineResponse);
        }
Exemple #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)
        {
            GetPatchBaselineResponse response = new GetPatchBaselineResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("ApprovalRules", targetDepth))
                {
                    var unmarshaller = PatchRuleGroupUnmarshaller.Instance;
                    response.ApprovalRules = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ApprovedPatches", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance);
                    response.ApprovedPatches = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ApprovedPatchesComplianceLevel", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ApprovedPatchesComplianceLevel = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ApprovedPatchesEnableNonSecurity", targetDepth))
                {
                    var unmarshaller = BoolUnmarshaller.Instance;
                    response.ApprovedPatchesEnableNonSecurity = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("BaselineId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.BaselineId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("CreatedDate", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.CreatedDate = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Description", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Description = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("GlobalFilters", targetDepth))
                {
                    var unmarshaller = PatchFilterGroupUnmarshaller.Instance;
                    response.GlobalFilters = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ModifiedDate", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.ModifiedDate = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Name", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Name = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("OperatingSystem", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.OperatingSystem = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PatchGroups", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance);
                    response.PatchGroups = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("RejectedPatches", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance);
                    response.RejectedPatches = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("RejectedPatchesAction", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.RejectedPatchesAction = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Sources", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <PatchSource, PatchSourceUnmarshaller>(PatchSourceUnmarshaller.Instance);
                    response.Sources = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }