Skip to content

Commit c221492

Browse files
authored
Migrate azure-maps-routes to azure-json (Azure#40645)
1 parent 8671f49 commit c221492

File tree

112 files changed

+19350
-10540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+19350
-10540
lines changed

sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/MapsRouteAsyncClient.java

Lines changed: 174 additions & 306 deletions
Large diffs are not rendered by default.

sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/MapsRouteClient.java

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,8 @@ public SyncPoller<RouteMatrixResult, RouteMatrixResult> beginGetRouteMatrix(Rout
145145
* @return this object is returned from a successful Route Matrix call.
146146
*/
147147
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
148-
public SyncPoller<RouteMatrixResult, RouteMatrixResult> beginGetRouteMatrix(
149-
RouteMatrixOptions options,
150-
Context context) {
148+
public SyncPoller<RouteMatrixResult, RouteMatrixResult> beginGetRouteMatrix(RouteMatrixOptions options,
149+
Context context) {
151150
return this.asyncClient.beginGetRouteMatrix(options, context).getSyncPoller();
152151
}
153152

@@ -228,8 +227,7 @@ public RouteDirections getRouteDirections(RouteDirectionsOptions options) {
228227
* @return this object is returned from a successful Route Directions call.
229228
*/
230229
@ServiceMethod(returns = ReturnType.SINGLE)
231-
public Response<RouteDirections> getRouteDirectionsWithResponse(
232-
RouteDirectionsOptions options, Context context) {
230+
public Response<RouteDirections> getRouteDirectionsWithResponse(RouteDirectionsOptions options, Context context) {
233231
return this.asyncClient.getRouteDirectionsWithContextWithResponse(options, context).block();
234232
}
235233

@@ -284,8 +282,7 @@ public Response<RouteDirections> getRouteDirectionsWithResponse(
284282
* @return this object is returned from a successful Route Directions call.
285283
*/
286284
@ServiceMethod(returns = ReturnType.SINGLE)
287-
public RouteDirections getRouteDirections(
288-
RouteDirectionsOptions options, RouteDirectionsParameters parameters) {
285+
public RouteDirections getRouteDirections(RouteDirectionsOptions options, RouteDirectionsParameters parameters) {
289286
return this.asyncClient.getRouteDirections(options, parameters).block();
290287
}
291288

@@ -341,8 +338,8 @@ public RouteDirections getRouteDirections(
341338
* @return this object is returned from a successful Route Directions call.
342339
*/
343340
@ServiceMethod(returns = ReturnType.SINGLE)
344-
public Response<RouteDirections> getRouteDirectionsWithResponse(
345-
RouteDirectionsOptions options, RouteDirectionsParameters parameters, Context context) {
341+
public Response<RouteDirections> getRouteDirectionsWithResponse(RouteDirectionsOptions options,
342+
RouteDirectionsParameters parameters, Context context) {
346343
return this.asyncClient.getRouteDirectionsWithParametersWithResponse(
347344
options, parameters, context).block();
348345
}
@@ -386,8 +383,7 @@ public RouteRangeResult getRouteRange(RouteRangeOptions options) {
386383
* @return this object is returned from a successful Route Range call.
387384
*/
388385
@ServiceMethod(returns = ReturnType.SINGLE)
389-
public Response<RouteRangeResult> getRouteRangeWithResponse(
390-
RouteRangeOptions options, Context context) {
386+
public Response<RouteRangeResult> getRouteRangeWithResponse(RouteRangeOptions options, Context context) {
391387
return this.asyncClient.getRouteRangeWithResponse(options, context).block();
392388
}
393389

@@ -432,7 +428,8 @@ public Response<RouteRangeResult> getRouteRangeWithResponse(
432428
* @return this object is returned from a successful Route Directions call.
433429
*/
434430
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
435-
public SyncPoller<RouteDirectionsBatchResult, RouteDirectionsBatchResult> beginRequestRouteDirectionsBatch(List<RouteDirectionsOptions> optionsList) {
431+
public SyncPoller<RouteDirectionsBatchResult, RouteDirectionsBatchResult> beginRequestRouteDirectionsBatch(
432+
List<RouteDirectionsOptions> optionsList) {
436433
return this.beginRequestRouteDirectionsBatch(optionsList, null);
437434
}
438435

@@ -478,7 +475,8 @@ public SyncPoller<RouteDirectionsBatchResult, RouteDirectionsBatchResult> beginR
478475
* @return this object is returned from a successful Route Directions call.
479476
*/
480477
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
481-
public SyncPoller<RouteDirectionsBatchResult, RouteDirectionsBatchResult> beginRequestRouteDirectionsBatch(List<RouteDirectionsOptions> optionsList, Context context) {
478+
public SyncPoller<RouteDirectionsBatchResult, RouteDirectionsBatchResult> beginRequestRouteDirectionsBatch(
479+
List<RouteDirectionsOptions> optionsList, Context context) {
482480
return this.asyncClient
483481
.beginRequestRouteDirectionsBatch(optionsList, context).getSyncPoller();
484482
}
@@ -494,7 +492,7 @@ public SyncPoller<RouteDirectionsBatchResult, RouteDirectionsBatchResult> beginR
494492
*/
495493
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
496494
public SyncPoller<RouteDirectionsBatchResult, RouteDirectionsBatchResult> beginGetRouteDirectionsBatch(
497-
String batchId) {
495+
String batchId) {
498496
return this.beginGetRouteDirectionsBatch(batchId, null);
499497
}
500498

@@ -510,7 +508,7 @@ public SyncPoller<RouteDirectionsBatchResult, RouteDirectionsBatchResult> beginG
510508
*/
511509
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
512510
public SyncPoller<RouteDirectionsBatchResult, RouteDirectionsBatchResult> beginGetRouteDirectionsBatch(
513-
String batchId, Context context) {
511+
String batchId, Context context) {
514512
return this.asyncClient.beginGetRouteDirectionsBatch(batchId, context).getSyncPoller();
515513
}
516514
}

sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/implementation/RouteClientImpl.java

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,86 +6,99 @@
66

77
import com.azure.core.http.HttpPipeline;
88
import com.azure.core.http.HttpPipelineBuilder;
9-
import com.azure.core.http.policy.CookiePolicy;
109
import com.azure.core.http.policy.RetryPolicy;
1110
import com.azure.core.http.policy.UserAgentPolicy;
1211
import com.azure.core.util.serializer.JacksonAdapter;
1312
import com.azure.core.util.serializer.SerializerAdapter;
1413

15-
/** Initializes a new instance of the RouteClient type. */
14+
/**
15+
* Initializes a new instance of the RouteClient type.
16+
*/
1617
public final class RouteClientImpl {
1718
/**
18-
* Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a
19-
* unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To
20-
* use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
19+
* Specifies which account is intended for usage in conjunction with the Microsoft Entra ID security model. It
20+
* represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane
21+
* Account API. To use Microsoft Entra ID security in Azure Maps see the following
22+
* [articles](https://aka.ms/amauthdetails) for guidance.
2123
*/
2224
private final String clientId;
2325

2426
/**
25-
* Gets Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents
26-
* a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To
27-
* use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
28-
*
27+
* Gets Specifies which account is intended for usage in conjunction with the Microsoft Entra ID security model. It
28+
* represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane
29+
* Account API. To use Microsoft Entra ID security in Azure Maps see the following
30+
* [articles](https://aka.ms/amauthdetails) for guidance.
31+
*
2932
* @return the clientId value.
3033
*/
3134
public String getClientId() {
3235
return this.clientId;
3336
}
3437

35-
/** server parameter. */
38+
/**
39+
* server parameter.
40+
*/
3641
private final String host;
3742

3843
/**
3944
* Gets server parameter.
40-
*
45+
*
4146
* @return the host value.
4247
*/
4348
public String getHost() {
4449
return this.host;
4550
}
4651

47-
/** Api Version. */
52+
/**
53+
* Api Version.
54+
*/
4855
private final String apiVersion;
4956

5057
/**
5158
* Gets Api Version.
52-
*
59+
*
5360
* @return the apiVersion value.
5461
*/
5562
public String getApiVersion() {
5663
return this.apiVersion;
5764
}
5865

59-
/** The HTTP pipeline to send requests through. */
66+
/**
67+
* The HTTP pipeline to send requests through.
68+
*/
6069
private final HttpPipeline httpPipeline;
6170

6271
/**
6372
* Gets The HTTP pipeline to send requests through.
64-
*
73+
*
6574
* @return the httpPipeline value.
6675
*/
6776
public HttpPipeline getHttpPipeline() {
6877
return this.httpPipeline;
6978
}
7079

71-
/** The serializer to serialize an object into a string. */
80+
/**
81+
* The serializer to serialize an object into a string.
82+
*/
7283
private final SerializerAdapter serializerAdapter;
7384

7485
/**
7586
* Gets The serializer to serialize an object into a string.
76-
*
87+
*
7788
* @return the serializerAdapter value.
7889
*/
7990
public SerializerAdapter getSerializerAdapter() {
8091
return this.serializerAdapter;
8192
}
8293

83-
/** The RoutesImpl object to access its operations. */
94+
/**
95+
* The RoutesImpl object to access its operations.
96+
*/
8497
private final RoutesImpl routes;
8598

8699
/**
87100
* Gets the RoutesImpl object to access its operations.
88-
*
101+
*
89102
* @return the RoutesImpl object.
90103
*/
91104
public RoutesImpl getRoutes() {
@@ -94,33 +107,27 @@ public RoutesImpl getRoutes() {
94107

95108
/**
96109
* Initializes an instance of RouteClient client.
97-
*
98-
* @param clientId Specifies which account is intended for usage in conjunction with the Azure AD security model. It
99-
* represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane
100-
* Account API. To use Azure AD security in Azure Maps see the following
101-
* [articles](https://aka.ms/amauthdetails) for guidance.
110+
*
111+
* @param clientId Specifies which account is intended for usage in conjunction with the Microsoft Entra ID security
112+
* model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management
113+
* plane Account API. To use Microsoft Entra ID security in Azure Maps see the following
114+
* [articles](https://aka.ms/amauthdetails) for guidance.
102115
* @param host server parameter.
103116
* @param apiVersion Api Version.
104117
*/
105118
RouteClientImpl(String clientId, String host, String apiVersion) {
106-
this(
107-
new HttpPipelineBuilder()
108-
.policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
109-
.build(),
110-
JacksonAdapter.createDefaultSerializerAdapter(),
111-
clientId,
112-
host,
113-
apiVersion);
119+
this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(),
120+
JacksonAdapter.createDefaultSerializerAdapter(), clientId, host, apiVersion);
114121
}
115122

116123
/**
117124
* Initializes an instance of RouteClient client.
118-
*
125+
*
119126
* @param httpPipeline The HTTP pipeline to send requests through.
120-
* @param clientId Specifies which account is intended for usage in conjunction with the Azure AD security model. It
121-
* represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane
122-
* Account API. To use Azure AD security in Azure Maps see the following
123-
* [articles](https://aka.ms/amauthdetails) for guidance.
127+
* @param clientId Specifies which account is intended for usage in conjunction with the Microsoft Entra ID security
128+
* model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management
129+
* plane Account API. To use Microsoft Entra ID security in Azure Maps see the following
130+
* [articles](https://aka.ms/amauthdetails) for guidance.
124131
* @param host server parameter.
125132
* @param apiVersion Api Version.
126133
*/
@@ -130,22 +137,18 @@ public RoutesImpl getRoutes() {
130137

131138
/**
132139
* Initializes an instance of RouteClient client.
133-
*
140+
*
134141
* @param httpPipeline The HTTP pipeline to send requests through.
135142
* @param serializerAdapter The serializer to serialize an object into a string.
136-
* @param clientId Specifies which account is intended for usage in conjunction with the Azure AD security model. It
137-
* represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane
138-
* Account API. To use Azure AD security in Azure Maps see the following
139-
* [articles](https://aka.ms/amauthdetails) for guidance.
143+
* @param clientId Specifies which account is intended for usage in conjunction with the Microsoft Entra ID security
144+
* model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management
145+
* plane Account API. To use Microsoft Entra ID security in Azure Maps see the following
146+
* [articles](https://aka.ms/amauthdetails) for guidance.
140147
* @param host server parameter.
141148
* @param apiVersion Api Version.
142149
*/
143-
RouteClientImpl(
144-
HttpPipeline httpPipeline,
145-
SerializerAdapter serializerAdapter,
146-
String clientId,
147-
String host,
148-
String apiVersion) {
150+
RouteClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String clientId, String host,
151+
String apiVersion) {
149152
this.httpPipeline = httpPipeline;
150153
this.serializerAdapter = serializerAdapter;
151154
this.clientId = clientId;

0 commit comments

Comments
 (0)