Skip to content

Commit 9e4cbd3

Browse files
authored
[Automation] Generate Fluent Lite from Swagger specification/iothub/resource-manager/Microsoft.Devices/IoTHub/readme.md#package-preview-2025-08 (Azure#47300)
1 parent ffdaad9 commit 9e4cbd3

File tree

126 files changed

+4005
-2318
lines changed

Some content is hidden

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

126 files changed

+4005
-2318
lines changed

eng/automation/api-specs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ hybridaks:
6969
service: hybridcontainerservice
7070
informatica:
7171
service: informaticadatamanagement
72+
iothub/Microsoft.Devices/IoTHub:
73+
service: iothub
7274
keyvault:
7375
suffix: generated
7476
kubernetesconfiguration/Microsoft.KubernetesConfiguration/extensionTypes:

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

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,45 @@
11
# Release History
22

3-
## 1.4.0-beta.1 (Unreleased)
3+
## 1.4.0-beta.1 (2025-11-17)
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-preview-2025-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
46

57
### Features Added
68

7-
### Breaking Changes
9+
* `models.EncryptionPropertiesDescription` was added
10+
11+
* `models.DeviceRegistry` was added
12+
13+
* `models.KeyVaultKeyProperties` was added
14+
15+
* `models.IpVersion` was added
16+
17+
* `models.RootCertificateProperties` was added
18+
19+
* `models.IotHubPropertiesDeviceStreams` was added
20+
21+
#### `models.IotHubProperties` was modified
22+
23+
* `rootCertificate()` was added
24+
* `deviceStreams()` was added
25+
* `withDeviceStreams(models.IotHubPropertiesDeviceStreams)` was added
26+
* `withRootCertificate(models.RootCertificateProperties)` was added
27+
* `encryption()` was added
28+
* `withDeviceRegistry(models.DeviceRegistry)` was added
29+
* `withEncryption(models.EncryptionPropertiesDescription)` was added
30+
* `withIpVersion(models.IpVersion)` was added
31+
* `deviceRegistry()` was added
32+
* `ipVersion()` was added
33+
34+
#### `models.CertificatePropertiesWithNonce` was modified
35+
36+
* `policyResourceId()` was added
37+
* `withPolicyResourceId(java.lang.String)` was added
838

9-
### Bugs Fixed
39+
#### `models.CertificateProperties` was modified
1040

11-
### Other Changes
41+
* `withPolicyResourceId(java.lang.String)` was added
42+
* `policyResourceId()` was added
1243

1344
## 1.3.0 (2024-12-11)
1445

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

Lines changed: 3 additions & 5 deletions
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-2023-06. 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-preview-2025-08. 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

@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
IotHubManager manager = IotHubManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -143,5 +143,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
143143
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
144144
[coc]: https://opensource.microsoft.com/codeofconduct/
145145
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
146-
147-

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

Lines changed: 125 additions & 68 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for IotHub Management</name>
21-
<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-2023-06.</description>
21+
<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-preview-2025-08.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>
@@ -45,7 +45,7 @@
4545
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
48-
<spotless.skip>false</spotless.skip>
48+
<revapi.skip>true</revapi.skip>
4949
</properties>
5050
<dependencies>
5151
<dependency>

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.azure.core.http.policy.UserAgentPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.iothub.fluent.IotHubClient;
2728
import com.azure.resourcemanager.iothub.implementation.CertificatesImpl;
@@ -43,6 +44,7 @@
4344
import java.time.temporal.ChronoUnit;
4445
import java.util.ArrayList;
4546
import java.util.List;
47+
import java.util.Map;
4648
import java.util.Objects;
4749
import java.util.stream.Collectors;
4850

@@ -117,6 +119,9 @@ public static Configurable configure() {
117119
*/
118120
public static final class Configurable {
119121
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
122+
private static final String SDK_VERSION = "version";
123+
private static final Map<String, String> PROPERTIES
124+
= CoreUtils.getProperties("azure-resourcemanager-iothub.properties");
120125

121126
private HttpClient httpClient;
122127
private HttpLogOptions httpLogOptions;
@@ -224,12 +229,14 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
224229
Objects.requireNonNull(credential, "'credential' cannot be null.");
225230
Objects.requireNonNull(profile, "'profile' cannot be null.");
226231

232+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
233+
227234
StringBuilder userAgentBuilder = new StringBuilder();
228235
userAgentBuilder.append("azsdk-java")
229236
.append("-")
230237
.append("com.azure.resourcemanager.iothub")
231238
.append("/")
232-
.append("1.3.0");
239+
.append(clientVersion);
233240
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
234241
userAgentBuilder.append(" (")
235242
.append(Configuration.getGlobalConfiguration().get("java.version"))

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ Response<IotHubDescriptionInner> getByResourceGroupWithResponse(String resourceG
7373
*
7474
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
7575
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
76-
* hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
77-
* default, which may lead to unexpected behavior.
76+
* hub.
7877
*
7978
* @param resourceGroupName The name of the resource group that contains the IoT hub.
8079
* @param resourceName The name of the IoT hub.
@@ -94,8 +93,7 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginCrea
9493
*
9594
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
9695
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
97-
* hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
98-
* default, which may lead to unexpected behavior.
96+
* hub.
9997
*
10098
* @param resourceGroupName The name of the resource group that contains the IoT hub.
10199
* @param resourceName The name of the IoT hub.
@@ -118,8 +116,7 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginCrea
118116
*
119117
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
120118
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
121-
* hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
122-
* default, which may lead to unexpected behavior.
119+
* hub.
123120
*
124121
* @param resourceGroupName The name of the resource group that contains the IoT hub.
125122
* @param resourceName The name of the IoT hub.
@@ -139,8 +136,7 @@ IotHubDescriptionInner createOrUpdate(String resourceGroupName, String resourceN
139136
*
140137
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
141138
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
142-
* hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
143-
* default, which may lead to unexpected behavior.
139+
* hub.
144140
*
145141
* @param resourceGroupName The name of the resource group that contains the IoT hub.
146142
* @param resourceName The name of the IoT hub.

sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateDescriptionImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,6 @@ public CertificateDescriptionImpl withIfMatch(String ifMatch) {
152152
}
153153

154154
private boolean isInCreateMode() {
155-
return this.innerModel().id() == null;
155+
return this.innerModel() == null || this.innerModel().id() == null;
156156
}
157157
}

0 commit comments

Comments
 (0)