From 20f239447b5b5ed3a4b55b82adec7332c10ef0fd Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Tue, 17 Dec 2024 09:37:00 +0100 Subject: [PATCH 01/16] Implement SAS-based authentication --- .../geolocation/GeolocationClientBuilder.java | 38 ++++++++++-------- .../maps/render/MapsRenderClientBuilder.java | 38 ++++++++++-------- .../maps/route/MapsRouteClientBuilder.java | 38 ++++++++++-------- .../maps/search/MapsSearchClientBuilder.java | 38 ++++++++++-------- .../maps/timezone/TimeZoneClientBuilder.java | 39 ++++++++++--------- .../maps/weather/WeatherClientBuilder.java | 38 +++++++++--------- 6 files changed, 125 insertions(+), 104 deletions(-) diff --git a/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java b/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java index ec599489f18d..70db843ba7ab 100644 --- a/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java +++ b/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java @@ -5,29 +5,16 @@ package com.azure.maps.geolocation; import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.AzureKeyCredentialTrait; -import com.azure.core.client.traits.ConfigurationTrait; -import com.azure.core.client.traits.EndpointTrait; -import com.azure.core.client.traits.HttpTrait; -import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.client.traits.*; import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.credential.AzureSasCredential; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.AddHeadersPolicy; -import com.azure.core.http.policy.AzureKeyCredentialPolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.policy.*; import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; @@ -58,7 +45,8 @@ * */ @ServiceClientBuilder(serviceClients = { GeolocationClient.class, GeolocationAsyncClient.class }) -public final class GeolocationClientBuilder implements AzureKeyCredentialTrait, +public final class GeolocationClientBuilder + implements AzureKeyCredentialTrait, AzureSasCredentialTrait, TokenCredentialTrait, HttpTrait, ConfigurationTrait, EndpointTrait { @@ -98,6 +86,7 @@ public final class GeolocationClientBuilder implements AzureKeyCredentialTrait */ @ServiceClientBuilder(serviceClients = { MapsRenderClient.class, MapsRenderAsyncClient.class }) -public final class MapsRenderClientBuilder implements AzureKeyCredentialTrait, +public final class MapsRenderClientBuilder + implements AzureKeyCredentialTrait, AzureSasCredentialTrait, TokenCredentialTrait, HttpTrait, ConfigurationTrait, EndpointTrait { @@ -142,6 +130,7 @@ public MapsRenderClientBuilder() { // credentials private AzureKeyCredential keyCredential; private TokenCredential tokenCredential; + private AzureSasCredential sasCredential; /** * Sets the Azure Maps client id for use with Azure AD Authentication. This client id @@ -297,6 +286,19 @@ public MapsRenderClientBuilder credential(AzureKeyCredential keyCredential) { return this; } + /** + * Sets the {@link AzureSasCredential} used to authenticate HTTP requests. + * + * @param sasCredential The {@link AzureSasCredential} used to authenticate HTTP requests. + * @return The updated {@link MapsRenderClientBuilder} object. + * @throws NullPointerException If {@code sasCredential} is null. + */ + @Override + public MapsRenderClientBuilder credential(AzureSasCredential sasCredential) { + this.sasCredential = Objects.requireNonNull(sasCredential, "'sasCredential' cannot be null."); + return this; + } + /** * Builds an instance of RenderClientImpl with the provided parameters. * @@ -361,6 +363,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); } else if (keyCredential != null) { policies.add(new AzureKeyCredentialPolicy(RENDER_SUBSCRIPTION_KEY, keyCredential)); + } else if (sasCredential != null) { + policies.add(new AzureSasCredentialPolicy(sasCredential)); } else { // Throw exception that credential and tokenCredential cannot be null throw LOGGER.logExceptionAsError( diff --git a/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/MapsRouteClientBuilder.java b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/MapsRouteClientBuilder.java index 44bc45dcad51..f9a24f6ab008 100644 --- a/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/MapsRouteClientBuilder.java +++ b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/MapsRouteClientBuilder.java @@ -4,29 +4,16 @@ package com.azure.maps.route; import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.AzureKeyCredentialTrait; -import com.azure.core.client.traits.ConfigurationTrait; -import com.azure.core.client.traits.EndpointTrait; -import com.azure.core.client.traits.HttpTrait; -import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.client.traits.*; import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.credential.AzureSasCredential; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.AddHeadersPolicy; -import com.azure.core.http.policy.AzureKeyCredentialPolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.policy.*; import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; @@ -76,7 +63,8 @@ * */ @ServiceClientBuilder(serviceClients = { MapsRouteClient.class, MapsRouteAsyncClient.class }) -public final class MapsRouteClientBuilder implements AzureKeyCredentialTrait, +public final class MapsRouteClientBuilder + implements AzureKeyCredentialTrait, AzureSasCredentialTrait, TokenCredentialTrait, HttpTrait, ConfigurationTrait, EndpointTrait { @@ -109,6 +97,7 @@ public final class MapsRouteClientBuilder implements AzureKeyCredentialTrait */ @ServiceClientBuilder(serviceClients = { MapsSearchClient.class, MapsSearchAsyncClient.class }) -public final class MapsSearchClientBuilder implements AzureKeyCredentialTrait, +public final class MapsSearchClientBuilder + implements AzureKeyCredentialTrait, AzureSasCredentialTrait, TokenCredentialTrait, HttpTrait, ConfigurationTrait, EndpointTrait { @@ -94,6 +82,7 @@ public final class MapsSearchClientBuilder implements AzureKeyCredentialTrait */ @ServiceClientBuilder(serviceClients = { TimeZoneClient.class, TimeZoneAsyncClient.class }) -public final class TimeZoneClientBuilder - implements AzureKeyCredentialTrait, TokenCredentialTrait, +public final class TimeZoneClientBuilder implements AzureKeyCredentialTrait, + AzureSasCredentialTrait, TokenCredentialTrait, HttpTrait, ConfigurationTrait, EndpointTrait { // constants @@ -105,6 +92,7 @@ public final class TimeZoneClientBuilder // credentials private AzureKeyCredential keyCredential; private TokenCredential tokenCredential; + private AzureSasCredential sasCredential; /** Default constructor for the builder class; Create an instance of the TimeZoneClientBuilder. */ public TimeZoneClientBuilder() { @@ -269,6 +257,19 @@ public TimeZoneClientBuilder credential(AzureKeyCredential keyCredential) { return this; } + /** + * Sets the {@link AzureSasCredential} used to authenticate HTTP requests. + * + * @param sasCredential The {@link AzureSasCredential} used to authenticate HTTP requests. + * @return The updated {@link TimeZoneClientBuilder} object. + * @throws NullPointerException If {@code sasCredential} is null. + */ + @Override + public TimeZoneClientBuilder credential(AzureSasCredential sasCredential) { + this.sasCredential = Objects.requireNonNull(sasCredential, "'sasCredential' cannot be null."); + return this; + } + /** * Sets retry options * @param retryOptions the retry options for the client @@ -345,6 +346,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); } else if (keyCredential != null) { policies.add(new AzureKeyCredentialPolicy(MAPS_SUBSCRIPTION_KEY, keyCredential)); + } else if (sasCredential != null) { + policies.add(new AzureSasCredentialPolicy(sasCredential)); } else { // Throw exception that credential and tokenCredential cannot be null throw LOGGER.logExceptionAsError( diff --git a/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java b/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java index 828a85f0916b..a4a8609a8e68 100644 --- a/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java +++ b/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java @@ -4,29 +4,16 @@ package com.azure.maps.weather; import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.AzureKeyCredentialTrait; -import com.azure.core.client.traits.ConfigurationTrait; -import com.azure.core.client.traits.EndpointTrait; -import com.azure.core.client.traits.HttpTrait; -import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.client.traits.*; import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.credential.AzureSasCredential; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.AddHeadersPolicy; -import com.azure.core.http.policy.AzureKeyCredentialPolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.policy.*; import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; @@ -72,8 +59,8 @@ * */ @ServiceClientBuilder(serviceClients = { WeatherClient.class, WeatherAsyncClient.class }) -public final class WeatherClientBuilder - implements AzureKeyCredentialTrait, TokenCredentialTrait, +public final class WeatherClientBuilder implements AzureKeyCredentialTrait, + AzureSasCredentialTrait, TokenCredentialTrait, HttpTrait, ConfigurationTrait, EndpointTrait { // constants @@ -104,6 +91,7 @@ public final class WeatherClientBuilder // credentials private AzureKeyCredential keyCredential; private TokenCredential tokenCredential; + private AzureSasCredential sasCredential; /** * Default constructor for the builder class. @@ -265,6 +253,18 @@ public WeatherClientBuilder credential(AzureKeyCredential keyCredential) { return this; } + /** + * Sets the {@link AzureSasCredential} used to authenticate HTTP requests. + * + * @param sasCredential The {@link AzureSasCredential} used to authenticate HTTP requests. + * @return The updated {@link WeatherClientBuilder} object. + * @throws NullPointerException If {@code sasCredential} is null. + */ + public WeatherClientBuilder credential(AzureSasCredential sasCredential) { + this.sasCredential = Objects.requireNonNull(sasCredential, "'sasCredential' cannot be null."); + return this; + } + /** * Sets retry options * @param retryOptions the retry options for the client @@ -341,6 +341,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); } else if (keyCredential != null) { policies.add(new AzureKeyCredentialPolicy(MAPS_SUBSCRIPTION_KEY, keyCredential)); + } else if (sasCredential != null) { + policies.add(new AzureSasCredentialPolicy(sasCredential)); } else { // Throw exception that credential and tokenCredential cannot be null throw LOGGER.logExceptionAsError( From 43b0a07f6cafb83154ff3b65fc7222b0025f8f7a Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Wed, 18 Dec 2024 17:31:07 +0100 Subject: [PATCH 02/16] Update changelog files --- sdk/maps/azure-maps-geolocation/CHANGELOG.md | 6 ++++++ sdk/maps/azure-maps-render/CHANGELOG.md | 6 ++++++ sdk/maps/azure-maps-route/CHANGELOG.md | 6 ++++++ sdk/maps/azure-maps-search/CHANGELOG.md | 6 ++++++ sdk/maps/azure-maps-timezone/CHANGELOG.md | 2 ++ sdk/maps/azure-maps-weather/CHANGELOG.md | 2 ++ 6 files changed, 28 insertions(+) diff --git a/sdk/maps/azure-maps-geolocation/CHANGELOG.md b/sdk/maps/azure-maps-geolocation/CHANGELOG.md index add66ab5a81e..458bac2a3c89 100644 --- a/sdk/maps/azure-maps-geolocation/CHANGELOG.md +++ b/sdk/maps/azure-maps-geolocation/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.0.0-beta.3 (Unreleased) + +### Features added + +- Integrated support for SAS-based authentication + ## 1.0.0-beta.2 (2024-11-08) ### Other Changes diff --git a/sdk/maps/azure-maps-render/CHANGELOG.md b/sdk/maps/azure-maps-render/CHANGELOG.md index 97dc87c7a6ee..feae39edbe05 100644 --- a/sdk/maps/azure-maps-render/CHANGELOG.md +++ b/sdk/maps/azure-maps-render/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 2.0.0-beta.2 (Unreleased) + +### Features added + +- Integrated support for SAS-based authentication + ## 2.0.0-beta.1 (2024-11-08) ### Features Added diff --git a/sdk/maps/azure-maps-route/CHANGELOG.md b/sdk/maps/azure-maps-route/CHANGELOG.md index 76a574785c98..80041579dc59 100644 --- a/sdk/maps/azure-maps-route/CHANGELOG.md +++ b/sdk/maps/azure-maps-route/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.0.0-beta.3 (Unreleased) + +### Features added + +- Integrated support for SAS-based authentication + ## 1.0.0-beta.2 (2024-11-08) ### Other Changes diff --git a/sdk/maps/azure-maps-search/CHANGELOG.md b/sdk/maps/azure-maps-search/CHANGELOG.md index d7383a0627f5..4840524ef5c5 100644 --- a/sdk/maps/azure-maps-search/CHANGELOG.md +++ b/sdk/maps/azure-maps-search/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 2.0.0-beta.2 (Unreleased) + +### Features added + +- Integrated support for SAS-based authentication + ## 2.0.0-beta.1 (2024-12-12) ### Features Added diff --git a/sdk/maps/azure-maps-timezone/CHANGELOG.md b/sdk/maps/azure-maps-timezone/CHANGELOG.md index 3ee4f6db077a..fa153cb0b3bd 100644 --- a/sdk/maps/azure-maps-timezone/CHANGELOG.md +++ b/sdk/maps/azure-maps-timezone/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Integrated support for SAS-based authentication + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/maps/azure-maps-weather/CHANGELOG.md b/sdk/maps/azure-maps-weather/CHANGELOG.md index 6aed7fbe108a..2dc76f0b881d 100644 --- a/sdk/maps/azure-maps-weather/CHANGELOG.md +++ b/sdk/maps/azure-maps-weather/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Integrated support for SAS-based authentication + ### Breaking Changes ### Bugs Fixed From dbb3239e0a8c715bf91785ad4e6e1100beb61acc Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Wed, 18 Dec 2024 18:21:31 +0100 Subject: [PATCH 03/16] Fix imports --- .../geolocation/GeolocationClientBuilder.java | 20 +++++++++++++++-- .../maps/render/MapsRenderClientBuilder.java | 20 +++++++++++++++-- .../maps/route/MapsRouteClientBuilder.java | 20 +++++++++++++++-- .../maps/search/MapsSearchClientBuilder.java | 20 +++++++++++++++-- .../maps/timezone/TimeZoneClientBuilder.java | 22 ++++++++++++++++--- .../maps/weather/WeatherClientBuilder.java | 22 ++++++++++++++++--- 6 files changed, 110 insertions(+), 14 deletions(-) diff --git a/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java b/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java index 70db843ba7ab..03405d26ff33 100644 --- a/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java +++ b/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java @@ -5,7 +5,12 @@ package com.azure.maps.geolocation; import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.*; +import com.azure.core.client.traits.AzureKeyCredentialTrait; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.client.traits.AzureSasCredentialTrait; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.credential.AzureSasCredential; import com.azure.core.credential.TokenCredential; @@ -14,7 +19,18 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.*; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.policy.AzureSasCredentialPolicy; import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; diff --git a/sdk/maps/azure-maps-render/src/main/java/com/azure/maps/render/MapsRenderClientBuilder.java b/sdk/maps/azure-maps-render/src/main/java/com/azure/maps/render/MapsRenderClientBuilder.java index f95ef9384380..c5e5740bbfc4 100644 --- a/sdk/maps/azure-maps-render/src/main/java/com/azure/maps/render/MapsRenderClientBuilder.java +++ b/sdk/maps/azure-maps-render/src/main/java/com/azure/maps/render/MapsRenderClientBuilder.java @@ -5,7 +5,12 @@ package com.azure.maps.render; import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.*; +import com.azure.core.client.traits.AzureKeyCredentialTrait; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.client.traits.AzureSasCredentialTrait; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.credential.AzureSasCredential; import com.azure.core.credential.TokenCredential; @@ -14,7 +19,18 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.*; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.policy.AzureSasCredentialPolicy; import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; diff --git a/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/MapsRouteClientBuilder.java b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/MapsRouteClientBuilder.java index f9a24f6ab008..7aa01adf8c9a 100644 --- a/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/MapsRouteClientBuilder.java +++ b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/MapsRouteClientBuilder.java @@ -4,7 +4,12 @@ package com.azure.maps.route; import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.*; +import com.azure.core.client.traits.AzureKeyCredentialTrait; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.client.traits.AzureSasCredentialTrait; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.credential.AzureSasCredential; import com.azure.core.credential.TokenCredential; @@ -13,7 +18,18 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.*; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.policy.AzureSasCredentialPolicy; import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; diff --git a/sdk/maps/azure-maps-search/src/main/java/com/azure/maps/search/MapsSearchClientBuilder.java b/sdk/maps/azure-maps-search/src/main/java/com/azure/maps/search/MapsSearchClientBuilder.java index 7738872b9389..b9dfbfde49d0 100644 --- a/sdk/maps/azure-maps-search/src/main/java/com/azure/maps/search/MapsSearchClientBuilder.java +++ b/sdk/maps/azure-maps-search/src/main/java/com/azure/maps/search/MapsSearchClientBuilder.java @@ -4,7 +4,12 @@ package com.azure.maps.search; import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.*; +import com.azure.core.client.traits.AzureKeyCredentialTrait; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.client.traits.AzureSasCredentialTrait; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.credential.AzureSasCredential; import com.azure.core.credential.TokenCredential; @@ -13,7 +18,18 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.*; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.policy.AzureSasCredentialPolicy; import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; diff --git a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java index 9abb9098ff88..a9ef65e30a54 100644 --- a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java +++ b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java @@ -5,7 +5,12 @@ package com.azure.maps.timezone; import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.*; +import com.azure.core.client.traits.AzureKeyCredentialTrait; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.client.traits.AzureSasCredentialTrait; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.credential.AzureSasCredential; import com.azure.core.credential.TokenCredential; @@ -14,7 +19,18 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.*; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.policy.AzureSasCredentialPolicy; import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; @@ -38,7 +54,7 @@ * AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); * * // Creates a client - * TimeZoneClient client = new TimeZoneClientBuilder() + * TimeZoneClient client = new TimeZoneClientBuilder() * .credential(keyCredential) * .timezoneClientId(System.getenv("MAPS_CLIENT_ID")) * .buildClient(); diff --git a/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java b/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java index a4a8609a8e68..bb2a8196710f 100644 --- a/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java +++ b/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java @@ -4,7 +4,12 @@ package com.azure.maps.weather; import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.*; +import com.azure.core.client.traits.AzureKeyCredentialTrait; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.client.traits.AzureSasCredentialTrait; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.credential.AzureSasCredential; import com.azure.core.credential.TokenCredential; @@ -13,7 +18,18 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.*; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.policy.AzureSasCredentialPolicy; import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; @@ -37,7 +53,7 @@ * AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); * * // Creates a client - * WeatherClient client = new WeatherClientBuilder() + * WeatherClient client = new WeatherClientBuilder() * .credential(keyCredential) * .weatherClientId(System.getenv("MAPS_CLIENT_ID")) * .buildClient(); From 4173ad07185e89b0d813987d8b2f7039f4a19ba8 Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Thu, 19 Dec 2024 04:24:09 +0100 Subject: [PATCH 04/16] Update change log for maps-search --- sdk/maps/azure-maps-search/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/maps/azure-maps-search/CHANGELOG.md b/sdk/maps/azure-maps-search/CHANGELOG.md index de28742cc3fe..b2190962b3ea 100644 --- a/sdk/maps/azure-maps-search/CHANGELOG.md +++ b/sdk/maps/azure-maps-search/CHANGELOG.md @@ -6,7 +6,7 @@ - Integrated support for SAS-based authentication -## 2.0.0-beta.1 (2024-12-19) +## 2.0.0-beta.1 (2024-12-17) ### Features Added From 84a3050e48a08e6cd7708086500311c07dc6276e Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Thu, 19 Dec 2024 04:57:44 +0100 Subject: [PATCH 05/16] Update README.md files --- sdk/maps/azure-maps-geolocation/README.md | 6 +++++- sdk/maps/azure-maps-render/README.md | 4 ++++ sdk/maps/azure-maps-route/README.md | 4 ++++ sdk/maps/azure-maps-search/README.md | 6 ++++++ sdk/maps/azure-maps-timezone/README.md | 4 ++++ sdk/maps/azure-maps-weather/README.md | 4 ++++ 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/sdk/maps/azure-maps-geolocation/README.md b/sdk/maps/azure-maps-geolocation/README.md index 202b6703f4df..d307e3c91503 100644 --- a/sdk/maps/azure-maps-geolocation/README.md +++ b/sdk/maps/azure-maps-geolocation/README.md @@ -39,6 +39,8 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication +There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. + By default, Azure Active Directory token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. @@ -61,7 +63,9 @@ GeolocationClient client = new GeolocationClientBuilder() .buildClient(); ``` -TThe sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +For SAS-based authentication, please refer to [AccountsListSasSamples.java][https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-resourcemanager-maps/src/samples/java/com/azure/resourcemanager/maps/generated/AccountsListSasSamples.java]. See [Authentication][authenticate] for more options. diff --git a/sdk/maps/azure-maps-render/README.md b/sdk/maps/azure-maps-render/README.md index a357e08d0dee..d72af4991e67 100644 --- a/sdk/maps/azure-maps-render/README.md +++ b/sdk/maps/azure-maps-render/README.md @@ -39,6 +39,8 @@ Azure Maps Libraries require a `TokenCredential` implementation for authenticati ### Authentication +There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. + By default, Azure Active Directory token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. @@ -66,6 +68,8 @@ MapsRenderClient client = builder.buildClient(); The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +For SAS-based authentication, please refer to [AccountsListSasSamples.java][https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-resourcemanager-maps/src/samples/java/com/azure/resourcemanager/maps/generated/AccountsListSasSamples.java]. + See [Authentication][authenticate] for more options. ## Key concepts diff --git a/sdk/maps/azure-maps-route/README.md b/sdk/maps/azure-maps-route/README.md index 1388e68c0f66..fe706c47e689 100644 --- a/sdk/maps/azure-maps-route/README.md +++ b/sdk/maps/azure-maps-route/README.md @@ -39,6 +39,8 @@ Azure Maps Libraries require a `TokenCredential` implementation for authenticati ### Authentication +There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. + By default, Azure Active Directory token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. @@ -66,6 +68,8 @@ MapsRouteAsyncClient client = builder.buildAsyncClient(); The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +For SAS-based authentication, please refer to [AccountsListSasSamples.java][https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-resourcemanager-maps/src/samples/java/com/azure/resourcemanager/maps/generated/AccountsListSasSamples.java]. + See [Authentication][authenticate] for more options. ## Key concepts diff --git a/sdk/maps/azure-maps-search/README.md b/sdk/maps/azure-maps-search/README.md index efc230b1a7ef..7cf293415095 100644 --- a/sdk/maps/azure-maps-search/README.md +++ b/sdk/maps/azure-maps-search/README.md @@ -39,6 +39,8 @@ Azure Maps Libraries require a `TokenCredential` implementation for authenticati ### Authentication +There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. + By default, Azure Active Directory token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. @@ -66,6 +68,10 @@ MapsSearchClient client = builder.buildClient(); The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +For SAS-based authentication, please refer to AccountsListSasSamples.java for how to get the SAS token + +For SAS-based authentication, please refer to [AccountsListSasSamples.java][https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-resourcemanager-maps/src/samples/java/com/azure/resourcemanager/maps/generated/AccountsListSasSamples.java]. + See [Authentication][authenticate] for more options. ## Key concepts diff --git a/sdk/maps/azure-maps-timezone/README.md b/sdk/maps/azure-maps-timezone/README.md index c155d18506c9..e95e8c7060dc 100644 --- a/sdk/maps/azure-maps-timezone/README.md +++ b/sdk/maps/azure-maps-timezone/README.md @@ -39,6 +39,8 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication +There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. + By default, Azure Active Directory token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. @@ -63,6 +65,8 @@ TimeZoneClient client = new TimeZoneClientBuilder() The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +For SAS-based authentication, please refer to [AccountsListSasSamples.java][https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-resourcemanager-maps/src/samples/java/com/azure/resourcemanager/maps/generated/AccountsListSasSamples.java]. + See [Authentication][authenticate] for more options. ## Key concepts diff --git a/sdk/maps/azure-maps-weather/README.md b/sdk/maps/azure-maps-weather/README.md index f04f50c22921..8d033976b9a9 100644 --- a/sdk/maps/azure-maps-weather/README.md +++ b/sdk/maps/azure-maps-weather/README.md @@ -39,6 +39,8 @@ Azure Maps Libraries require a `TokenCredential` implementation for authenticati ### Authentication +There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. + By default, Azure Active Directory token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. @@ -63,6 +65,8 @@ WeatherClient client = new WeatherClientBuilder() The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +For SAS-based authentication, please refer to [AccountsListSasSamples.java][https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-resourcemanager-maps/src/samples/java/com/azure/resourcemanager/maps/generated/AccountsListSasSamples.java]. + See [Authentication][authenticate] for more options. ## Key concepts From 0de03a368124f7e26334dd96718537f4c35f1730 Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Thu, 19 Dec 2024 05:00:04 +0100 Subject: [PATCH 06/16] Update README.md files --- sdk/maps/azure-maps-geolocation/README.md | 2 +- sdk/maps/azure-maps-render/README.md | 2 +- sdk/maps/azure-maps-route/README.md | 2 +- sdk/maps/azure-maps-search/README.md | 4 +--- sdk/maps/azure-maps-timezone/README.md | 2 +- sdk/maps/azure-maps-weather/README.md | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sdk/maps/azure-maps-geolocation/README.md b/sdk/maps/azure-maps-geolocation/README.md index d307e3c91503..cafe8bb8f571 100644 --- a/sdk/maps/azure-maps-geolocation/README.md +++ b/sdk/maps/azure-maps-geolocation/README.md @@ -41,7 +41,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/maps/azure-maps-render/README.md b/sdk/maps/azure-maps-render/README.md index d72af4991e67..070d1a24bc15 100644 --- a/sdk/maps/azure-maps-render/README.md +++ b/sdk/maps/azure-maps-render/README.md @@ -41,7 +41,7 @@ Azure Maps Libraries require a `TokenCredential` implementation for authenticati There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/maps/azure-maps-route/README.md b/sdk/maps/azure-maps-route/README.md index fe706c47e689..c0907db67450 100644 --- a/sdk/maps/azure-maps-route/README.md +++ b/sdk/maps/azure-maps-route/README.md @@ -41,7 +41,7 @@ Azure Maps Libraries require a `TokenCredential` implementation for authenticati There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/maps/azure-maps-search/README.md b/sdk/maps/azure-maps-search/README.md index 7cf293415095..a6f3f288da31 100644 --- a/sdk/maps/azure-maps-search/README.md +++ b/sdk/maps/azure-maps-search/README.md @@ -41,7 +41,7 @@ Azure Maps Libraries require a `TokenCredential` implementation for authenticati There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -68,8 +68,6 @@ MapsSearchClient client = builder.buildClient(); The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. -For SAS-based authentication, please refer to AccountsListSasSamples.java for how to get the SAS token - For SAS-based authentication, please refer to [AccountsListSasSamples.java][https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-resourcemanager-maps/src/samples/java/com/azure/resourcemanager/maps/generated/AccountsListSasSamples.java]. See [Authentication][authenticate] for more options. diff --git a/sdk/maps/azure-maps-timezone/README.md b/sdk/maps/azure-maps-timezone/README.md index e95e8c7060dc..ae4d47869c79 100644 --- a/sdk/maps/azure-maps-timezone/README.md +++ b/sdk/maps/azure-maps-timezone/README.md @@ -41,7 +41,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/maps/azure-maps-weather/README.md b/sdk/maps/azure-maps-weather/README.md index 8d033976b9a9..ea39082c1676 100644 --- a/sdk/maps/azure-maps-weather/README.md +++ b/sdk/maps/azure-maps-weather/README.md @@ -41,7 +41,7 @@ Azure Maps Libraries require a `TokenCredential` implementation for authenticati There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. From c81a88aef1acae7074b11c8b7bb149cd566c2a55 Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Thu, 19 Dec 2024 05:18:11 +0100 Subject: [PATCH 07/16] Add missing SDKs in maps/README.md --- sdk/maps/README.md | 26 +++++++++++++------ .../geolocation/GeolocationClientBuilder.java | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/sdk/maps/README.md b/sdk/maps/README.md index 1a28f35ffcd4..ffc462b518e1 100644 --- a/sdk/maps/README.md +++ b/sdk/maps/README.md @@ -7,9 +7,13 @@ Microsoft Azure Maps provides developers from all industries with powerful geosp ## Getting started To get started with a specific library, see the **README.md** file located in the library's project folder. -- [Azure Maps Search](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-search/README.md) contains Search APIs for querying addresses, nearby locations, geopolygons etc. -- [Azure Maps Route](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-route/README.md) contains Route APIs for calculating matrix of route summaries, returning routes between destinations, etc. +- [Azure Maps Geolocation](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-geolocation/README.md) contains Geolocation APIs for determining the country/region of an IP address, etc. - [Azure Maps Render](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-render/README.md) contains Render APIs to request map tiles, metadata for tilesets, etc. +- [Azure Maps Route](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-route/README.md) contains Route APIs for calculating matrix of route summaries, returning routes between destinations, etc. +- [Azure Maps Search](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-search/README.md) contains Search APIs for querying addresses, nearby locations, geopolygons, etc. +- [Azure Maps Timezone](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-timezone/README.md) contains Timezone APIs for converting between UTC and local times based on geographic locations, etc. +- [Azure Maps Traffic](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-traffic/README.md) contains Traffic APIs for providing traffic flow and incident information to enhance navigation and routing applications, etc. +- [Azure Maps Weather](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-weather/README.md) contains Weather APIs for retrieving current weather conditions, forecasts, and weather alerts, etc. ## Key concepts @@ -20,9 +24,13 @@ For details on contributing to this repository, see the [contributing guide](htt ## Examples For examples of each module please see: -- [Azure Maps Search Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-search/src/samples) -- [Azure Maps Route Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-route/src/samples) +- [Azure Maps Geolocation Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-geolocation/src/samples) - [Azure Maps Render Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-render/src/samples) +- [Azure Maps Route Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-route/src/samples) +- [Azure Maps Search Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-search/src/samples) +- [Azure Maps Timezone Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-timezone/src/samples) +- [Azure Maps Traffic Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-traffic/src/samples) +- [Azure Maps Weather Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-weather/src/samples) ## Troubleshooting When you interact with the Azure Maps Services, errors returned by the Maps service correspond to the same HTTP status codes returned for REST API requests. @@ -32,11 +40,13 @@ For example, if you search with an invalid coordinate, a error is returned, indi ## Next steps Several Azure Maps Java SDK samples are available to you in the SDK's GitHub repository. -- [Azure Maps Search Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-search/src/samples) -- [Azure Maps Route Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-route/src/samples) -) +- [Azure Maps Geolocation Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-geolocation/src/samples) - [Azure Maps Render Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-render/src/samples) -) +- [Azure Maps Route Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-route/src/samples) +- [Azure Maps Search Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-search/src/samples) +- [Azure Maps Timezone Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-timezone/src/samples) +- [Azure Maps Traffic Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-traffic/src/samples) +- [Azure Maps Weather Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-weather/src/samples) ## Contributing diff --git a/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java b/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java index 03405d26ff33..6e349fb8e77a 100644 --- a/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java +++ b/sdk/maps/azure-maps-geolocation/src/main/java/com/azure/maps/geolocation/GeolocationClientBuilder.java @@ -276,7 +276,7 @@ public GeolocationClientBuilder credential(AzureKeyCredential keyCredential) { */ @Override public GeolocationClientBuilder credential(AzureSasCredential sasCredential) { - this.sasCredential = Objects.requireNonNull(sasCredential, "'keyCredential' cannot be null."); + this.sasCredential = Objects.requireNonNull(sasCredential, "'sasCredential' cannot be null."); return this; } From 61566a07749db67ecffaac40fa21c9d455bbb907 Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Thu, 19 Dec 2024 05:31:40 +0100 Subject: [PATCH 08/16] Update maps-search version --- sdk/maps/azure-maps-search/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/maps/azure-maps-search/pom.xml b/sdk/maps/azure-maps-search/pom.xml index 384f33573f63..4f1862d56246 100644 --- a/sdk/maps/azure-maps-search/pom.xml +++ b/sdk/maps/azure-maps-search/pom.xml @@ -14,7 +14,7 @@ com.azure azure-maps-search - 2.0.0-beta.1 + 2.0.0-beta.2 jar Azure Maps SDK Search client library From ea4c84ed3781eb8d8a1bca79d0856769ae416012 Mon Sep 17 00:00:00 2001 From: Lazar <163033155+Lakicar95@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:52:35 +0100 Subject: [PATCH 09/16] Update sdk/maps/azure-maps-weather/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- sdk/maps/azure-maps-weather/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/maps/azure-maps-weather/README.md b/sdk/maps/azure-maps-weather/README.md index ea39082c1676..ec34892e0de8 100644 --- a/sdk/maps/azure-maps-weather/README.md +++ b/sdk/maps/azure-maps-weather/README.md @@ -41,7 +41,7 @@ Azure Maps Libraries require a `TokenCredential` implementation for authenticati There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. -By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. From 3adb4d705d41880b6660e6c37d118107ca9c2337 Mon Sep 17 00:00:00 2001 From: Lazar <163033155+Lakicar95@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:52:44 +0100 Subject: [PATCH 10/16] Update sdk/maps/azure-maps-search/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- sdk/maps/azure-maps-search/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/maps/azure-maps-search/README.md b/sdk/maps/azure-maps-search/README.md index a6f3f288da31..f9d036ebf20c 100644 --- a/sdk/maps/azure-maps-search/README.md +++ b/sdk/maps/azure-maps-search/README.md @@ -41,7 +41,7 @@ Azure Maps Libraries require a `TokenCredential` implementation for authenticati There are 3 ways to authenticate the client: Shared key authentication, Microsoft Entra ID authentication, and shared access signature (SAS) authentication. -By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. From 55671d17102c8c0182791d33100c7fcebc6f0681 Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Fri, 20 Dec 2024 04:34:19 +0100 Subject: [PATCH 11/16] Fix javadoc error --- .../java/com/azure/maps/timezone/TimeZoneClientBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java index a9ef65e30a54..c5e6b7b66c52 100644 --- a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java +++ b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java @@ -54,7 +54,7 @@ * AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); * * // Creates a client - * TimeZoneClient client = new TimeZoneClientBuilder() + * TimeZoneClient client = new TimeZoneClientBuilder() * .credential(keyCredential) * .timezoneClientId(System.getenv("MAPS_CLIENT_ID")) * .buildClient(); From 9a344a87d89d17bfceb210f5b142ec7b8279cb04 Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Sat, 21 Dec 2024 06:38:33 +0100 Subject: [PATCH 12/16] Fix snippet start-end mismatch --- .../java/com/azure/maps/timezone/TimeZoneClientBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java index c5e6b7b66c52..e98a3b3bac71 100644 --- a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java +++ b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java @@ -54,12 +54,12 @@ * AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); * * // Creates a client - * TimeZoneClient client = new TimeZoneClientBuilder() + * TimeZoneClient client = new TimeZoneClientBuilder() * .credential(keyCredential) * .timezoneClientId(System.getenv("MAPS_CLIENT_ID")) * .buildClient(); * - * + * */ @ServiceClientBuilder(serviceClients = { TimeZoneClient.class, TimeZoneAsyncClient.class }) public final class TimeZoneClientBuilder implements AzureKeyCredentialTrait, From 8d833462a7b68df8f36f846ba70e310ca7de31ab Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Tue, 24 Dec 2024 10:04:43 +0100 Subject: [PATCH 13/16] Fix javadoc snippet in TimeZoneClientBuilder class --- .../maps/timezone/TimeZoneClientBuilder.java | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java index e98a3b3bac71..6b2b358cf880 100644 --- a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java +++ b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java @@ -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. - *

Example usage

- * Creating a sync client using a {@link AzureKeyCredential}: + * Creating a sync client using a {@link com.azure.core.credential.AzureKeyCredential}: * *
  * // Authenticates using subscription key
  * AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY"));
  *
- * // Creates a client
- * TimeZoneClient client = new TimeZoneClientBuilder()
- *     .credential(keyCredential)
- *     .timezoneClientId(System.getenv("MAPS_CLIENT_ID"))
- *     .buildClient();
+ * // Creates a builder
+ * TimeZoneClientBuilder builder = new TimeZoneClientBuilder();
+ * builder.credential(keyCredential);
+ * builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));
+ *
+ * // Builds the client
+ * TimeZoneClient client = builder.buildClient();
  * 
* + * Creating a sync client using a {@link com.azure.core.credential.TokenCredential}: + * + *
+ * // Authenticates using Azure AD building a default credential
+ * // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables
+ * DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build();
+ *
+ * // Creates a builder
+ * TimeZoneClientBuilder builder = new TimeZoneClientBuilder();
+ * builder.credential(tokenCredential);
+ * builder.mapsClientId(System.getenv("MAPS_CLIENT_ID"));
+ * builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));
+ *
+ * // Builds a client
+ * TimeZoneClient client = builder.buildClient();
+ * 
+ * */ @ServiceClientBuilder(serviceClients = { TimeZoneClient.class, TimeZoneAsyncClient.class }) public final class TimeZoneClientBuilder implements AzureKeyCredentialTrait, From e0c30ded3dc09e77fa57c046085b3aaa1fd54f7d Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Tue, 24 Dec 2024 11:11:28 +0100 Subject: [PATCH 14/16] Fix javadoc snippet in TimeZoneClientBuilder class --- .../maps/timezone/TimeZoneClientBuilder.java | 21 ++------------- .../maps/weather/WeatherClientBuilder.java | 26 +++++-------------- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java index 6b2b358cf880..4a9284491cd7 100644 --- a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java +++ b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java @@ -45,9 +45,9 @@ 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. - * Creating a sync client using a {@link com.azure.core.credential.AzureKeyCredential}: + *

Example usage

+ * Creating a sync client using a {@link AzureKeyCredential}: * *
  * // Authenticates using subscription key
@@ -61,23 +61,6 @@
  * // Builds the client
  * TimeZoneClient client = builder.buildClient();
  * 
- * - * Creating a sync client using a {@link com.azure.core.credential.TokenCredential}: - * - *
- * // Authenticates using Azure AD building a default credential
- * // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables
- * DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build();
- *
- * // Creates a builder
- * TimeZoneClientBuilder builder = new TimeZoneClientBuilder();
- * builder.credential(tokenCredential);
- * builder.mapsClientId(System.getenv("MAPS_CLIENT_ID"));
- * builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));
- *
- * // Builds a client
- * TimeZoneClient client = builder.buildClient();
- * 
* */ @ServiceClientBuilder(serviceClients = { TimeZoneClient.class, TimeZoneAsyncClient.class }) diff --git a/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java b/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java index bb2a8196710f..f6be648245b6 100644 --- a/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java +++ b/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java @@ -52,25 +52,13 @@ * // Authenticates using subscription key * AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); * - * // Creates a client - * WeatherClient client = new WeatherClientBuilder() - * .credential(keyCredential) - * .weatherClientId(System.getenv("MAPS_CLIENT_ID")) - * .buildClient(); - * - * - * Creating a sync client using a {@link TokenCredential}: - * - *
- * // Authenticates using Azure AD building a default credential
- * // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables
- * DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build();
+ * // Creates a builder
+ * WeatherClientBuilder builder = new WeatherClientBuilder();
+ * builder.credential(keyCredential);
+ * builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));
  *
- * // Creates a client
- * WeatherClient client = new WeatherClientBuilder()
- *     .credential(tokenCredential)
- *     .weatherClientId(System.getenv("MAPS_CLIENT_ID"))
- *     .buildClient();
+ * // Builds the client
+ * WeatherClient client = builder.buildClient();
  * 
* */ @@ -84,7 +72,7 @@ public final class WeatherClientBuilder implements AzureKeyCredentialTrait PROPERTIES = CoreUtils.getProperties("azure-maps-timezone.properties"); + private static final Map PROPERTIES = CoreUtils.getProperties("azure-maps-weather.properties"); // subscription-key static final String MAPS_SUBSCRIPTION_KEY = "subscription-key"; From 44de64485ea164d70fbeb3e96171d276bc0df271 Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Tue, 24 Dec 2024 12:01:29 +0100 Subject: [PATCH 15/16] Remove problematic code-snippets --- .../maps/timezone/TimeZoneClientBuilder.java | 20 +------------------ .../maps/weather/WeatherClientBuilder.java | 19 ------------------ 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java index 4a9284491cd7..8e1a29cc8b9c 100644 --- a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java +++ b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java @@ -44,25 +44,7 @@ import java.util.Map; import java.util.Objects; -/** - * Builder class used to instantiate both synchronous and asynchronous {@link TimeZoneClient} clients. - *

Example usage

- * Creating a sync client using a {@link AzureKeyCredential}: - * - *
- * // Authenticates using subscription key
- * AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY"));
- *
- * // Creates a builder
- * TimeZoneClientBuilder builder = new TimeZoneClientBuilder();
- * builder.credential(keyCredential);
- * builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));
- *
- * // Builds the client
- * TimeZoneClient client = builder.buildClient();
- * 
- * - */ + @ServiceClientBuilder(serviceClients = { TimeZoneClient.class, TimeZoneAsyncClient.class }) public final class TimeZoneClientBuilder implements AzureKeyCredentialTrait, AzureSasCredentialTrait, TokenCredentialTrait, diff --git a/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java b/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java index f6be648245b6..8f80156ca7df 100644 --- a/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java +++ b/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java @@ -43,25 +43,6 @@ import java.util.Map; import java.util.Objects; -/** - * Builder class used to instantiate both synchronous and asynchronous {@link WeatherClient} clients. - *

Example usage

- * Creating a sync client using a {@link AzureKeyCredential}: - * - *
- * // Authenticates using subscription key
- * AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY"));
- *
- * // Creates a builder
- * WeatherClientBuilder builder = new WeatherClientBuilder();
- * builder.credential(keyCredential);
- * builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));
- *
- * // Builds the client
- * WeatherClient client = builder.buildClient();
- * 
- * - */ @ServiceClientBuilder(serviceClients = { WeatherClient.class, WeatherAsyncClient.class }) public final class WeatherClientBuilder implements AzureKeyCredentialTrait, AzureSasCredentialTrait, TokenCredentialTrait, From 71dcbab979cda5fe7c21318774e6c38c456f9c2b Mon Sep 17 00:00:00 2001 From: Lakicar95 Date: Tue, 24 Dec 2024 12:25:01 +0100 Subject: [PATCH 16/16] Fix javadoc errors --- .../java/com/azure/maps/timezone/TimeZoneClientBuilder.java | 4 +++- .../java/com/azure/maps/weather/WeatherClientBuilder.java | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java index 8e1a29cc8b9c..1eded36d7811 100644 --- a/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java +++ b/sdk/maps/azure-maps-timezone/src/main/java/com/azure/maps/timezone/TimeZoneClientBuilder.java @@ -44,7 +44,9 @@ import java.util.Map; import java.util.Objects; - +/** + * Builder class used to instantiate both synchronous and asynchronous {@link TimeZoneClient} clients. + */ @ServiceClientBuilder(serviceClients = { TimeZoneClient.class, TimeZoneAsyncClient.class }) public final class TimeZoneClientBuilder implements AzureKeyCredentialTrait, AzureSasCredentialTrait, TokenCredentialTrait, diff --git a/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java b/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java index 8f80156ca7df..dfb07c0501be 100644 --- a/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java +++ b/sdk/maps/azure-maps-weather/src/main/java/com/azure/maps/weather/WeatherClientBuilder.java @@ -43,6 +43,9 @@ import java.util.Map; import java.util.Objects; +/** + * Builder class used to instantiate both synchronous and asynchronous {@link WeatherClient} clients. + */ @ServiceClientBuilder(serviceClients = { WeatherClient.class, WeatherAsyncClient.class }) public final class WeatherClientBuilder implements AzureKeyCredentialTrait, AzureSasCredentialTrait, TokenCredentialTrait,