Exemple #1
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="Any" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Any(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            AfterFromJson(json);
        }
Exemple #2
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="ErrorResponse" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _error = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20180630Preview.ErrorResponseError.FromJson(__jsonError) : Error; }
            AfterFromJson(json);
        }
Exemple #3
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="GuestConfigurationAssignmentList" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal GuestConfigurationAssignmentList(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IGuestConfigurationAssignment[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IGuestConfigurationAssignment)(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.GuestConfigurationAssignment.FromJson(__u)))))() : null : Value; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="OperationProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OperationProperties(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _statusCode = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("statusCode"), out var __jsonStatusCode) ? (string)__jsonStatusCode : (string)StatusCode; }
            AfterFromJson(json);
        }
Exemple #5
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="ProxyResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resource = new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20180630Preview.Resource(json);
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="ErrorResponseError" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorResponseError(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; }
            { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="ConfigurationParameter" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ConfigurationParameter(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="AssignmentInfo" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AssignmentInfo(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _configuration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("configuration"), out var __jsonConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.ConfigurationInfo.FromJson(__jsonConfiguration) : Configuration; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            AfterFromJson(json);
        }
Exemple #9
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="VMInfo" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal VMInfo(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _uuid = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("uuid"), out var __jsonUuid) ? (string)__jsonUuid : (string)Uuid; }
            AfterFromJson(json);
        }
Exemple #10
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="AssignmentReportResourceComplianceReason" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AssignmentReportResourceComplianceReason(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _phrase = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("phrase"), out var __jsonPhrase) ? (string)__jsonPhrase : (string)Phrase; }
            { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="Operation" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Operation(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20180630Preview.OperationDisplay.FromJson(__jsonDisplay) : Display; }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20180630Preview.OperationProperties.FromJson(__jsonProperties) : Property; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="GuestConfigurationAssignment" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal GuestConfigurationAssignment(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resource = new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20180630Preview.Resource(json);
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.GuestConfigurationAssignmentProperties.FromJson(__jsonProperties) : Property; }
            { _systemData = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData; }
            AfterFromJson(json);
        }
Exemple #13
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="GuestConfigurationAssignmentReport" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal GuestConfigurationAssignmentReport(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.GuestConfigurationAssignmentReportProperties.FromJson(__jsonProperties) : Property; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="AssignmentReportResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AssignmentReportResource(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _complianceStatus = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("complianceStatus"), out var __jsonComplianceStatus) ? (string)__jsonComplianceStatus : (string)ComplianceStatus; }
            { _resourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId; }
            { _reason = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray>("reasons"), out var __jsonReasons) ? If(__jsonReasons as Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IAssignmentReportResourceComplianceReason[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IAssignmentReportResourceComplianceReason)(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.AssignmentReportResourceComplianceReason.FromJson(__u)))))() : null : Reason; }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Any.FromJson(__jsonProperties) : Property; }
            AfterFromJson(json);
        }
Exemple #15
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="OperationDisplay" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _provider = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider; }
            { _resource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource; }
            { _operation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation; }
            { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="Resource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Resource(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="VmssvmInfo" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal VmssvmInfo(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _vMId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("vmId"), out var __jsonVMId) ? (string)__jsonVMId : (string)VMId; }
            { _vMResourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("vmResourceId"), out var __jsonVMResourceId) ? (string)__jsonVMResourceId : (string)VMResourceId; }
            { _complianceStatus = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("complianceStatus"), out var __jsonComplianceStatus) ? (string)__jsonComplianceStatus : (string)ComplianceStatus; }
            { _latestReportId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("latestReportId"), out var __jsonLatestReportId) ? (string)__jsonLatestReportId : (string)LatestReportId; }
            { _lastComplianceChecked = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("lastComplianceChecked"), out var __jsonLastComplianceChecked) ? global::System.DateTime.TryParse((string)__jsonLastComplianceChecked, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastComplianceCheckedValue) ? __jsonLastComplianceCheckedValue : LastComplianceChecked : LastComplianceChecked; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="SystemData" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _createdBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy; }
            { _createdByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType; }
            { _createdAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt; }
            { _lastModifiedBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy; }
            { _lastModifiedByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType; }
            { _lastModifiedAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt; }
            AfterFromJson(json);
        }
Exemple #19
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="AssignmentReportDetails" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AssignmentReportDetails(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _complianceStatus = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("complianceStatus"), out var __jsonComplianceStatus) ? (string)__jsonComplianceStatus : (string)ComplianceStatus; }
            { _startTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime; }
            { _endTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime; }
            { _jobId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("jobId"), out var __jsonJobId) ? (string)__jsonJobId : (string)JobId; }
            { _operationType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("operationType"), out var __jsonOperationType) ? (string)__jsonOperationType : (string)OperationType; }
            { _resource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray>("resources"), out var __jsonResources) ? If(__jsonResources as Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IAssignmentReportResource[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IAssignmentReportResource)(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.AssignmentReportResource.FromJson(__u)))))() : null : Resource; }
            AfterFromJson(json);
        }
Exemple #20
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="ConfigurationSetting" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ConfigurationSetting(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _configurationMode = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("configurationMode"), out var __jsonConfigurationMode) ? (string)__jsonConfigurationMode : (string)ConfigurationMode; }
            { _allowModuleOverwrite = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonBoolean>("allowModuleOverwrite"), out var __jsonAllowModuleOverwrite) ? (bool?)__jsonAllowModuleOverwrite : AllowModuleOverwrite; }
            { _actionAfterReboot = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("actionAfterReboot"), out var __jsonActionAfterReboot) ? (string)__jsonActionAfterReboot : (string)ActionAfterReboot; }
            { _refreshFrequencyMin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNumber>("refreshFrequencyMins"), out var __jsonRefreshFrequencyMins) ? (float?)__jsonRefreshFrequencyMins : RefreshFrequencyMin; }
            { _rebootIfNeeded = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonBoolean>("rebootIfNeeded"), out var __jsonRebootIfNeeded) ? (bool?)__jsonRebootIfNeeded : RebootIfNeeded; }
            { _configurationModeFrequencyMin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNumber>("configurationModeFrequencyMins"), out var __jsonConfigurationModeFrequencyMins) ? (float?)__jsonConfigurationModeFrequencyMins : ConfigurationModeFrequencyMin; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="GuestConfigurationAssignmentReportProperties"
        /// />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal GuestConfigurationAssignmentReportProperties(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _assignment = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("assignment"), out var __jsonAssignment) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.AssignmentInfo.FromJson(__jsonAssignment) : Assignment; }
            { _vM = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("vm"), out var __jsonVM) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.VMInfo.FromJson(__jsonVM) : VM; }
            { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("details"), out var __jsonDetails) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.AssignmentReportDetails.FromJson(__jsonDetails) : Detail; }
            { _complianceStatus = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("complianceStatus"), out var __jsonComplianceStatus) ? (string)__jsonComplianceStatus : (string)ComplianceStatus; }
            { _reportId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("reportId"), out var __jsonReportId) ? (string)__jsonReportId : (string)ReportId; }
            { _startTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime; }
            { _endTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime; }
            { _vmssResourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("vmssResourceId"), out var __jsonVmssResourceId) ? (string)__jsonVmssResourceId : (string)VmssResourceId; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="GuestConfigurationIdentity" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal GuestConfigurationIdentity(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _guestConfigurationAssignmentName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("guestConfigurationAssignmentName"), out var __jsonGuestConfigurationAssignmentName) ? (string)__jsonGuestConfigurationAssignmentName : (string)GuestConfigurationAssignmentName; }
            { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; }
            { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; }
            { _vMName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("vmName"), out var __jsonVMName) ? (string)__jsonVMName : (string)VMName; }
            { _machineName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("machineName"), out var __jsonMachineName) ? (string)__jsonMachineName : (string)MachineName; }
            { _vmssName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("vmssName"), out var __jsonVmssName) ? (string)__jsonVmssName : (string)VmssName; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _reportId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("reportId"), out var __jsonReportId) ? (string)__jsonReportId : (string)ReportId; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="GuestConfigurationNavigation" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal GuestConfigurationNavigation(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _configurationSetting = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("configurationSetting"), out var __jsonConfigurationSetting) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.ConfigurationSetting.FromJson(__jsonConfigurationSetting) : ConfigurationSetting; }
            { _kind = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _version = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version; }
            { _contentUri = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("contentUri"), out var __jsonContentUri) ? (string)__jsonContentUri : (string)ContentUri; }
            { _contentHash = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("contentHash"), out var __jsonContentHash) ? (string)__jsonContentHash : (string)ContentHash; }
            { _assignmentType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("assignmentType"), out var __jsonAssignmentType) ? (string)__jsonAssignmentType : (string)AssignmentType; }
            { _assignmentSource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("assignmentSource"), out var __jsonAssignmentSource) ? (string)__jsonAssignmentSource : (string)AssignmentSource; }
            { _contentType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("contentType"), out var __jsonContentType) ? (string)__jsonContentType : (string)ContentType; }
            { _configurationParameter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray>("configurationParameter"), out var __jsonConfigurationParameter) ? If(__jsonConfigurationParameter as Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IConfigurationParameter[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IConfigurationParameter)(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.ConfigurationParameter.FromJson(__u)))))() : null : ConfigurationParameter; }
            { _configurationProtectedParameter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray>("configurationProtectedParameter"), out var __jsonConfigurationProtectedParameter) ? If(__jsonConfigurationProtectedParameter as Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IConfigurationParameter[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IConfigurationParameter)(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.ConfigurationParameter.FromJson(__p)))))() : null : ConfigurationProtectedParameter; }
            AfterFromJson(json);
        }
Exemple #24
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject into a new instance of <see cref="GuestConfigurationAssignmentProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal GuestConfigurationAssignmentProperties(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _guestConfiguration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("guestConfiguration"), out var __jsonGuestConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.GuestConfigurationNavigation.FromJson(__jsonGuestConfiguration) : GuestConfiguration; }
            { _latestAssignmentReport = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject>("latestAssignmentReport"), out var __jsonLatestAssignmentReport) ? Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.AssignmentReport.FromJson(__jsonLatestAssignmentReport) : LatestAssignmentReport; }
            { _targetResourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("targetResourceId"), out var __jsonTargetResourceId) ? (string)__jsonTargetResourceId : (string)TargetResourceId; }
            { _complianceStatus = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("complianceStatus"), out var __jsonComplianceStatus) ? (string)__jsonComplianceStatus : (string)ComplianceStatus; }
            { _lastComplianceStatusChecked = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("lastComplianceStatusChecked"), out var __jsonLastComplianceStatusChecked) ? global::System.DateTime.TryParse((string)__jsonLastComplianceStatusChecked, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastComplianceStatusCheckedValue) ? __jsonLastComplianceStatusCheckedValue : LastComplianceStatusChecked : LastComplianceStatusChecked; }
            { _latestReportId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("latestReportId"), out var __jsonLatestReportId) ? (string)__jsonLatestReportId : (string)LatestReportId; }
            { _parameterHash = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("parameterHash"), out var __jsonParameterHash) ? (string)__jsonParameterHash : (string)ParameterHash; }
            { _context = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("context"), out var __jsonContext) ? (string)__jsonContext : (string)Context; }
            { _assignmentHash = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("assignmentHash"), out var __jsonAssignmentHash) ? (string)__jsonAssignmentHash : (string)AssignmentHash; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _resourceType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString>("resourceType"), out var __jsonResourceType) ? (string)__jsonResourceType : (string)ResourceType; }
            { _vmssVMList = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray>("vmssVMList"), out var __jsonVmssVMList) ? If(__jsonVmssVMList as Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IVmssvmInfo[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.IVmssvmInfo)(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Models.Api20220125.VmssvmInfo.FromJson(__u)))))() : null : VmssVMList; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ConfigurationParameter" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ConfigurationParameter" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            AddIf(null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._value.ToString()) : null, "value", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
        /// object before it is serialized.
        /// If you wish to disable the default serialization entirely, return <c>true</c> in the <paramref name="returnNow" /> output
        /// parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="container">The JSON container that the serialization result will be placed in.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject container, ref bool returnNow);
        /// <summary>
        /// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of
        /// the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <paramref name= "returnNow" />
        /// output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="json">The JsonNode that should be deserialized into this object.</param>
        /// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json, ref bool returnNow);
        /// <summary>
        /// <c>AfterToJson</c> will be called after the json serialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject"
        /// /> before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="container">The JSON container that the serialization result will be placed in.</param>

        partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject container);
        /// <summary>
        /// <c>AfterFromJson</c> will be called after the json deserialization has finished, allowing customization of the object
        /// before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="json">The JsonNode that should be deserialized into this object.</param>

        partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject json);
        /// <summary>
        /// Serializes this instance of <see cref="GuestConfigurationNavigation" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="GuestConfigurationNavigation" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._configurationSetting ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) this._configurationSetting.ToJson(null, serializationMode) : null, "configurationSetting", container.Add);
            }
            AddIf(null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind", container.Add);
            AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            AddIf(null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._version.ToString()) : null, "version", container.Add);
            AddIf(null != (((object)this._contentUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._contentUri.ToString()) : null, "contentUri", container.Add);
            AddIf(null != (((object)this._contentHash)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._contentHash.ToString()) : null, "contentHash", container.Add);
            AddIf(null != (((object)this._assignmentType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._assignmentType.ToString()) : null, "assignmentType", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._assignmentSource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._assignmentSource.ToString()) : null, "assignmentSource", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._contentType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._contentType.ToString()) : null, "contentType", container.Add);
            }
            if (null != this._configurationParameter)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.XNodeArray();
                foreach (var __x in this._configurationParameter)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("configurationParameter", __w);
            }
            if (null != this._configurationProtectedParameter)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.XNodeArray();
                foreach (var __s in this._configurationProtectedParameter)
                {
                    AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                }
                container.Add("configurationProtectedParameter", __r);
            }
            AfterToJson(ref container);
            return(container);
        }