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

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

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _resourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId; }
            { _connectionString = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("connectionString"), out var __jsonConnectionString) ? (string)__jsonConnectionString : (string)ConnectionString; }
            AfterFromJson(json);
        }
Esempio n. 4
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="NameAvailabilityParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal NameAvailabilityParameters(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _nameAvailable = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonBoolean>("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : NameAvailable; }
            { _reason = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason; }
            { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="CommunicationIdentity" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CommunicationIdentity(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; }
            { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; }
            { _communicationServiceName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("communicationServiceName"), out var __jsonCommunicationServiceName) ? (string)__jsonCommunicationServiceName : (string)CommunicationServiceName; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="Dimension" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Dimension(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _displayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName; }
            { _internalName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("internalName"), out var __jsonInternalName) ? (string)__jsonInternalName : (string)InternalName; }
            { _toBeExportedForShoebox = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonBoolean>("toBeExportedForShoebox"), out var __jsonToBeExportedForShoebox) ? (bool?)__jsonToBeExportedForShoebox : ToBeExportedForShoebox; }
            AfterFromJson(json);
        }
Esempio n. 9
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="OperationDisplay" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _primaryKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("primaryKey"), out var __jsonPrimaryKey) ? (string)__jsonPrimaryKey : (string)PrimaryKey; }
            { _secondaryKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("secondaryKey"), out var __jsonSecondaryKey) ? (string)__jsonSecondaryKey : (string)SecondaryKey; }
            { _primaryConnectionString = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("primaryConnectionString"), out var __jsonPrimaryConnectionString) ? (string)__jsonPrimaryConnectionString : (string)PrimaryConnectionString; }
            { _secondaryConnectionString = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("secondaryConnectionString"), out var __jsonSecondaryConnectionString) ? (string)__jsonSecondaryConnectionString : (string)SecondaryConnectionString; }
            AfterFromJson(json);
        }
Esempio n. 12
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="ErrorDetail" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resource         = new Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20.Resource(json);
            __locationResource = new Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.LocationResource(json);
            __taggedResource   = new Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.TaggedResource(json);
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.CommunicationServiceProperties.FromJson(__jsonProperties) : Property; }
            { _systemData = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject>("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData; }
            AfterFromJson(json);
        }
Esempio n. 14
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="Operation" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Operation(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _keyType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("keyType"), out var __jsonKeyType) ? (string)__jsonKeyType : (string)KeyType; }
            AfterFromJson(json);
        }
Esempio n. 16
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="ErrorResponse" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _serviceSpecification = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject>("serviceSpecification"), out var __jsonServiceSpecification) ? Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820Preview.ServiceSpecification.FromJson(__jsonServiceSpecification) : ServiceSpecification; }
            AfterFromJson(json);
        }
Esempio n. 19
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="ServiceSpecification" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ServiceSpecification(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _metricSpecification = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonArray>("metricSpecifications"), out var __jsonMetricSpecifications) ? If(__jsonMetricSpecifications as Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820Preview.IMetricSpecification[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820Preview.IMetricSpecification)(Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820Preview.MetricSpecification.FromJson(__u)))))() : null : MetricSpecification; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="TaggedResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal TaggedResource(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.TaggedResourceTags.FromJson(__jsonTags) : Tag; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="MetricSpecification" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal MetricSpecification(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _displayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName; }
            { _displayDescription = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("displayDescription"), out var __jsonDisplayDescription) ? (string)__jsonDisplayDescription : (string)DisplayDescription; }
            { _unit = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit; }
            { _aggregationType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("aggregationType"), out var __jsonAggregationType) ? (string)__jsonAggregationType : (string)AggregationType; }
            { _fillGapWithZero = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("fillGapWithZero"), out var __jsonFillGapWithZero) ? (string)__jsonFillGapWithZero : (string)FillGapWithZero; }
            { _category = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("category"), out var __jsonCategory) ? (string)__jsonCategory : (string)Category; }
            { _dimension = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonArray>("dimensions"), out var __jsonDimensions) ? If(__jsonDimensions as Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820Preview.IDimension[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820Preview.IDimension)(Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820Preview.Dimension.FromJson(__u)))))() : null : Dimension; }
            AfterFromJson(json);
        }
Esempio n. 22
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="SystemData" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _error = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820Preview.ErrorResponse.FromJson(__jsonError) : Error; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _status = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status; }
            { _startTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime; }
            { _endTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime; }
            { _percentComplete = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonNumber>("percentComplete"), out var __jsonPercentComplete) ? (float?)__jsonPercentComplete : PercentComplete; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject into a new instance of <see cref="CommunicationServiceProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CommunicationServiceProperties(Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _hostName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName; }
            { _dataLocation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("dataLocation"), out var __jsonDataLocation) ? (string)__jsonDataLocation : (string)DataLocation; }
            { _notificationHubId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("notificationHubId"), out var __jsonNotificationHubId) ? (string)__jsonNotificationHubId : (string)NotificationHubId; }
            { _version = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version; }
            { _immutableResourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Json.JsonString>("immutableResourceId"), out var __jsonImmutableResourceId) ? (string)__jsonImmutableResourceId : (string)ImmutableResourceId; }
            AfterFromJson(json);
        }