/// <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="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); }
/// <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); }
/// <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="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); }
/// <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); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="LabNetworkProfile" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal LabNetworkProfile(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; } { _loadBalancerId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("loadBalancerId"), out var __jsonLoadBalancerId) ? (string)__jsonLoadBalancerId : (string)LoadBalancerId; } { _publicIPId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("publicIpId"), out var __jsonPublicIPId) ? (string)__jsonPublicIPId : (string)PublicIPId; } AfterFromJson(json); }
/// <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); }
/// <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); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="LabProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal LabProperties(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __labUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.LabUpdateProperties(json); { _networkProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("networkProfile"), out var __jsonNetworkProfile) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.LabNetworkProfile.FromJson(__jsonNetworkProfile) : NetworkProfile; } { _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; } 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); }
/// <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="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); }
/// <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="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); }
/// <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); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="Sku" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal Sku(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; } { _tier = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("tier"), out var __jsonTier) ? (string)__jsonTier : (string)Tier; } { _size = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("size"), out var __jsonSize) ? (string)__jsonSize : (string)Size; } { _family = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("family"), out var __jsonFamily) ? (string)__jsonFamily : (string)Family; } { _capacity = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonNumber>("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : Capacity; } 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); }
/// <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="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); }
/// <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); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="LabServicesIdentity" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal LabServicesIdentity(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; } { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; } { _labPlanName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("labPlanName"), out var __jsonLabPlanName) ? (string)__jsonLabPlanName : (string)LabPlanName; } { _imageName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("imageName"), out var __jsonImageName) ? (string)__jsonImageName : (string)ImageName; } { _labName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("labName"), out var __jsonLabName) ? (string)__jsonLabName : (string)LabName; } { _operationResultId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("operationResultId"), out var __jsonOperationResultId) ? (string)__jsonOperationResultId : (string)OperationResultId; } { _scheduleName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("scheduleName"), out var __jsonScheduleName) ? (string)__jsonScheduleName : (string)ScheduleName; } { _userName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("userName"), out var __jsonUserName) ? (string)__jsonUserName : (string)UserName; } { _virtualMachineName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("virtualMachineName"), out var __jsonVirtualMachineName) ? (string)__jsonVirtualMachineName : (string)VirtualMachineName; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } AfterFromJson(json); }
/// <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="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="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); }
/// <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="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); }
/// <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="ScheduleProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal ScheduleProperties(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __scheduleUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.ScheduleUpdateProperties(json); { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject into a new instance of <see cref="VirtualMachineProfile" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal VirtualMachineProfile(Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _imageReference = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference; } { _sku = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20.Sku.FromJson(__jsonSku) : Sku; } { _additionalCapability = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("additionalCapabilities"), out var __jsonAdditionalCapabilities) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.VirtualMachineAdditionalCapabilities.FromJson(__jsonAdditionalCapabilities) : AdditionalCapability; } { _adminUser = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("adminUser"), out var __jsonAdminUser) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.Credentials.FromJson(__jsonAdminUser) : AdminUser; } { _nonAdminUser = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonObject>("nonAdminUser"), out var __jsonNonAdminUser) ? Microsoft.Azure.PowerShell.Cmdlets.LabServices.Models.Api20211001Preview.Credentials.FromJson(__jsonNonAdminUser) : NonAdminUser; } { _createOption = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("createOption"), out var __jsonCreateOption) ? (string)__jsonCreateOption : (string)CreateOption; } { _oSType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType; } { _usageQuota = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("usageQuota"), out var __jsonUsageQuota) ? global::System.Xml.XmlConvert.ToTimeSpan(__jsonUsageQuota) : UsageQuota; } { _useSharedPassword = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.LabServices.Runtime.Json.JsonString>("useSharedPassword"), out var __jsonUseSharedPassword) ? (string)__jsonUseSharedPassword : (string)UseSharedPassword; } AfterFromJson(json); }