com.azure.resourcemanager.healthbot.implementation.HealthbotClientBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-healthbot Show documentation
Show all versions of azure-resourcemanager-healthbot Show documentation
This package contains Microsoft Azure SDK for Healthbot Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Healthcare Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package tag package-2020-12-08.
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.healthbot.implementation;
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerAdapter;
import java.time.Duration;
/**
* A builder for creating a new instance of the HealthbotClientImpl type.
*/
@ServiceClientBuilder(serviceClients = { HealthbotClientImpl.class })
public final class HealthbotClientBuilder {
/*
* Azure Subscription ID.
*/
private String subscriptionId;
/**
* Sets Azure Subscription ID.
*
* @param subscriptionId the subscriptionId value.
* @return the HealthbotClientBuilder.
*/
public HealthbotClientBuilder subscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
return this;
}
/*
* server parameter
*/
private String endpoint;
/**
* Sets server parameter.
*
* @param endpoint the endpoint value.
* @return the HealthbotClientBuilder.
*/
public HealthbotClientBuilder endpoint(String endpoint) {
this.endpoint = endpoint;
return this;
}
/*
* The environment to connect to
*/
private AzureEnvironment environment;
/**
* Sets The environment to connect to.
*
* @param environment the environment value.
* @return the HealthbotClientBuilder.
*/
public HealthbotClientBuilder environment(AzureEnvironment environment) {
this.environment = environment;
return this;
}
/*
* The HTTP pipeline to send requests through
*/
private HttpPipeline pipeline;
/**
* Sets The HTTP pipeline to send requests through.
*
* @param pipeline the pipeline value.
* @return the HealthbotClientBuilder.
*/
public HealthbotClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}
/*
* The default poll interval for long-running operation
*/
private Duration defaultPollInterval;
/**
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
* @return the HealthbotClientBuilder.
*/
public HealthbotClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}
/*
* The serializer to serialize an object into a string
*/
private SerializerAdapter serializerAdapter;
/**
* Sets The serializer to serialize an object into a string.
*
* @param serializerAdapter the serializerAdapter value.
* @return the HealthbotClientBuilder.
*/
public HealthbotClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
this.serializerAdapter = serializerAdapter;
return this;
}
/**
* Builds an instance of HealthbotClientImpl with the provided parameters.
*
* @return an instance of HealthbotClientImpl.
*/
public HealthbotClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
HttpPipeline localPipeline = (pipeline != null)
? pipeline
: new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
Duration localDefaultPollInterval
= (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
HealthbotClientImpl client = new HealthbotClientImpl(localPipeline, localSerializerAdapter,
localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
return client;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy