/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject into a new instance of <see cref="WebChatSite" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject instance to deserialize from.</param> internal WebChatSite(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _siteId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("siteId"), out var __jsonSiteId) ? (string)__jsonSiteId : (string)SiteId; } { _siteName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("siteName"), out var __jsonSiteName) ? (string)__jsonSiteName : (string)SiteName; } { _key = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("key"), out var __jsonKey) ? (string)__jsonKey : (string)Key; } { _key2 = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("key2"), out var __jsonKey2) ? (string)__jsonKey2 : (string)Key2; } { _isEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("isEnabled"), out var __jsonIsEnabled) ? (bool)__jsonIsEnabled : IsEnabled; } { _enablePreview = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("enablePreview"), out var __jsonEnablePreview) ? (bool)__jsonEnablePreview : EnablePreview; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject into a new instance of <see cref="ServiceProviderProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject instance to deserialize from.</param> internal ServiceProviderProperties(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _displayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName; } { _serviceProviderName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("serviceProviderName"), out var __jsonServiceProviderName) ? (string)__jsonServiceProviderName : (string)ServiceProviderName; } { _devPortalUrl = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("devPortalUrl"), out var __jsonDevPortalUrl) ? (string)__jsonDevPortalUrl : (string)DevPortalUrl; } { _iconUrl = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("iconUrl"), out var __jsonIconUrl) ? (string)__jsonIconUrl : (string)IconUrl; } { _parameter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray>("parameters"), out var __jsonParameters) ? If(__jsonParameters as Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IServiceProviderParameter[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IServiceProviderParameter)(Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.ServiceProviderParameter.FromJson(__u)))))() : null : Parameter; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject into a new instance of <see cref="FacebookChannelProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject instance to deserialize from.</param> internal FacebookChannelProperties(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _verifyToken = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("verifyToken"), out var __jsonVerifyToken) ? (string)__jsonVerifyToken : (string)VerifyToken; } { _page = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray>("pages"), out var __jsonPages) ? If(__jsonPages as Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IFacebookPage[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IFacebookPage)(Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.FacebookPage.FromJson(__u)))))() : null : Page; } { _appId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("appId"), out var __jsonAppId) ? (string)__jsonAppId : (string)AppId; } { _appSecret = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("appSecret"), out var __jsonAppSecret) ? (string)__jsonAppSecret : (string)AppSecret; } { _callbackUrl = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("callbackUrl"), out var __jsonCallbackUrl) ? (string)__jsonCallbackUrl : (string)CallbackUrl; } { _isEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("isEnabled"), out var __jsonIsEnabled) ? (bool)__jsonIsEnabled : IsEnabled; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject into a new instance of <see cref="ConnectionSettingProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject instance to deserialize from.</param> internal ConnectionSettingProperties(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _clientId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId; } { _settingId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("settingId"), out var __jsonSettingId) ? (string)__jsonSettingId : (string)SettingId; } { _clientSecret = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("clientSecret"), out var __jsonClientSecret) ? (string)__jsonClientSecret : (string)ClientSecret; } { _scope = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("scopes"), out var __jsonScopes) ? (string)__jsonScopes : (string)Scope; } { _serviceProviderId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("serviceProviderId"), out var __jsonServiceProviderId) ? (string)__jsonServiceProviderId : (string)ServiceProviderId; } { _serviceProviderDisplayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("serviceProviderDisplayName"), out var __jsonServiceProviderDisplayName) ? (string)__jsonServiceProviderDisplayName : (string)ServiceProviderDisplayName; } { _parameter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray>("parameters"), out var __jsonParameters) ? If(__jsonParameters as Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IConnectionSettingParameter[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IConnectionSettingParameter)(Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.ConnectionSettingParameter.FromJson(__u)))))() : null : Parameter; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject into a new instance of <see cref="Resource" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject instance to deserialize from.</param> internal Resource(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _sku = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject>("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.Sku.FromJson(__jsonSku) : Sku; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; } { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; } { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.ResourceTags.FromJson(__jsonTags) : Tag; } { _kind = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind; } { _etag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)Etag; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject into a new instance of <see cref="SkypeChannelProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject instance to deserialize from.</param> internal SkypeChannelProperties(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _enableMessaging = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("enableMessaging"), out var __jsonEnableMessaging) ? (bool?)__jsonEnableMessaging : EnableMessaging; } { _enableMediaCard = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("enableMediaCards"), out var __jsonEnableMediaCards) ? (bool?)__jsonEnableMediaCards : EnableMediaCard; } { _enableVideo = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("enableVideo"), out var __jsonEnableVideo) ? (bool?)__jsonEnableVideo : EnableVideo; } { _enableCalling = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("enableCalling"), out var __jsonEnableCalling) ? (bool?)__jsonEnableCalling : EnableCalling; } { _enableScreenSharing = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("enableScreenSharing"), out var __jsonEnableScreenSharing) ? (bool?)__jsonEnableScreenSharing : EnableScreenSharing; } { _enableGroup = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("enableGroups"), out var __jsonEnableGroups) ? (bool?)__jsonEnableGroups : EnableGroup; } { _groupsMode = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("groupsMode"), out var __jsonGroupsMode) ? (string)__jsonGroupsMode : (string)GroupsMode; } { _callingWebHook = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("callingWebHook"), out var __jsonCallingWebHook) ? (string)__jsonCallingWebHook : (string)CallingWebHook; } { _isEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("isEnabled"), out var __jsonIsEnabled) ? (bool)__jsonIsEnabled : IsEnabled; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject into a new instance of <see cref="SlackChannelProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject instance to deserialize from.</param> internal SlackChannelProperties(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _clientId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId; } { _clientSecret = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("clientSecret"), out var __jsonClientSecret) ? (string)__jsonClientSecret : (string)ClientSecret; } { _verificationToken = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("verificationToken"), out var __jsonVerificationToken) ? (string)__jsonVerificationToken : (string)VerificationToken; } { _landingPageUrl = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("landingPageUrl"), out var __jsonLandingPageUrl) ? (string)__jsonLandingPageUrl : (string)LandingPageUrl; } { _redirectAction = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("redirectAction"), out var __jsonRedirectAction) ? (string)__jsonRedirectAction : (string)RedirectAction; } { _lastSubmissionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("lastSubmissionId"), out var __jsonLastSubmissionId) ? (string)__jsonLastSubmissionId : (string)LastSubmissionId; } { _registerBeforeOAuthFlow = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("registerBeforeOAuthFlow"), out var __jsonRegisterBeforeOAuthFlow) ? (bool?)__jsonRegisterBeforeOAuthFlow : RegisterBeforeOAuthFlow; } { _isValidated = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("isValidated"), out var __jsonIsValidated) ? (bool?)__jsonIsValidated : IsValidated; } { _isEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("isEnabled"), out var __jsonIsEnabled) ? (bool)__jsonIsEnabled : IsEnabled; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject into a new instance of <see cref="DirectLineSite" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject instance to deserialize from.</param> internal DirectLineSite(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _siteId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("siteId"), out var __jsonSiteId) ? (string)__jsonSiteId : (string)SiteId; } { _siteName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("siteName"), out var __jsonSiteName) ? (string)__jsonSiteName : (string)SiteName; } { _key = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("key"), out var __jsonKey) ? (string)__jsonKey : (string)Key; } { _key2 = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("key2"), out var __jsonKey2) ? (string)__jsonKey2 : (string)Key2; } { _isEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("isEnabled"), out var __jsonIsEnabled) ? (bool)__jsonIsEnabled : IsEnabled; } { _isV1Enabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("isV1Enabled"), out var __jsonIsV1Enabled) ? (bool)__jsonIsV1Enabled : IsV1Enabled; } { _isV3Enabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("isV3Enabled"), out var __jsonIsV3Enabled) ? (bool)__jsonIsV3Enabled : IsV3Enabled; } { _isSecureSiteEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean>("isSecureSiteEnabled"), out var __jsonIsSecureSiteEnabled) ? (bool?)__jsonIsSecureSiteEnabled : IsSecureSiteEnabled; } { _trustedOrigin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray>("trustedOrigins"), out var __jsonTrustedOrigins) ? If(__jsonTrustedOrigins as Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : TrustedOrigin; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject into a new instance of <see cref="BotProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject instance to deserialize from.</param> internal BotProperties(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _displayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName; } { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; } { _iconUrl = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("iconUrl"), out var __jsonIconUrl) ? (string)__jsonIconUrl : (string)IconUrl; } { _endpoint = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)Endpoint; } { _endpointVersion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("endpointVersion"), out var __jsonEndpointVersion) ? (string)__jsonEndpointVersion : (string)EndpointVersion; } { _msaAppId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("msaAppId"), out var __jsonMsaAppId) ? (string)__jsonMsaAppId : (string)MsaAppId; } { _configuredChannel = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray>("configuredChannels"), out var __jsonConfiguredChannels) ? If(__jsonConfiguredChannels as Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : ConfiguredChannel; } { _enabledChannel = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray>("enabledChannels"), out var __jsonEnabledChannels) ? If(__jsonEnabledChannels as Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (string)(__p is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null))))() : null : EnabledChannel; } { _developerAppInsightKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("developerAppInsightKey"), out var __jsonDeveloperAppInsightKey) ? (string)__jsonDeveloperAppInsightKey : (string)DeveloperAppInsightKey; } { _developerAppInsightsApiKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("developerAppInsightsApiKey"), out var __jsonDeveloperAppInsightsApiKey) ? (string)__jsonDeveloperAppInsightsApiKey : (string)DeveloperAppInsightsApiKey; } { _developerAppInsightsApplicationId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("developerAppInsightsApplicationId"), out var __jsonDeveloperAppInsightsApplicationId) ? (string)__jsonDeveloperAppInsightsApplicationId : (string)DeveloperAppInsightsApplicationId; } { _luisAppId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray>("luisAppIds"), out var __jsonLuisAppIds) ? If(__jsonLuisAppIds as Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonArray, out var __l) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k) => (string)(__k is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null))))() : null : LuisAppId; } { _luisKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString>("luisKey"), out var __jsonLuisKey) ? (string)__jsonLuisKey : (string)LuisKey; } AfterFromJson(json); }
/// <summary> /// Serializes this instance of <see cref="ServiceProviderProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ServiceProviderProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._serviceProviderName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._serviceProviderName.ToString()) : null, "serviceProviderName", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._devPortalUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._devPortalUrl.ToString()) : null, "devPortalUrl", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._iconUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._iconUrl.ToString()) : null, "iconUrl", container.Add); } if (null != this._parameter) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.XNodeArray(); foreach (var __x in this._parameter) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("parameters", __w); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="EmailChannelProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="EmailChannelProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._emailAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._emailAddress.ToString()) : null, "emailAddress", container.Add); AddIf(null != (((object)this._password)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._password.ToString()) : null, "password", container.Add); AddIf((Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean(this._isEnabled), "isEnabled", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="TelegramChannelProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="TelegramChannelProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._accessToken)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._accessToken.ToString()) : null, "accessToken", container.Add); AddIf(null != this._isValidated ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean((bool)this._isValidated) : null, "isValidated", container.Add); AddIf((Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean(this._isEnabled), "isEnabled", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="DirectLineChannelProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="DirectLineChannelProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (null != this._site) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.XNodeArray(); foreach (var __x in this._site) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("sites", __w); } AfterToJson(ref container); return(container); }
/// <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 <paramref name="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.BotService.Runtime.Json.JsonObject container, ref bool returnNow);
/// <summary> /// <c>AfterToJson</c> will be called after the json serialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.Json.JsonObject container);
/// <summary> /// Serializes this instance of <see cref="BotProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="BotProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName", container.Add); AddIf(null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add); AddIf(null != (((object)this._iconUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._iconUrl.ToString()) : null, "iconUrl", container.Add); AddIf(null != (((object)this._endpoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._endpoint.ToString()) : null, "endpoint", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._endpointVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._endpointVersion.ToString()) : null, "endpointVersion", container.Add); } AddIf(null != (((object)this._msaAppId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._msaAppId.ToString()) : null, "msaAppId", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._configuredChannel) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.XNodeArray(); foreach (var __x in this._configuredChannel) { AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add); } container.Add("configuredChannels", __w); } } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._enabledChannel) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.XNodeArray(); foreach (var __s in this._enabledChannel) { AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add); } container.Add("enabledChannels", __r); } } AddIf(null != (((object)this._developerAppInsightKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._developerAppInsightKey.ToString()) : null, "developerAppInsightKey", container.Add); AddIf(null != (((object)this._developerAppInsightsApiKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._developerAppInsightsApiKey.ToString()) : null, "developerAppInsightsApiKey", container.Add); AddIf(null != (((object)this._developerAppInsightsApplicationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._developerAppInsightsApplicationId.ToString()) : null, "developerAppInsightsApplicationId", container.Add); if (null != this._luisAppId) { var __m = new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.XNodeArray(); foreach (var __n in this._luisAppId) { AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(__n.ToString()) : null, __m.Add); } container.Add("luisAppIds", __m); } AddIf(null != (((object)this._luisKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._luisKey.ToString()) : null, "luisKey", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="SlackChannelProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="SlackChannelProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._clientId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._clientId.ToString()) : null, "clientId", container.Add); AddIf(null != (((object)this._clientSecret)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._clientSecret.ToString()) : null, "clientSecret", container.Add); AddIf(null != (((object)this._verificationToken)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._verificationToken.ToString()) : null, "verificationToken", container.Add); AddIf(null != (((object)this._landingPageUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._landingPageUrl.ToString()) : null, "landingPageUrl", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._redirectAction)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._redirectAction.ToString()) : null, "redirectAction", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._lastSubmissionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._lastSubmissionId.ToString()) : null, "lastSubmissionId", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._registerBeforeOAuthFlow ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean((bool)this._registerBeforeOAuthFlow) : null, "registerBeforeOAuthFlow", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._isValidated ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean((bool)this._isValidated) : null, "isValidated", container.Add); } AddIf((Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean(this._isEnabled), "isEnabled", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="DirectLineSite" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="DirectLineSite" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._siteId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._siteId.ToString()) : null, "siteId", container.Add); } AddIf(null != (((object)this._siteName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._siteName.ToString()) : null, "siteName", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._key)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._key.ToString()) : null, "key", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._key2)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._key2.ToString()) : null, "key2", container.Add); } AddIf((Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean(this._isEnabled), "isEnabled", container.Add); AddIf((Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean(this._isV1Enabled), "isV1Enabled", container.Add); AddIf((Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean(this._isV3Enabled), "isV3Enabled", container.Add); AddIf(null != this._isSecureSiteEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean((bool)this._isSecureSiteEnabled) : null, "isSecureSiteEnabled", container.Add); if (null != this._trustedOrigin) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.XNodeArray(); foreach (var __x in this._trustedOrigin) { AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add); } container.Add("trustedOrigins", __w); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ConnectionSettingParameter" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ConnectionSettingParameter" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._key)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._key.ToString()) : null, "key", container.Add); AddIf(null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._value.ToString()) : null, "value", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OperationEntity" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationEntity" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) this._display.ToJson(null, serializationMode) : null, "display", container.Add); AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); AddIf(null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin", container.Add); AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="FacebookChannelProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="FacebookChannelProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._verifyToken)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._verifyToken.ToString()) : null, "verifyToken", container.Add); } if (null != this._page) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.XNodeArray(); foreach (var __x in this._page) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("pages", __w); } AddIf(null != (((object)this._appId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._appId.ToString()) : null, "appId", container.Add); AddIf(null != (((object)this._appSecret)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._appSecret.ToString()) : null, "appSecret", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._callbackUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._callbackUrl.ToString()) : null, "callbackUrl", container.Add); } AddIf((Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonBoolean(this._isEnabled), "isEnabled", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="MSTeamsChannel" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="MSTeamsChannel" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } __channel?.ToJson(container, serializationMode); AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OperationDisplayInfo" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationDisplayInfo" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add); AddIf(null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation", container.Add); AddIf(null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider", container.Add); AddIf(null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ConnectionItemName" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ConnectionItemName" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.Json.JsonObject json);
/// <summary> /// Serializes this instance of <see cref="Any" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="Any" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AfterToJson(ref container); return(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 <paramref name= "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.BotService.Runtime.Json.JsonObject json, ref bool returnNow);
/// <summary> /// Serializes this instance of <see cref="Resource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="Resource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) this._sku.ToJson(null, serializationMode) : null, "sku", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); } AddIf(null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._location.ToString()) : null, "location", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add); } AddIf(null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) this._tag.ToJson(null, serializationMode) : null, "tags", container.Add); AddIf(null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind", container.Add); AddIf(null != (((object)this._etag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._etag.ToString()) : null, "etag", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ServiceProviderResponseList" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ServiceProviderResponseList" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.BotService.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="ResourceTags" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.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.BotService.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ResourceTags" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.IAssociativeArray <string>) this).AdditionalProperties, container); AfterToJson(ref container); return(container); }