All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.botservice.models.BotProperties Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for BotService Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Bot Service is a platform for creating smart conversational agents. Package tag package-2021-03-01.

The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.botservice.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * The parameters to provide for the Bot.
 */
@Fluent
public final class BotProperties implements JsonSerializable {
    /*
     * The Name of the bot
     */
    private String displayName;

    /*
     * The description of the bot
     */
    private String description;

    /*
     * The Icon Url of the bot
     */
    private String iconUrl;

    /*
     * The bot's endpoint
     */
    private String endpoint;

    /*
     * The bot's endpoint version
     */
    private String endpointVersion;

    /*
     * Contains resource all settings defined as key/value pairs.
     */
    private Map allSettings;

    /*
     * Contains resource parameters defined as key/value pairs.
     */
    private Map parameters;

    /*
     * The bot's manifest url
     */
    private String manifestUrl;

    /*
     * Microsoft App Type for the bot
     */
    private MsaAppType msaAppType;

    /*
     * Microsoft App Id for the bot
     */
    private String msaAppId;

    /*
     * Microsoft App Tenant Id for the bot
     */
    private String msaAppTenantId;

    /*
     * Microsoft App Managed Identity Resource Id for the bot
     */
    private String msaAppMsiResourceId;

    /*
     * Collection of channels for which the bot is configured
     */
    private List configuredChannels;

    /*
     * Collection of channels for which the bot is enabled
     */
    private List enabledChannels;

    /*
     * The Application Insights key
     */
    private String developerAppInsightKey;

    /*
     * The Application Insights Api Key
     */
    private String developerAppInsightsApiKey;

    /*
     * The Application Insights App Id
     */
    private String developerAppInsightsApplicationId;

    /*
     * Collection of LUIS App Ids
     */
    private List luisAppIds;

    /*
     * The LUIS Key
     */
    private String luisKey;

    /*
     * Whether Cmek is enabled
     */
    private Boolean isCmekEnabled;

    /*
     * The CMK Url
     */
    private String cmekKeyVaultUrl;

    /*
     * The CMK encryption status
     */
    private String cmekEncryptionStatus;

    /*
     * The Tenant Id for the bot
     */
    private String tenantId;

    /*
     * Whether the bot is in an isolated network
     */
    private PublicNetworkAccess publicNetworkAccess;

    /*
     * Whether the bot is streaming supported
     */
    private Boolean isStreamingSupported;

    /*
     * Whether the bot is developerAppInsightsApiKey set
     */
    private Boolean isDeveloperAppInsightsApiKeySet;

    /*
     * Token used to migrate non Azure bot to azure subscription
     */
    private String migrationToken;

    /*
     * Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
     */
    private Boolean disableLocalAuth;

    /*
     * The channel schema transformation version for the bot
     */
    private String schemaTransformationVersion;

    /*
     * The storage resourceId for the bot
     */
    private String storageResourceId;

    /*
     * List of Private Endpoint Connections configured for the bot
     */
    private List privateEndpointConnections;

    /*
     * The hint to browser (e.g. protocol handler) on how to open the bot for authoring
     */
    private String openWithHint;

    /*
     * The hint (e.g. keyVault secret resourceId) on how to fetch the app secret
     */
    private String appPasswordHint;

    /*
     * Provisioning state of the resource
     */
    private String provisioningState;

    /*
     * Publishing credentials of the resource
     */
    private String publishingCredentials;

    /**
     * Creates an instance of BotProperties class.
     */
    public BotProperties() {
    }

    /**
     * Get the displayName property: The Name of the bot.
     * 
     * @return the displayName value.
     */
    public String displayName() {
        return this.displayName;
    }

    /**
     * Set the displayName property: The Name of the bot.
     * 
     * @param displayName the displayName value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withDisplayName(String displayName) {
        this.displayName = displayName;
        return this;
    }

    /**
     * Get the description property: The description of the bot.
     * 
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Set the description property: The description of the bot.
     * 
     * @param description the description value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * Get the iconUrl property: The Icon Url of the bot.
     * 
     * @return the iconUrl value.
     */
    public String iconUrl() {
        return this.iconUrl;
    }

    /**
     * Set the iconUrl property: The Icon Url of the bot.
     * 
     * @param iconUrl the iconUrl value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withIconUrl(String iconUrl) {
        this.iconUrl = iconUrl;
        return this;
    }

    /**
     * Get the endpoint property: The bot's endpoint.
     * 
     * @return the endpoint value.
     */
    public String endpoint() {
        return this.endpoint;
    }

    /**
     * Set the endpoint property: The bot's endpoint.
     * 
     * @param endpoint the endpoint value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withEndpoint(String endpoint) {
        this.endpoint = endpoint;
        return this;
    }

    /**
     * Get the endpointVersion property: The bot's endpoint version.
     * 
     * @return the endpointVersion value.
     */
    public String endpointVersion() {
        return this.endpointVersion;
    }

    /**
     * Get the allSettings property: Contains resource all settings defined as key/value pairs.
     * 
     * @return the allSettings value.
     */
    public Map allSettings() {
        return this.allSettings;
    }

    /**
     * Set the allSettings property: Contains resource all settings defined as key/value pairs.
     * 
     * @param allSettings the allSettings value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withAllSettings(Map allSettings) {
        this.allSettings = allSettings;
        return this;
    }

    /**
     * Get the parameters property: Contains resource parameters defined as key/value pairs.
     * 
     * @return the parameters value.
     */
    public Map parameters() {
        return this.parameters;
    }

    /**
     * Set the parameters property: Contains resource parameters defined as key/value pairs.
     * 
     * @param parameters the parameters value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withParameters(Map parameters) {
        this.parameters = parameters;
        return this;
    }

    /**
     * Get the manifestUrl property: The bot's manifest url.
     * 
     * @return the manifestUrl value.
     */
    public String manifestUrl() {
        return this.manifestUrl;
    }

    /**
     * Set the manifestUrl property: The bot's manifest url.
     * 
     * @param manifestUrl the manifestUrl value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withManifestUrl(String manifestUrl) {
        this.manifestUrl = manifestUrl;
        return this;
    }

    /**
     * Get the msaAppType property: Microsoft App Type for the bot.
     * 
     * @return the msaAppType value.
     */
    public MsaAppType msaAppType() {
        return this.msaAppType;
    }

    /**
     * Set the msaAppType property: Microsoft App Type for the bot.
     * 
     * @param msaAppType the msaAppType value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withMsaAppType(MsaAppType msaAppType) {
        this.msaAppType = msaAppType;
        return this;
    }

    /**
     * Get the msaAppId property: Microsoft App Id for the bot.
     * 
     * @return the msaAppId value.
     */
    public String msaAppId() {
        return this.msaAppId;
    }

    /**
     * Set the msaAppId property: Microsoft App Id for the bot.
     * 
     * @param msaAppId the msaAppId value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withMsaAppId(String msaAppId) {
        this.msaAppId = msaAppId;
        return this;
    }

    /**
     * Get the msaAppTenantId property: Microsoft App Tenant Id for the bot.
     * 
     * @return the msaAppTenantId value.
     */
    public String msaAppTenantId() {
        return this.msaAppTenantId;
    }

    /**
     * Set the msaAppTenantId property: Microsoft App Tenant Id for the bot.
     * 
     * @param msaAppTenantId the msaAppTenantId value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withMsaAppTenantId(String msaAppTenantId) {
        this.msaAppTenantId = msaAppTenantId;
        return this;
    }

    /**
     * Get the msaAppMsiResourceId property: Microsoft App Managed Identity Resource Id for the bot.
     * 
     * @return the msaAppMsiResourceId value.
     */
    public String msaAppMsiResourceId() {
        return this.msaAppMsiResourceId;
    }

    /**
     * Set the msaAppMsiResourceId property: Microsoft App Managed Identity Resource Id for the bot.
     * 
     * @param msaAppMsiResourceId the msaAppMsiResourceId value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withMsaAppMsiResourceId(String msaAppMsiResourceId) {
        this.msaAppMsiResourceId = msaAppMsiResourceId;
        return this;
    }

    /**
     * Get the configuredChannels property: Collection of channels for which the bot is configured.
     * 
     * @return the configuredChannels value.
     */
    public List configuredChannels() {
        return this.configuredChannels;
    }

    /**
     * Get the enabledChannels property: Collection of channels for which the bot is enabled.
     * 
     * @return the enabledChannels value.
     */
    public List enabledChannels() {
        return this.enabledChannels;
    }

    /**
     * Get the developerAppInsightKey property: The Application Insights key.
     * 
     * @return the developerAppInsightKey value.
     */
    public String developerAppInsightKey() {
        return this.developerAppInsightKey;
    }

    /**
     * Set the developerAppInsightKey property: The Application Insights key.
     * 
     * @param developerAppInsightKey the developerAppInsightKey value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withDeveloperAppInsightKey(String developerAppInsightKey) {
        this.developerAppInsightKey = developerAppInsightKey;
        return this;
    }

    /**
     * Get the developerAppInsightsApiKey property: The Application Insights Api Key.
     * 
     * @return the developerAppInsightsApiKey value.
     */
    public String developerAppInsightsApiKey() {
        return this.developerAppInsightsApiKey;
    }

    /**
     * Set the developerAppInsightsApiKey property: The Application Insights Api Key.
     * 
     * @param developerAppInsightsApiKey the developerAppInsightsApiKey value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withDeveloperAppInsightsApiKey(String developerAppInsightsApiKey) {
        this.developerAppInsightsApiKey = developerAppInsightsApiKey;
        return this;
    }

    /**
     * Get the developerAppInsightsApplicationId property: The Application Insights App Id.
     * 
     * @return the developerAppInsightsApplicationId value.
     */
    public String developerAppInsightsApplicationId() {
        return this.developerAppInsightsApplicationId;
    }

    /**
     * Set the developerAppInsightsApplicationId property: The Application Insights App Id.
     * 
     * @param developerAppInsightsApplicationId the developerAppInsightsApplicationId value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withDeveloperAppInsightsApplicationId(String developerAppInsightsApplicationId) {
        this.developerAppInsightsApplicationId = developerAppInsightsApplicationId;
        return this;
    }

    /**
     * Get the luisAppIds property: Collection of LUIS App Ids.
     * 
     * @return the luisAppIds value.
     */
    public List luisAppIds() {
        return this.luisAppIds;
    }

    /**
     * Set the luisAppIds property: Collection of LUIS App Ids.
     * 
     * @param luisAppIds the luisAppIds value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withLuisAppIds(List luisAppIds) {
        this.luisAppIds = luisAppIds;
        return this;
    }

    /**
     * Get the luisKey property: The LUIS Key.
     * 
     * @return the luisKey value.
     */
    public String luisKey() {
        return this.luisKey;
    }

    /**
     * Set the luisKey property: The LUIS Key.
     * 
     * @param luisKey the luisKey value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withLuisKey(String luisKey) {
        this.luisKey = luisKey;
        return this;
    }

    /**
     * Get the isCmekEnabled property: Whether Cmek is enabled.
     * 
     * @return the isCmekEnabled value.
     */
    public Boolean isCmekEnabled() {
        return this.isCmekEnabled;
    }

    /**
     * Set the isCmekEnabled property: Whether Cmek is enabled.
     * 
     * @param isCmekEnabled the isCmekEnabled value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withIsCmekEnabled(Boolean isCmekEnabled) {
        this.isCmekEnabled = isCmekEnabled;
        return this;
    }

    /**
     * Get the cmekKeyVaultUrl property: The CMK Url.
     * 
     * @return the cmekKeyVaultUrl value.
     */
    public String cmekKeyVaultUrl() {
        return this.cmekKeyVaultUrl;
    }

    /**
     * Set the cmekKeyVaultUrl property: The CMK Url.
     * 
     * @param cmekKeyVaultUrl the cmekKeyVaultUrl value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withCmekKeyVaultUrl(String cmekKeyVaultUrl) {
        this.cmekKeyVaultUrl = cmekKeyVaultUrl;
        return this;
    }

    /**
     * Get the cmekEncryptionStatus property: The CMK encryption status.
     * 
     * @return the cmekEncryptionStatus value.
     */
    public String cmekEncryptionStatus() {
        return this.cmekEncryptionStatus;
    }

    /**
     * Get the tenantId property: The Tenant Id for the bot.
     * 
     * @return the tenantId value.
     */
    public String tenantId() {
        return this.tenantId;
    }

    /**
     * Set the tenantId property: The Tenant Id for the bot.
     * 
     * @param tenantId the tenantId value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withTenantId(String tenantId) {
        this.tenantId = tenantId;
        return this;
    }

    /**
     * Get the publicNetworkAccess property: Whether the bot is in an isolated network.
     * 
     * @return the publicNetworkAccess value.
     */
    public PublicNetworkAccess publicNetworkAccess() {
        return this.publicNetworkAccess;
    }

    /**
     * Set the publicNetworkAccess property: Whether the bot is in an isolated network.
     * 
     * @param publicNetworkAccess the publicNetworkAccess value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
        this.publicNetworkAccess = publicNetworkAccess;
        return this;
    }

    /**
     * Get the isStreamingSupported property: Whether the bot is streaming supported.
     * 
     * @return the isStreamingSupported value.
     */
    public Boolean isStreamingSupported() {
        return this.isStreamingSupported;
    }

    /**
     * Set the isStreamingSupported property: Whether the bot is streaming supported.
     * 
     * @param isStreamingSupported the isStreamingSupported value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withIsStreamingSupported(Boolean isStreamingSupported) {
        this.isStreamingSupported = isStreamingSupported;
        return this;
    }

    /**
     * Get the isDeveloperAppInsightsApiKeySet property: Whether the bot is developerAppInsightsApiKey set.
     * 
     * @return the isDeveloperAppInsightsApiKeySet value.
     */
    public Boolean isDeveloperAppInsightsApiKeySet() {
        return this.isDeveloperAppInsightsApiKeySet;
    }

    /**
     * Get the migrationToken property: Token used to migrate non Azure bot to azure subscription.
     * 
     * @return the migrationToken value.
     */
    public String migrationToken() {
        return this.migrationToken;
    }

    /**
     * Get the disableLocalAuth property: Opt-out of local authentication and ensure only MSI and AAD can be used
     * exclusively for authentication.
     * 
     * @return the disableLocalAuth value.
     */
    public Boolean disableLocalAuth() {
        return this.disableLocalAuth;
    }

    /**
     * Set the disableLocalAuth property: Opt-out of local authentication and ensure only MSI and AAD can be used
     * exclusively for authentication.
     * 
     * @param disableLocalAuth the disableLocalAuth value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withDisableLocalAuth(Boolean disableLocalAuth) {
        this.disableLocalAuth = disableLocalAuth;
        return this;
    }

    /**
     * Get the schemaTransformationVersion property: The channel schema transformation version for the bot.
     * 
     * @return the schemaTransformationVersion value.
     */
    public String schemaTransformationVersion() {
        return this.schemaTransformationVersion;
    }

    /**
     * Set the schemaTransformationVersion property: The channel schema transformation version for the bot.
     * 
     * @param schemaTransformationVersion the schemaTransformationVersion value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withSchemaTransformationVersion(String schemaTransformationVersion) {
        this.schemaTransformationVersion = schemaTransformationVersion;
        return this;
    }

    /**
     * Get the storageResourceId property: The storage resourceId for the bot.
     * 
     * @return the storageResourceId value.
     */
    public String storageResourceId() {
        return this.storageResourceId;
    }

    /**
     * Set the storageResourceId property: The storage resourceId for the bot.
     * 
     * @param storageResourceId the storageResourceId value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withStorageResourceId(String storageResourceId) {
        this.storageResourceId = storageResourceId;
        return this;
    }

    /**
     * Get the privateEndpointConnections property: List of Private Endpoint Connections configured for the bot.
     * 
     * @return the privateEndpointConnections value.
     */
    public List privateEndpointConnections() {
        return this.privateEndpointConnections;
    }

    /**
     * Get the openWithHint property: The hint to browser (e.g. protocol handler) on how to open the bot for authoring.
     * 
     * @return the openWithHint value.
     */
    public String openWithHint() {
        return this.openWithHint;
    }

    /**
     * Set the openWithHint property: The hint to browser (e.g. protocol handler) on how to open the bot for authoring.
     * 
     * @param openWithHint the openWithHint value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withOpenWithHint(String openWithHint) {
        this.openWithHint = openWithHint;
        return this;
    }

    /**
     * Get the appPasswordHint property: The hint (e.g. keyVault secret resourceId) on how to fetch the app secret.
     * 
     * @return the appPasswordHint value.
     */
    public String appPasswordHint() {
        return this.appPasswordHint;
    }

    /**
     * Set the appPasswordHint property: The hint (e.g. keyVault secret resourceId) on how to fetch the app secret.
     * 
     * @param appPasswordHint the appPasswordHint value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withAppPasswordHint(String appPasswordHint) {
        this.appPasswordHint = appPasswordHint;
        return this;
    }

    /**
     * Get the provisioningState property: Provisioning state of the resource.
     * 
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the publishingCredentials property: Publishing credentials of the resource.
     * 
     * @return the publishingCredentials value.
     */
    public String publishingCredentials() {
        return this.publishingCredentials;
    }

    /**
     * Set the publishingCredentials property: Publishing credentials of the resource.
     * 
     * @param publishingCredentials the publishingCredentials value to set.
     * @return the BotProperties object itself.
     */
    public BotProperties withPublishingCredentials(String publishingCredentials) {
        this.publishingCredentials = publishingCredentials;
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (displayName() == null) {
            throw LOGGER.atError()
                .log(new IllegalArgumentException("Missing required property displayName in model BotProperties"));
        }
        if (endpoint() == null) {
            throw LOGGER.atError()
                .log(new IllegalArgumentException("Missing required property endpoint in model BotProperties"));
        }
        if (msaAppId() == null) {
            throw LOGGER.atError()
                .log(new IllegalArgumentException("Missing required property msaAppId in model BotProperties"));
        }
        if (privateEndpointConnections() != null) {
            privateEndpointConnections().forEach(e -> e.validate());
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(BotProperties.class);

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        jsonWriter.writeStringField("displayName", this.displayName);
        jsonWriter.writeStringField("endpoint", this.endpoint);
        jsonWriter.writeStringField("msaAppId", this.msaAppId);
        jsonWriter.writeStringField("description", this.description);
        jsonWriter.writeStringField("iconUrl", this.iconUrl);
        jsonWriter.writeMapField("allSettings", this.allSettings, (writer, element) -> writer.writeString(element));
        jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeString(element));
        jsonWriter.writeStringField("manifestUrl", this.manifestUrl);
        jsonWriter.writeStringField("msaAppType", this.msaAppType == null ? null : this.msaAppType.toString());
        jsonWriter.writeStringField("msaAppTenantId", this.msaAppTenantId);
        jsonWriter.writeStringField("msaAppMSIResourceId", this.msaAppMsiResourceId);
        jsonWriter.writeStringField("developerAppInsightKey", this.developerAppInsightKey);
        jsonWriter.writeStringField("developerAppInsightsApiKey", this.developerAppInsightsApiKey);
        jsonWriter.writeStringField("developerAppInsightsApplicationId", this.developerAppInsightsApplicationId);
        jsonWriter.writeArrayField("luisAppIds", this.luisAppIds, (writer, element) -> writer.writeString(element));
        jsonWriter.writeStringField("luisKey", this.luisKey);
        jsonWriter.writeBooleanField("isCmekEnabled", this.isCmekEnabled);
        jsonWriter.writeStringField("cmekKeyVaultUrl", this.cmekKeyVaultUrl);
        jsonWriter.writeStringField("tenantId", this.tenantId);
        jsonWriter.writeStringField("publicNetworkAccess",
            this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString());
        jsonWriter.writeBooleanField("isStreamingSupported", this.isStreamingSupported);
        jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth);
        jsonWriter.writeStringField("schemaTransformationVersion", this.schemaTransformationVersion);
        jsonWriter.writeStringField("storageResourceId", this.storageResourceId);
        jsonWriter.writeStringField("openWithHint", this.openWithHint);
        jsonWriter.writeStringField("appPasswordHint", this.appPasswordHint);
        jsonWriter.writeStringField("publishingCredentials", this.publishingCredentials);
        return jsonWriter.writeEndObject();
    }

    /**
     * Reads an instance of BotProperties from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of BotProperties if the JsonReader was pointing to an instance of it, or null if it was
     * pointing to JSON null.
     * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
     * @throws IOException If an error occurs while reading the BotProperties.
     */
    public static BotProperties fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            BotProperties deserializedBotProperties = new BotProperties();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("displayName".equals(fieldName)) {
                    deserializedBotProperties.displayName = reader.getString();
                } else if ("endpoint".equals(fieldName)) {
                    deserializedBotProperties.endpoint = reader.getString();
                } else if ("msaAppId".equals(fieldName)) {
                    deserializedBotProperties.msaAppId = reader.getString();
                } else if ("description".equals(fieldName)) {
                    deserializedBotProperties.description = reader.getString();
                } else if ("iconUrl".equals(fieldName)) {
                    deserializedBotProperties.iconUrl = reader.getString();
                } else if ("endpointVersion".equals(fieldName)) {
                    deserializedBotProperties.endpointVersion = reader.getString();
                } else if ("allSettings".equals(fieldName)) {
                    Map allSettings = reader.readMap(reader1 -> reader1.getString());
                    deserializedBotProperties.allSettings = allSettings;
                } else if ("parameters".equals(fieldName)) {
                    Map parameters = reader.readMap(reader1 -> reader1.getString());
                    deserializedBotProperties.parameters = parameters;
                } else if ("manifestUrl".equals(fieldName)) {
                    deserializedBotProperties.manifestUrl = reader.getString();
                } else if ("msaAppType".equals(fieldName)) {
                    deserializedBotProperties.msaAppType = MsaAppType.fromString(reader.getString());
                } else if ("msaAppTenantId".equals(fieldName)) {
                    deserializedBotProperties.msaAppTenantId = reader.getString();
                } else if ("msaAppMSIResourceId".equals(fieldName)) {
                    deserializedBotProperties.msaAppMsiResourceId = reader.getString();
                } else if ("configuredChannels".equals(fieldName)) {
                    List configuredChannels = reader.readArray(reader1 -> reader1.getString());
                    deserializedBotProperties.configuredChannels = configuredChannels;
                } else if ("enabledChannels".equals(fieldName)) {
                    List enabledChannels = reader.readArray(reader1 -> reader1.getString());
                    deserializedBotProperties.enabledChannels = enabledChannels;
                } else if ("developerAppInsightKey".equals(fieldName)) {
                    deserializedBotProperties.developerAppInsightKey = reader.getString();
                } else if ("developerAppInsightsApiKey".equals(fieldName)) {
                    deserializedBotProperties.developerAppInsightsApiKey = reader.getString();
                } else if ("developerAppInsightsApplicationId".equals(fieldName)) {
                    deserializedBotProperties.developerAppInsightsApplicationId = reader.getString();
                } else if ("luisAppIds".equals(fieldName)) {
                    List luisAppIds = reader.readArray(reader1 -> reader1.getString());
                    deserializedBotProperties.luisAppIds = luisAppIds;
                } else if ("luisKey".equals(fieldName)) {
                    deserializedBotProperties.luisKey = reader.getString();
                } else if ("isCmekEnabled".equals(fieldName)) {
                    deserializedBotProperties.isCmekEnabled = reader.getNullable(JsonReader::getBoolean);
                } else if ("cmekKeyVaultUrl".equals(fieldName)) {
                    deserializedBotProperties.cmekKeyVaultUrl = reader.getString();
                } else if ("cmekEncryptionStatus".equals(fieldName)) {
                    deserializedBotProperties.cmekEncryptionStatus = reader.getString();
                } else if ("tenantId".equals(fieldName)) {
                    deserializedBotProperties.tenantId = reader.getString();
                } else if ("publicNetworkAccess".equals(fieldName)) {
                    deserializedBotProperties.publicNetworkAccess = PublicNetworkAccess.fromString(reader.getString());
                } else if ("isStreamingSupported".equals(fieldName)) {
                    deserializedBotProperties.isStreamingSupported = reader.getNullable(JsonReader::getBoolean);
                } else if ("isDeveloperAppInsightsApiKeySet".equals(fieldName)) {
                    deserializedBotProperties.isDeveloperAppInsightsApiKeySet
                        = reader.getNullable(JsonReader::getBoolean);
                } else if ("migrationToken".equals(fieldName)) {
                    deserializedBotProperties.migrationToken = reader.getString();
                } else if ("disableLocalAuth".equals(fieldName)) {
                    deserializedBotProperties.disableLocalAuth = reader.getNullable(JsonReader::getBoolean);
                } else if ("schemaTransformationVersion".equals(fieldName)) {
                    deserializedBotProperties.schemaTransformationVersion = reader.getString();
                } else if ("storageResourceId".equals(fieldName)) {
                    deserializedBotProperties.storageResourceId = reader.getString();
                } else if ("privateEndpointConnections".equals(fieldName)) {
                    List privateEndpointConnections
                        = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1));
                    deserializedBotProperties.privateEndpointConnections = privateEndpointConnections;
                } else if ("openWithHint".equals(fieldName)) {
                    deserializedBotProperties.openWithHint = reader.getString();
                } else if ("appPasswordHint".equals(fieldName)) {
                    deserializedBotProperties.appPasswordHint = reader.getString();
                } else if ("provisioningState".equals(fieldName)) {
                    deserializedBotProperties.provisioningState = reader.getString();
                } else if ("publishingCredentials".equals(fieldName)) {
                    deserializedBotProperties.publishingCredentials = reader.getString();
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedBotProperties;
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy