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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __imageUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.ImageUpdateProperties(json);
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _displayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName; }
            { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; }
            { _iconUrl = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("iconUrl"), out var __jsonIconUrl) ? (string)__jsonIconUrl : (string)IconUrl; }
            { _author = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("author"), out var __jsonAuthor) ? (string)__jsonAuthor : (string)Author; }
            { _oSType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType; }
            { _plan = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("plan"), out var __jsonPlan) ? (string)__jsonPlan : (string)Plan; }
            { _termsStatus = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("termsStatus"), out var __jsonTermsStatus) ? (string)__jsonTermsStatus : (string)TermsStatus; }
            { _offer = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("offer"), out var __jsonOffer) ? (string)__jsonOffer : (string)Offer; }
            { _publisher = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("publisher"), out var __jsonPublisher) ? (string)__jsonPublisher : (string)Publisher; }
            { _sku = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("sku"), out var __jsonSku) ? (string)__jsonSku : (string)Sku; }
            { _version = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version; }
            { _sharedGalleryId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("sharedGalleryId"), out var __jsonSharedGalleryId) ? (string)__jsonSharedGalleryId : (string)SharedGalleryId; }
            { _availableRegion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray>("availableRegions"), out var __jsonAvailableRegions) ? If(__jsonAvailableRegions as Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (string)(__u is Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : AvailableRegion; }
            { _oSState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("osState"), out var __jsonOSState) ? (string)__jsonOSState : (string)OSState; }
            AfterFromJson(json);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="Any" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Any(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray>("tags"), out var __jsonTags) ? If(__jsonTags as Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (string)(__u is Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : Tag; }
            AfterFromJson(json);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="SaveImageBody" />.
 /// </summary>
 /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
 internal SaveImageBody(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
 {
     bool returnNow = false;
     BeforeFromJson(json, ref returnNow);
     if (returnNow)
     {
         return;
     }
     {_name = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
     {_labVirtualMachineId = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("labVirtualMachineId"), out var __jsonLabVirtualMachineId) ? (string)__jsonLabVirtualMachineId : (string)LabVirtualMachineId;}
     AfterFromJson(json);
 }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="ProxyResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _text = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("text"), out var __jsonText) ? (string)__jsonText : (string)Text; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="ScheduleUpdate" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ScheduleUpdate(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.ScheduleUpdateProperties.FromJson(__jsonProperties) : Property; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="ErrorResponse" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _error = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error; }
            AfterFromJson(json);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="LabPlanNetworkProfile" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal LabPlanNetworkProfile(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _subnetId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)SubnetId; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="TrackedResourceTags" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        /// <param name="exclusions"></param>
        internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet <string> exclusions = null)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.JsonSerializable.FromJson(json, ((Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.IAssociativeArray <string>) this).AdditionalProperties, null, exclusions);
            AfterFromJson(json);
        }
Exemplo n.º 11
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="VirtualMachineAdditionalCapabilities" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal VirtualMachineAdditionalCapabilities(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _installGpuDriver = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("installGpuDrivers"), out var __jsonInstallGpuDrivers) ? (string)__jsonInstallGpuDrivers : (string)InstallGpuDriver; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="UserUpdateProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal UserUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _additionalUsageQuota = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("additionalUsageQuota"), out var __jsonAdditionalUsageQuota) ? global::System.Xml.XmlConvert.ToTimeSpan(__jsonAdditionalUsageQuota) : AdditionalUsageQuota; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="ImageUpdateProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ImageUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _enabledState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("enabledState"), out var __jsonEnabledState) ? (string)__jsonEnabledState : (string)EnabledState; }
            AfterFromJson(json);
        }
Exemplo n.º 14
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="PagedVirtualMachines" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal PagedVirtualMachines(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.IVirtualMachine[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.IVirtualMachine)(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.VirtualMachine.FromJson(__u)))))() : null : Value; }
            { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; }
            AfterFromJson(json);
        }
Exemplo n.º 15
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="SecurityProfile" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal SecurityProfile(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _registrationCode = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("registrationCode"), out var __jsonRegistrationCode) ? (string)__jsonRegistrationCode : (string)RegistrationCode; }
            { _openAccess = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("openAccess"), out var __jsonOpenAccess) ? (string)__jsonOpenAccess : (string)OpenAccess; }
            AfterFromJson(json);
        }
Exemplo n.º 16
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="Credentials" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Credentials(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _username = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("username"), out var __jsonUsername) ? (string)__jsonUsername : (string)Username; }
            { _password = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)Password; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="ErrorAdditionalInfo" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _info = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Any.FromJson(__jsonInfo) : Info; }
            AfterFromJson(json);
        }
Exemplo n.º 18
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="LabPlanProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal LabPlanProperties(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __labPlanUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.LabPlanUpdateProperties(json);
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            AfterFromJson(json);
        }
Exemplo n.º 19
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="Resource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Resource(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.TrackedResource(json);
            { _systemData = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData; }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.LabPlanProperties.FromJson(__jsonProperties) : Property; }
            AfterFromJson(json);
        }
Exemplo n.º 21
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="TrackedResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resource = new Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.Resource(json);
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.TrackedResourceTags.FromJson(__jsonTags) : Tag; }
            { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; }
            AfterFromJson(json);
        }
Exemplo n.º 22
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="OperationDisplay" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _url = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url; }
            { _email = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("email"), out var __jsonEmail) ? (string)__jsonEmail : (string)Email; }
            { _phone = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("phone"), out var __jsonPhone) ? (string)__jsonPhone : (string)Phone; }
            { _instruction = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("instructions"), out var __jsonInstructions) ? (string)__jsonInstructions : (string)Instruction; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="RecurrencePattern" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal RecurrencePattern(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _frequency = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("frequency"), out var __jsonFrequency) ? (string)__jsonFrequency : (string)Frequency; }
            { _weekDay = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray>("weekDays"), out var __jsonWeekDays) ? If(__jsonWeekDays as Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Support.WeekDay[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.LabServices.Support.WeekDay)(__u is Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.LabServices.Support.WeekDay)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.LabServices.Support.WeekDay) "")))))() : null : WeekDay; }
            { _interval = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonNumber>("interval"), out var __jsonInterval) ? (int?)__jsonInterval : Interval; }
            { _expirationDate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("expirationDate"), out var __jsonExpirationDate) ? global::System.DateTime.TryParse((string)__jsonExpirationDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpirationDateValue) ? __jsonExpirationDateValue : ExpirationDate : ExpirationDate; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="ConnectionProfile" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ConnectionProfile(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _webSshAccess = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("webSshAccess"), out var __jsonWebSshAccess) ? (string)__jsonWebSshAccess : (string)WebSshAccess; }
            { _webRdpAccess = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("webRdpAccess"), out var __jsonWebRdpAccess) ? (string)__jsonWebRdpAccess : (string)WebRdpAccess; }
            { _clientSshAccess = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("clientSshAccess"), out var __jsonClientSshAccess) ? (string)__jsonClientSshAccess : (string)ClientSshAccess; }
            { _clientRdpAccess = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("clientRdpAccess"), out var __jsonClientRdpAccess) ? (string)__jsonClientRdpAccess : (string)ClientRdpAccess; }
            AfterFromJson(json);
        }
Exemplo n.º 26
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="Operation" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Operation(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.OperationDisplay.FromJson(__jsonDisplay) : Display; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _isDataAction = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonBoolean>("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction; }
            { _origin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin; }
            { _actionType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)ActionType; }
            AfterFromJson(json);
        }
Exemplo n.º 27
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="ErrorDetail" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; }
            { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; }
            { _target = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target; }
            { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray>("details"), out var __jsonDetails) ? If(__jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.IErrorDetail[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.IErrorDetail)(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.ErrorDetail.FromJson(__u)))))() : null : Detail; }
            { _additionalInfo = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray>("additionalInfo"), out var __jsonAdditionalInfo) ? If(__jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.IErrorAdditionalInfo[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.IErrorAdditionalInfo)(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.ErrorAdditionalInfo.FromJson(__p)))))() : null : AdditionalInfo; }
            AfterFromJson(json);
        }
Exemplo n.º 28
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="VirtualMachineProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal VirtualMachineProperties(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _connectionProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("connectionProfile"), out var __jsonConnectionProfile) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.VirtualMachineConnectionProfile.FromJson(__jsonConnectionProfile) : ConnectionProfile; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _state = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("state"), out var __jsonState) ? (string)__jsonState : (string)State; }
            { _claimedByUserId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("claimedByUserId"), out var __jsonClaimedByUserId) ? (string)__jsonClaimedByUserId : (string)ClaimedByUserId; }
            { _vMType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("vmType"), out var __jsonVMType) ? (string)__jsonVMType : (string)VMType; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="ScheduleUpdateProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ScheduleUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _recurrencePattern = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("recurrencePattern"), out var __jsonRecurrencePattern) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.RecurrencePattern.FromJson(__jsonRecurrencePattern) : RecurrencePattern; }
            { _startAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("startAt"), out var __jsonStartAt) ? global::System.DateTime.TryParse((string)__jsonStartAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartAtValue) ? __jsonStartAtValue : StartAt : StartAt; }
            { _stopAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("stopAt"), out var __jsonStopAt) ? global::System.DateTime.TryParse((string)__jsonStopAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStopAtValue) ? __jsonStopAtValue : StopAt : StopAt; }
            { _timeZoneId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("timeZoneId"), out var __jsonTimeZoneId) ? (string)__jsonTimeZoneId : (string)TimeZoneId; }
            { _note = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("notes"), out var __jsonNotes) ? (string)__jsonNotes : (string)Note; }
            AfterFromJson(json);
        }
Exemplo n.º 30
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="RosterProfile" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal RosterProfile(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _activeDirectoryGroupId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("activeDirectoryGroupId"), out var __jsonActiveDirectoryGroupId) ? (string)__jsonActiveDirectoryGroupId : (string)ActiveDirectoryGroupId; }
            { _ltiContextId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("ltiContextId"), out var __jsonLtiContextId) ? (string)__jsonLtiContextId : (string)LtiContextId; }
            { _lmsInstance = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("lmsInstance"), out var __jsonLmsInstance) ? (string)__jsonLmsInstance : (string)LmsInstance; }
            { _ltiClientId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("ltiClientId"), out var __jsonLtiClientId) ? (string)__jsonLtiClientId : (string)LtiClientId; }
            { _ltiRosterEndpoint = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("ltiRosterEndpoint"), out var __jsonLtiRosterEndpoint) ? (string)__jsonLtiRosterEndpoint : (string)LtiRosterEndpoint; }
            AfterFromJson(json);
        }