Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix javadoc snippet in TimeZoneClientBuilder class
  • Loading branch information
Lakicar95 committed Dec 24, 2024
commit 8d833462a7b68df8f36f846ba70e310ca7de31ab
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,40 @@
import java.util.Objects;

/**
* A builder for creating a new instance of the TimeZoneClient type.
* Builder class used to instantiate both synchronous and asynchronous {@link TimeZoneClient} clients.
* <p><b>Example usage</b></p>
* Creating a sync client using a {@link AzureKeyCredential}:
* Creating a sync client using a {@link com.azure.core.credential.AzureKeyCredential}:
* <!-- src_embed com.azure.maps.timezone.sync.builder.key.instantiation -->
* <pre>
* &#47;&#47; Authenticates using subscription key
* AzureKeyCredential keyCredential = new AzureKeyCredential&#40;System.getenv&#40;&quot;SUBSCRIPTION_KEY&quot;&#41;&#41;;
*
* &#47;&#47; Creates a client
* TimeZoneClient client = new TimeZoneClientBuilder&#40;&#41;
* .credential&#40;keyCredential&#41;
* .timezoneClientId&#40;System.getenv&#40;&quot;MAPS_CLIENT_ID&quot;&#41;&#41;
* .buildClient&#40;&#41;;
* &#47;&#47; Creates a builder
* TimeZoneClientBuilder builder = new TimeZoneClientBuilder&#40;&#41;;
* builder.credential&#40;keyCredential&#41;;
* builder.httpLogOptions&#40;new HttpLogOptions&#40;&#41;.setLogLevel&#40;HttpLogDetailLevel.BODY_AND_HEADERS&#41;&#41;;
*
* &#47;&#47; Builds the client
* TimeZoneClient client = builder.buildClient&#40;&#41;;
* </pre>
* <!-- end com.azure.maps.timezone.sync.builder.key.instantiation -->
* Creating a sync client using a {@link com.azure.core.credential.TokenCredential}:
* <!-- src_embed com.azure.maps.timezone.sync.builder.ad.instantiation -->
* <pre>
* &#47;&#47; Authenticates using Azure AD building a default credential
* &#47;&#47; This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables
* DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder&#40;&#41;.build&#40;&#41;;
*
* &#47;&#47; Creates a builder
* TimeZoneClientBuilder builder = new TimeZoneClientBuilder&#40;&#41;;
* builder.credential&#40;tokenCredential&#41;;
* builder.mapsClientId&#40;System.getenv&#40;&quot;MAPS_CLIENT_ID&quot;&#41;&#41;;
* builder.httpLogOptions&#40;new HttpLogOptions&#40;&#41;.setLogLevel&#40;HttpLogDetailLevel.BODY_AND_HEADERS&#41;&#41;;
*
* &#47;&#47; Builds a client
* TimeZoneClient client = builder.buildClient&#40;&#41;;
* </pre>
* <!-- end com.azure.maps.timezone.sync.builder.ad.instantiation -->
*/
@ServiceClientBuilder(serviceClients = { TimeZoneClient.class, TimeZoneAsyncClient.class })
public final class TimeZoneClientBuilder implements AzureKeyCredentialTrait<TimeZoneClientBuilder>,
Expand Down
Loading