/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="OperationList" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal OperationList(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IOperation[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IOperation)(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.Operation.FromJson(__u)))))() : null : Value; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="ErrorResponse" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _error = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.ErrorDefinition.FromJson(__jsonError) : Error; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="EligibleApprover" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal EligibleApprover(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _principalId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId; } { _principalIdDisplayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("principalIdDisplayName"), out var __jsonPrincipalIdDisplayName) ? (string)__jsonPrincipalIdDisplayName : (string)PrincipalIdDisplayName; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="Operation" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal Operation(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.OperationDisplay.FromJson(__jsonDisplay) : Display; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="ErrorDefinition" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal ErrorDefinition(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; } { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; } { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray>("details"), out var __jsonDetails) ? If(__jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IErrorDefinition[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IErrorDefinition)(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.ErrorDefinition.FromJson(__u)))))() : null : Detail; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="JustInTimeAccessPolicy" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal JustInTimeAccessPolicy(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _multiFactorAuthProvider = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("multiFactorAuthProvider"), out var __jsonMultiFactorAuthProvider) ? (string)__jsonMultiFactorAuthProvider : (string)MultiFactorAuthProvider; } { _maximumActivationDuration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("maximumActivationDuration"), out var __jsonMaximumActivationDuration) ? global::System.Xml.XmlConvert.ToTimeSpan(__jsonMaximumActivationDuration) : MaximumActivationDuration; } { _managedByTenantApprover = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray>("managedByTenantApprovers"), out var __jsonManagedByTenantApprovers) ? If(__jsonManagedByTenantApprovers as Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IEligibleApprover[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IEligibleApprover)(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.EligibleApprover.FromJson(__u)))))() : null : ManagedByTenantApprover; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="RegistrationAssignmentProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal RegistrationAssignmentProperties(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _registrationDefinition = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject>("registrationDefinition"), out var __jsonRegistrationDefinition) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.RegistrationAssignmentPropertiesRegistrationDefinition.FromJson(__jsonRegistrationDefinition) : RegistrationDefinition; } { _registrationDefinitionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("registrationDefinitionId"), out var __jsonRegistrationDefinitionId) ? (string)__jsonRegistrationDefinitionId : (string)RegistrationDefinitionId; } { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="OperationDisplay" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _provider = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider; } { _resource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource; } { _operation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation; } { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="Plan" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal Plan(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _publisher = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("publisher"), out var __jsonPublisher) ? (string)__jsonPublisher : (string)Publisher; } { _product = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("product"), out var __jsonProduct) ? (string)__jsonProduct : (string)Product; } { _version = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="RegistrationAssignment" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal RegistrationAssignment(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.RegistrationAssignmentProperties.FromJson(__jsonProperties) : Property; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="EligibleAuthorization" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal EligibleAuthorization(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _justInTimeAccessPolicy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject>("justInTimeAccessPolicy"), out var __jsonJustInTimeAccessPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.JustInTimeAccessPolicy.FromJson(__jsonJustInTimeAccessPolicy) : JustInTimeAccessPolicy; } { _principalId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId; } { _principalIdDisplayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("principalIdDisplayName"), out var __jsonPrincipalIdDisplayName) ? (string)__jsonPrincipalIdDisplayName : (string)PrincipalIdDisplayName; } { _roleDefinitionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("roleDefinitionId"), out var __jsonRoleDefinitionId) ? (string)__jsonRoleDefinitionId : (string)RoleDefinitionId; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="Authorization" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal Authorization(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _principalId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId; } { _principalIdDisplayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("principalIdDisplayName"), out var __jsonPrincipalIdDisplayName) ? (string)__jsonPrincipalIdDisplayName : (string)PrincipalIdDisplayName; } { _roleDefinitionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("roleDefinitionId"), out var __jsonRoleDefinitionId) ? (string)__jsonRoleDefinitionId : (string)RoleDefinitionId; } { _delegatedRoleDefinitionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray>("delegatedRoleDefinitionIds"), out var __jsonDelegatedRoleDefinitionIds) ? If(__jsonDelegatedRoleDefinitionIds as Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : DelegatedRoleDefinitionId; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="ManagedServicesIdentity" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal ManagedServicesIdentity(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _scope = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("scope"), out var __jsonScope) ? (string)__jsonScope : (string)Scope; } { _registrationDefinitionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("registrationDefinitionId"), out var __jsonRegistrationDefinitionId) ? (string)__jsonRegistrationDefinitionId : (string)RegistrationDefinitionId; } { _registrationAssignmentId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("registrationAssignmentId"), out var __jsonRegistrationAssignmentId) ? (string)__jsonRegistrationAssignmentId : (string)RegistrationAssignmentId; } { _marketplaceIdentifier = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("marketplaceIdentifier"), out var __jsonMarketplaceIdentifier) ? (string)__jsonMarketplaceIdentifier : (string)MarketplaceIdentifier; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="MarketplaceRegistrationDefinitionProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal MarketplaceRegistrationDefinitionProperties(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _managedByTenantId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("managedByTenantId"), out var __jsonManagedByTenantId) ? (string)__jsonManagedByTenantId : (string)ManagedByTenantId; } { _authorization = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray>("authorizations"), out var __jsonAuthorizations) ? If(__jsonAuthorizations as Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IAuthorization[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IAuthorization)(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.Authorization.FromJson(__u)))))() : null : Authorization; } { _eligibleAuthorization = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray>("eligibleAuthorizations"), out var __jsonEligibleAuthorizations) ? If(__jsonEligibleAuthorizations as Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IEligibleAuthorization[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IEligibleAuthorization)(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.EligibleAuthorization.FromJson(__p)))))() : null : EligibleAuthorization; } { _offerDisplayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("offerDisplayName"), out var __jsonOfferDisplayName) ? (string)__jsonOfferDisplayName : (string)OfferDisplayName; } { _publisherDisplayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("publisherDisplayName"), out var __jsonPublisherDisplayName) ? (string)__jsonPublisherDisplayName : (string)PublisherDisplayName; } { _planDisplayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("planDisplayName"), out var __jsonPlanDisplayName) ? (string)__jsonPlanDisplayName : (string)PlanDisplayName; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject into a new instance of <see cref="RegistrationAssignmentPropertiesRegistrationDefinitionProperties" /// />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; } { _authorization = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray>("authorizations"), out var __jsonAuthorizations) ? If(__jsonAuthorizations as Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IAuthorization[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IAuthorization)(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.Authorization.FromJson(__u)))))() : null : Authorization; } { _eligibleAuthorization = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray>("eligibleAuthorizations"), out var __jsonEligibleAuthorizations) ? If(__jsonEligibleAuthorizations as Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IEligibleAuthorization[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.IEligibleAuthorization)(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.Api20200201Preview.EligibleAuthorization.FromJson(__p)))))() : null : EligibleAuthorization; } { _registrationDefinitionName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("registrationDefinitionName"), out var __jsonRegistrationDefinitionName) ? (string)__jsonRegistrationDefinitionName : (string)RegistrationDefinitionName; } { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; } { _manageeTenantId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("manageeTenantId"), out var __jsonManageeTenantId) ? (string)__jsonManageeTenantId : (string)ManageeTenantId; } { _manageeTenantName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("manageeTenantName"), out var __jsonManageeTenantName) ? (string)__jsonManageeTenantName : (string)ManageeTenantName; } { _managedByTenantId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("managedByTenantId"), out var __jsonManagedByTenantId) ? (string)__jsonManagedByTenantId : (string)ManagedByTenantId; } { _managedByTenantName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString>("managedByTenantName"), out var __jsonManagedByTenantName) ? (string)__jsonManagedByTenantName : (string)ManagedByTenantName; } AfterFromJson(json); }
/// <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 <see "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.ManagedServices.Runtime.Json.JsonObject container, ref bool returnNow);
/// <summary> /// Serializes this instance of <see cref="MarketplaceRegistrationDefinitionList" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" /// />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="MarketplaceRegistrationDefinitionList" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.XNodeArray(); foreach (var __x in this._value) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("value", __w); } } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.Json.JsonObject container);
/// <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 <see "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.ManagedServices.Runtime.Json.JsonObject json, ref bool returnNow);
/// <summary> /// Serializes this instance of <see cref="RegistrationAssignment" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="RegistrationAssignment" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); } AfterToJson(ref container); return(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.ManagedServices.Runtime.Json.JsonObject json);
/// <summary> /// Serializes this instance of <see cref="ManagedServicesIdentity" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ManagedServicesIdentity" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._scope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._scope.ToString()) : null, "scope", container.Add); AddIf(null != (((object)this._registrationDefinitionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._registrationDefinitionId.ToString()) : null, "registrationDefinitionId", container.Add); AddIf(null != (((object)this._registrationAssignmentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._registrationAssignmentId.ToString()) : null, "registrationAssignmentId", container.Add); AddIf(null != (((object)this._marketplaceIdentifier)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._marketplaceIdentifier.ToString()) : null, "marketplaceIdentifier", container.Add); AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="RegistrationDefinitionProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="RegistrationDefinitionProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add); if (null != this._authorization) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.XNodeArray(); foreach (var __x in this._authorization) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("authorizations", __w); } if (null != this._eligibleAuthorization) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.XNodeArray(); foreach (var __s in this._eligibleAuthorization) { AddIf(__s?.ToJson(null, serializationMode), __r.Add); } container.Add("eligibleAuthorizations", __r); } AddIf(null != (((object)this._registrationDefinitionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._registrationDefinitionName.ToString()) : null, "registrationDefinitionName", container.Add); AddIf(null != (((object)this._managedByTenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._managedByTenantId.ToString()) : null, "managedByTenantId", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._managedByTenantName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._managedByTenantName.ToString()) : null, "managedByTenantName", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="RegistrationAssignmentProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="RegistrationAssignmentProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._registrationDefinition ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) this._registrationDefinition.ToJson(null, serializationMode) : null, "registrationDefinition", container.Add); } AddIf(null != (((object)this._registrationDefinitionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._registrationDefinitionId.ToString()) : null, "registrationDefinitionId", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="MarketplaceRegistrationDefinitionProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" /// />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="MarketplaceRegistrationDefinitionProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" /// />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._managedByTenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._managedByTenantId.ToString()) : null, "managedByTenantId", container.Add); if (null != this._authorization) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.XNodeArray(); foreach (var __x in this._authorization) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("authorizations", __w); } if (null != this._eligibleAuthorization) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.XNodeArray(); foreach (var __s in this._eligibleAuthorization) { AddIf(__s?.ToJson(null, serializationMode), __r.Add); } container.Add("eligibleAuthorizations", __r); } AddIf(null != (((object)this._offerDisplayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._offerDisplayName.ToString()) : null, "offerDisplayName", container.Add); AddIf(null != (((object)this._publisherDisplayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._publisherDisplayName.ToString()) : null, "publisherDisplayName", container.Add); AddIf(null != (((object)this._planDisplayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._planDisplayName.ToString()) : null, "planDisplayName", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ErrorResponse" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ErrorResponse" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) this._error.ToJson(null, serializationMode) : null, "error", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="EligibleApprover" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="EligibleApprover" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId", container.Add); AddIf(null != (((object)this._principalIdDisplayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._principalIdDisplayName.ToString()) : null, "principalIdDisplayName", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="JustInTimeAccessPolicy" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="JustInTimeAccessPolicy" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._multiFactorAuthProvider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._multiFactorAuthProvider.ToString()) : null, "multiFactorAuthProvider", container.Add); AddIf((Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode)(null != this._maximumActivationDuration ? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan) this._maximumActivationDuration)): null), "maximumActivationDuration", container.Add); if (null != this._managedByTenantApprover) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.XNodeArray(); foreach (var __x in this._managedByTenantApprover) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("managedByTenantApprovers", __w); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="Authorization" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="Authorization" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId", container.Add); AddIf(null != (((object)this._principalIdDisplayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._principalIdDisplayName.ToString()) : null, "principalIdDisplayName", container.Add); AddIf(null != (((object)this._roleDefinitionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._roleDefinitionId.ToString()) : null, "roleDefinitionId", container.Add); if (null != this._delegatedRoleDefinitionId) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.XNodeArray(); foreach (var __x in this._delegatedRoleDefinitionId) { AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add); } container.Add("delegatedRoleDefinitionIds", __w); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ErrorDefinition" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.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.ManagedServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ErrorDefinition" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add); AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add); if (null != this._detail) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Runtime.Json.XNodeArray(); foreach (var __x in this._detail) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("details", __w); } AfterToJson(ref container); return(container); }