/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="Any" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal Any(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="Sku" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal Sku(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="TrackedResourceTags" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> /// <param name="exclusions"></param> internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet <string> exclusions = null) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.JsonSerializable.FromJson(json, ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IAssociativeArray <string>) this).AdditionalProperties, null, exclusions); AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="ValidationResult" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal ValidationResult(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _status = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="Error" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal Error(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _error1 = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAutoGenerated.FromJson(__jsonError) : Error1; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="BotResponseList" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal BotResponseList(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; } { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot)(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBot.FromJson(__u)))))() : null : Value; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="HealthBotUpdateParameters" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal HealthBotUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _sku = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject>("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Sku.FromJson(__jsonSku) : Sku; } { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBotUpdateParametersTags.FromJson(__jsonTags) : Tag; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="ErrorAdditionalInfo" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; } { _info = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject>("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Any.FromJson(__jsonInfo) : Info; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="HealthBotProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal HealthBotProperties(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; } { _botManagementPortalLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("botManagementPortalLink"), out var __jsonBotManagementPortalLink) ? (string)__jsonBotManagementPortalLink : (string)BotManagementPortalLink; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="TrackedResource" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Resource(json); { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.TrackedResourceTags.FromJson(__jsonTags) : Tag; } { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="HealthBot" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal HealthBot(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.TrackedResource(json); { _sku = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject>("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Sku.FromJson(__jsonSku) : Sku; } { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBotProperties.FromJson(__jsonProperties) : Property; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="Resource" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal Resource(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _systemData = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject>("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.SystemData.FromJson(__jsonSystemData) : SystemData; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="HealthBotIdentity" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal HealthBotIdentity(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; } { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; } { _botName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("botName"), out var __jsonBotName) ? (string)__jsonBotName : (string)BotName; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="OperationDisplay" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _provider = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider; } { _resource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource; } { _operation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation; } { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="ErrorAutoGenerated" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal ErrorAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; } { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; } { _target = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target; } { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonArray>("details"), out var __jsonDetails) ? If(__jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError)(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Error.FromJson(__u)))))() : null : Detail; } { _additionalInfo = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonArray>("additionalInfo"), out var __jsonAdditionalInfo) ? If(__jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo)(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAdditionalInfo.FromJson(__p)))))() : null : AdditionalInfo; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="OperationDetail" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal OperationDetail(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.OperationDisplay.FromJson(__jsonDisplay) : Display; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _isDataAction = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonBoolean>("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction; } { _origin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin; } { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Any.FromJson(__jsonProperties) : Property; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject into a new instance of <see cref="SystemData" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject instance to deserialize from.</param> internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _createdBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy; } { _createdByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType; } { _createdAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.Json.JsonString>("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy; } { _lastModifiedByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString>("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType; } { _lastModifiedAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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); }
/// <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.HealthBot.Runtime.Json.JsonObject container, ref bool returnNow);
/// <summary> /// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <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.HealthBot.Runtime.Json.JsonObject json, ref bool returnNow);
/// <summary> /// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.Json.JsonObject container);
/// <summary> /// <c>AfterFromJson</c> will be called after the json deserialization has finished, allowing customization of the object /// before it is returned. Implement this method in a partial class to enable this behavior /// </summary> /// <param name="json">The JsonNode that should be deserialized into this object.</param> partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json);
/// <summary> /// Serializes this instance of <see cref="Any" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="Any" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ValidationResult" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ValidationResult" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._status.ToString()) : null, "status", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="TrackedResourceTags" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="TrackedResourceTags" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IAssociativeArray <string>) this).AdditionalProperties, container); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="HealthBotProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="HealthBotProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._botManagementPortalLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._botManagementPortalLink.ToString()) : null, "botManagementPortalLink", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="HealthBotIdentity" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="HealthBotIdentity" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId", container.Add); AddIf(null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName", container.Add); AddIf(null != (((object)this._botName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._botName.ToString()) : null, "botName", container.Add); AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="Resource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="Resource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) this._systemData.ToJson(null, serializationMode) : null, "systemData", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ErrorAutoGenerated" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ErrorAutoGenerated" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._target.ToString()) : null, "target", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._detail) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.XNodeArray(); foreach (var __x in this._detail) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("details", __w); } } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._additionalInfo) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.XNodeArray(); foreach (var __s in this._additionalInfo) { AddIf(__s?.ToJson(null, serializationMode), __r.Add); } container.Add("additionalInfo", __r); } } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="BotResponseList" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="BotResponseList" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.XNodeArray(); foreach (var __x in this._value) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("value", __w); } } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="HealthBot" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.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.HealthBot.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="HealthBot" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } __trackedResource?.ToJson(container, serializationMode); AddIf(null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) this._sku.ToJson(null, serializationMode) : null, "sku", container.Add); AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); AfterToJson(ref container); return(container); }