Skip to content

Commit 3ff6973

Browse files
author
SDKAuto
committed
CodeGen from PR 17304 in Azure/azure-rest-api-specs
Merge a49e7a01941f7ce5e858874015a2f84c060922f6 into 8a061f1e9031450b9eb5546d242f2a28c93eaa69
1 parent 41a4df6 commit 3ff6973

File tree

75 files changed

+1857
-770
lines changed

Some content is hidden

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

75 files changed

+1857
-770
lines changed

sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
## 1.0.0-beta.1 (2022-01-18)
4+
5+
- Azure Resource Manager IotHub client library for Java. This package contains Microsoft Azure SDK for IotHub Management SDK. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
6+
37
## 1.1.0 (2021-08-30)
48

59
- Add support for new service API version 2021-07-01

sdk/iothub/azure-resourcemanager-iothub/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager IotHub client library for Java.
44

5-
This package contains Microsoft Azure SDK for IotHub Management SDK. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for IotHub Management SDK. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

sdk/iothub/azure-resourcemanager-iothub/SAMPLE.md

Lines changed: 1114 additions & 58 deletions
Large diffs are not rendered by default.

sdk/iothub/azure-resourcemanager-iothub/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<packaging>jar</packaging>
1414

1515
<name>Microsoft Azure SDK for IotHub Management</name>
16-
<description>This package contains Microsoft Azure SDK for IotHub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07.</description>
16+
<description>This package contains Microsoft Azure SDK for IotHub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07-02.</description>
1717
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

1919
<licenses>

sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.azure.core.http.HttpClient;
99
import com.azure.core.http.HttpPipeline;
1010
import com.azure.core.http.HttpPipelineBuilder;
11+
import com.azure.core.http.HttpPipelinePosition;
1112
import com.azure.core.http.policy.AddDatePolicy;
1213
import com.azure.core.http.policy.HttpLogOptions;
1314
import com.azure.core.http.policy.HttpLoggingPolicy;
@@ -41,6 +42,7 @@
4142
import java.util.ArrayList;
4243
import java.util.List;
4344
import java.util.Objects;
45+
import java.util.stream.Collectors;
4446

4547
/** Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure subscription. */
4648
public final class IotHubManager {
@@ -194,7 +196,7 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
194196
.append("-")
195197
.append("com.azure.resourcemanager.iothub")
196198
.append("/")
197-
.append("1.1.0");
199+
.append("1.0.0-beta.1");
198200
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
199201
userAgentBuilder
200202
.append(" (")
@@ -217,11 +219,24 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
217219
List<HttpPipelinePolicy> policies = new ArrayList<>();
218220
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
219221
policies.add(new RequestIdPolicy());
222+
policies
223+
.addAll(
224+
this
225+
.policies
226+
.stream()
227+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
228+
.collect(Collectors.toList()));
220229
HttpPolicyProviders.addBeforeRetryPolicies(policies);
221230
policies.add(retryPolicy);
222231
policies.add(new AddDatePolicy());
223232
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
224-
policies.addAll(this.policies);
233+
policies
234+
.addAll(
235+
this
236+
.policies
237+
.stream()
238+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
239+
.collect(Collectors.toList()));
225240
HttpPolicyProviders.addAfterRetryPolicies(policies);
226241
policies.add(new HttpLoggingPolicy(httpLogOptions));
227242
HttpPipeline httpPipeline =

sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/CertificatesClient.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public interface CertificatesClient {
3939
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
4040
* server.
4141
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
42-
* @return the JSON-serialized array of Certificate objects.
42+
* @return the JSON-serialized array of Certificate objects along with {@link Response}.
4343
*/
4444
@ServiceMethod(returns = ReturnType.SINGLE)
4545
Response<CertificateListDescriptionInner> listByIotHubWithResponse(
@@ -71,7 +71,7 @@ Response<CertificateListDescriptionInner> listByIotHubWithResponse(
7171
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
7272
* server.
7373
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
74-
* @return the X509 Certificate.
74+
* @return the X509 Certificate along with {@link Response}.
7575
*/
7676
@ServiceMethod(returns = ReturnType.SINGLE)
7777
Response<CertificateDescriptionInner> getWithResponse(
@@ -111,7 +111,7 @@ CertificateDescriptionInner createOrUpdate(
111111
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
112112
* server.
113113
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
114-
* @return the X509 Certificate.
114+
* @return the X509 Certificate along with {@link Response}.
115115
*/
116116
@ServiceMethod(returns = ReturnType.SINGLE)
117117
Response<CertificateDescriptionInner> createOrUpdateWithResponse(
@@ -149,7 +149,7 @@ Response<CertificateDescriptionInner> createOrUpdateWithResponse(
149149
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
150150
* server.
151151
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
152-
* @return the response.
152+
* @return the {@link Response}.
153153
*/
154154
@ServiceMethod(returns = ReturnType.SINGLE)
155155
Response<Void> deleteWithResponse(
@@ -186,7 +186,7 @@ CertificateWithNonceDescriptionInner generateVerificationCode(
186186
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
187187
* server.
188188
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
189-
* @return the X509 Certificate.
189+
* @return the X509 Certificate along with {@link Response}.
190190
*/
191191
@ServiceMethod(returns = ReturnType.SINGLE)
192192
Response<CertificateWithNonceDescriptionInner> generateVerificationCodeWithResponse(
@@ -229,7 +229,7 @@ CertificateDescriptionInner verify(
229229
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
230230
* server.
231231
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
232-
* @return the X509 Certificate.
232+
* @return the X509 Certificate along with {@link Response}.
233233
*/
234234
@ServiceMethod(returns = ReturnType.SINGLE)
235235
Response<CertificateDescriptionInner> verifyWithResponse(

sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import com.azure.resourcemanager.iothub.models.TagsResource;
3030
import com.azure.resourcemanager.iothub.models.TestAllRoutesInput;
3131
import com.azure.resourcemanager.iothub.models.TestRouteInput;
32+
import reactor.core.publisher.Mono;
3233

3334
/** An instance of this class provides access to all the operations defined in IotHubResourcesClient. */
3435
public interface IotHubResourcesClient {
@@ -56,7 +57,7 @@ public interface IotHubResourcesClient {
5657
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
5758
* server.
5859
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
59-
* @return the non-security related metadata of an IoT hub.
60+
* @return the non-security related metadata of an IoT hub along with {@link Response}.
6061
*/
6162
@ServiceMethod(returns = ReturnType.SINGLE)
6263
Response<IotHubDescriptionInner> getByResourceGroupWithResponse(
@@ -77,9 +78,9 @@ Response<IotHubDescriptionInner> getByResourceGroupWithResponse(
7778
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
7879
* server.
7980
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
80-
* @return the description of the IoT hub.
81+
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
8182
*/
82-
@ServiceMethod(returns = ReturnType.SINGLE)
83+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
8384
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginCreateOrUpdate(
8485
String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription, String ifMatch);
8586

@@ -99,9 +100,9 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginCrea
99100
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
100101
* server.
101102
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
102-
* @return the description of the IoT hub.
103+
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
103104
*/
104-
@ServiceMethod(returns = ReturnType.SINGLE)
105+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
105106
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginCreateOrUpdate(
106107
String resourceGroupName,
107108
String resourceName,
@@ -184,9 +185,9 @@ IotHubDescriptionInner createOrUpdate(
184185
* @throws IllegalArgumentException thrown if parameters fail the validation.
185186
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
186187
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
187-
* @return the description of the IoT hub.
188+
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
188189
*/
189-
@ServiceMethod(returns = ReturnType.SINGLE)
190+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
190191
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginUpdate(
191192
String resourceGroupName, String resourceName, TagsResource iotHubTags);
192193

@@ -200,9 +201,9 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginUpda
200201
* @throws IllegalArgumentException thrown if parameters fail the validation.
201202
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
202203
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
203-
* @return the description of the IoT hub.
204+
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
204205
*/
205-
@ServiceMethod(returns = ReturnType.SINGLE)
206+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
206207
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginUpdate(
207208
String resourceGroupName, String resourceName, TagsResource iotHubTags, Context context);
208209

@@ -245,9 +246,9 @@ IotHubDescriptionInner update(
245246
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
246247
* server.
247248
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
248-
* @return the description of the IoT hub.
249+
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
249250
*/
250-
@ServiceMethod(returns = ReturnType.SINGLE)
251+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
251252
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginDelete(
252253
String resourceGroupName, String resourceName);
253254

@@ -261,9 +262,9 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginDele
261262
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
262263
* server.
263264
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
264-
* @return the description of the IoT hub.
265+
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
265266
*/
266-
@ServiceMethod(returns = ReturnType.SINGLE)
267+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
267268
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginDelete(
268269
String resourceGroupName, String resourceName, Context context);
269270

@@ -371,7 +372,7 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginDele
371372
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
372373
* server.
373374
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
374-
* @return the statistics from an IoT hub.
375+
* @return the statistics from an IoT hub along with {@link Response}.
375376
*/
376377
@ServiceMethod(returns = ReturnType.SINGLE)
377378
Response<RegistryStatisticsInner> getStatsWithResponse(
@@ -469,7 +470,8 @@ EventHubConsumerGroupInfoInner getEventHubConsumerGroup(
469470
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
470471
* server.
471472
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
472-
* @return a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
473+
* @return a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub along with {@link
474+
* Response}.
473475
*/
474476
@ServiceMethod(returns = ReturnType.SINGLE)
475477
Response<EventHubConsumerGroupInfoInner> getEventHubConsumerGroupWithResponse(
@@ -510,7 +512,7 @@ EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
510512
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
511513
* server.
512514
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
513-
* @return the properties of the EventHubConsumerGroupInfo object.
515+
* @return the properties of the EventHubConsumerGroupInfo object along with {@link Response}.
514516
*/
515517
@ServiceMethod(returns = ReturnType.SINGLE)
516518
Response<EventHubConsumerGroupInfoInner> createEventHubConsumerGroupWithResponse(
@@ -549,7 +551,7 @@ void deleteEventHubConsumerGroup(
549551
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
550552
* server.
551553
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
552-
* @return the response.
554+
* @return the {@link Response}.
553555
*/
554556
@ServiceMethod(returns = ReturnType.SINGLE)
555557
Response<Void> deleteEventHubConsumerGroupWithResponse(
@@ -614,7 +616,7 @@ Response<Void> deleteEventHubConsumerGroupWithResponse(
614616
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
615617
* server.
616618
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
617-
* @return the details of a job from an IoT hub.
619+
* @return the details of a job from an IoT hub along with {@link Response}.
618620
*/
619621
@ServiceMethod(returns = ReturnType.SINGLE)
620622
Response<JobResponseInner> getJobWithResponse(
@@ -704,7 +706,7 @@ PagedIterable<EndpointHealthDataInner> getEndpointHealth(
704706
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
705707
* server.
706708
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
707-
* @return the properties indicating whether a given IoT hub name is available.
709+
* @return the properties indicating whether a given IoT hub name is available along with {@link Response}.
708710
*/
709711
@ServiceMethod(returns = ReturnType.SINGLE)
710712
Response<IotHubNameAvailabilityInfoInner> checkNameAvailabilityWithResponse(
@@ -736,7 +738,7 @@ Response<IotHubNameAvailabilityInfoInner> checkNameAvailabilityWithResponse(
736738
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
737739
* server.
738740
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
739-
* @return result of testing all routes.
741+
* @return result of testing all routes along with {@link Response}.
740742
*/
741743
@ServiceMethod(returns = ReturnType.SINGLE)
742744
Response<TestAllRoutesResultInner> testAllRoutesWithResponse(
@@ -768,7 +770,7 @@ Response<TestAllRoutesResultInner> testAllRoutesWithResponse(
768770
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
769771
* server.
770772
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
771-
* @return result of testing one route.
773+
* @return result of testing one route along with {@link Response}.
772774
*/
773775
@ServiceMethod(returns = ReturnType.SINGLE)
774776
Response<TestRouteResultInner> testRouteWithResponse(
@@ -835,7 +837,7 @@ SharedAccessSignatureAuthorizationRuleInner getKeysForKeyName(
835837
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
836838
* server.
837839
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
838-
* @return a shared access policy by name from an IoT hub.
840+
* @return a shared access policy by name from an IoT hub along with {@link Response}.
839841
*/
840842
@ServiceMethod(returns = ReturnType.SINGLE)
841843
Response<SharedAccessSignatureAuthorizationRuleInner> getKeysForKeyNameWithResponse(
@@ -872,7 +874,7 @@ JobResponseInner exportDevices(
872874
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
873875
* server.
874876
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
875-
* @return the properties of the Job Response object.
877+
* @return the properties of the Job Response object along with {@link Response}.
876878
*/
877879
@ServiceMethod(returns = ReturnType.SINGLE)
878880
Response<JobResponseInner> exportDevicesWithResponse(
@@ -909,7 +911,7 @@ JobResponseInner importDevices(
909911
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
910912
* server.
911913
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
912-
* @return the properties of the Job Response object.
914+
* @return the properties of the Job Response object along with {@link Response}.
913915
*/
914916
@ServiceMethod(returns = ReturnType.SINGLE)
915917
Response<JobResponseInner> importDevicesWithResponse(

0 commit comments

Comments
 (0)