Skip to content

Commit

Permalink
CodeGen from PR 14436 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge db830dc16176942d8e1e645a514f2af35dd1b7a7 into f15b4f3299df66c755156aaea2c3f0c64f1840bb
  • Loading branch information
SDKAuto committed May 17, 2021
1 parent 4eb19e5 commit c4ab57b
Show file tree
Hide file tree
Showing 45 changed files with 2,146 additions and 234 deletions.
3 changes: 2 additions & 1 deletion sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2021-05-17)

- 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-2021-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0-beta.2 (2021-05-13)

Expand Down
4 changes: 2 additions & 2 deletions sdk/iothub/azure-resourcemanager-iothub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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-2020-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
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-2021-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-iothub</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
2 changes: 1 addition & 1 deletion sdk/iothub/azure-resourcemanager-iothub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for IotHub Management</name>
<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-2020-03.</description>
<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-2021-07.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
.append("-")
.append("com.azure.resourcemanager.iothub")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
import com.azure.resourcemanager.iothub.fluent.models.CertificateListDescriptionInner;
import com.azure.resourcemanager.iothub.fluent.models.CertificateWithNonceDescriptionInner;
import com.azure.resourcemanager.iothub.models.CertificateBodyDescription;
import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription;

/** An instance of this class provides access to all the operations defined in CertificatesClient. */
Expand Down Expand Up @@ -96,7 +95,7 @@ CertificateDescriptionInner createOrUpdate(
String resourceGroupName,
String resourceName,
String certificateName,
CertificateBodyDescription certificateDescription);
CertificateDescriptionInner certificateDescription);

/**
* Adds new or replaces existing certificate.
Expand All @@ -119,7 +118,7 @@ Response<CertificateDescriptionInner> createOrUpdateWithResponse(
String resourceGroupName,
String resourceName,
String certificateName,
CertificateBodyDescription certificateDescription,
CertificateDescriptionInner certificateDescription,
String ifMatch,
Context context);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.azure.resourcemanager.iothub.fluent.models.SharedAccessSignatureAuthorizationRuleInner;
import com.azure.resourcemanager.iothub.fluent.models.TestAllRoutesResultInner;
import com.azure.resourcemanager.iothub.fluent.models.TestRouteResultInner;
import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupBodyDescription;
import com.azure.resourcemanager.iothub.models.ExportDevicesRequest;
import com.azure.resourcemanager.iothub.models.ImportDevicesRequest;
import com.azure.resourcemanager.iothub.models.OperationInputs;
Expand Down Expand Up @@ -64,8 +65,7 @@ Response<IotHubDescriptionInner> getByResourceGroupWithResponse(
/**
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
* hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
* default, which may lead to unexpected behavior.
* hub.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
Expand All @@ -85,8 +85,7 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginCrea
/**
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
* hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
* default, which may lead to unexpected behavior.
* hub.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
Expand All @@ -111,8 +110,7 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginCrea
/**
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
* hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
* default, which may lead to unexpected behavior.
* hub.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
Expand All @@ -132,8 +130,7 @@ IotHubDescriptionInner createOrUpdate(
/**
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
* hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
* default, which may lead to unexpected behavior.
* hub.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
Expand All @@ -151,8 +148,7 @@ IotHubDescriptionInner createOrUpdate(
/**
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
* hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
* default, which may lead to unexpected behavior.
* hub.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
Expand Down Expand Up @@ -481,6 +477,7 @@ Response<EventHubConsumerGroupInfoInner> getEventHubConsumerGroupWithResponse(
* @param resourceName The name of the IoT hub.
* @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
* @param name The name of the consumer group to add.
* @param consumerGroupBody The consumer group to add.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
Expand All @@ -489,7 +486,11 @@ Response<EventHubConsumerGroupInfoInner> getEventHubConsumerGroupWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
String resourceGroupName, String resourceName, String eventHubEndpointName, String name);
String resourceGroupName,
String resourceName,
String eventHubEndpointName,
String name,
EventHubConsumerGroupBodyDescription consumerGroupBody);

/**
* Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.
Expand All @@ -498,6 +499,7 @@ EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
* @param resourceName The name of the IoT hub.
* @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
* @param name The name of the consumer group to add.
* @param consumerGroupBody The consumer group to add.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
Expand All @@ -507,7 +509,12 @@ EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<EventHubConsumerGroupInfoInner> createEventHubConsumerGroupWithResponse(
String resourceGroupName, String resourceName, String eventHubEndpointName, String name, Context context);
String resourceGroupName,
String resourceName,
String eventHubEndpointName,
String name,
EventHubConsumerGroupBodyDescription consumerGroupBody,
Context context);

/**
* Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
package com.azure.resourcemanager.iothub.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.DateTimeRfc1123;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.EndpointHealthStatus;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** The health data for an endpoint. */
@Fluent
Expand Down Expand Up @@ -37,6 +39,30 @@ public final class EndpointHealthDataInner {
@JsonProperty(value = "healthStatus")
private EndpointHealthStatus healthStatus;

/*
* Last error obtained when a message failed to be delivered to iot hub
*/
@JsonProperty(value = "lastKnownError")
private String lastKnownError;

/*
* Time at which the last known error occurred
*/
@JsonProperty(value = "lastKnownErrorTime")
private DateTimeRfc1123 lastKnownErrorTime;

/*
* Last time iot hub successfully sent a message to the endpoint
*/
@JsonProperty(value = "lastSuccessfulSendAttemptTime")
private DateTimeRfc1123 lastSuccessfulSendAttemptTime;

/*
* Last time iot hub tried to send a message to the endpoint
*/
@JsonProperty(value = "lastSendAttemptTime")
private DateTimeRfc1123 lastSendAttemptTime;

/**
* Get the endpointId property: Id of the endpoint.
*
Expand Down Expand Up @@ -91,6 +117,107 @@ public EndpointHealthDataInner withHealthStatus(EndpointHealthStatus healthStatu
return this;
}

/**
* Get the lastKnownError property: Last error obtained when a message failed to be delivered to iot hub.
*
* @return the lastKnownError value.
*/
public String lastKnownError() {
return this.lastKnownError;
}

/**
* Set the lastKnownError property: Last error obtained when a message failed to be delivered to iot hub.
*
* @param lastKnownError the lastKnownError value to set.
* @return the EndpointHealthDataInner object itself.
*/
public EndpointHealthDataInner withLastKnownError(String lastKnownError) {
this.lastKnownError = lastKnownError;
return this;
}

/**
* Get the lastKnownErrorTime property: Time at which the last known error occurred.
*
* @return the lastKnownErrorTime value.
*/
public OffsetDateTime lastKnownErrorTime() {
if (this.lastKnownErrorTime == null) {
return null;
}
return this.lastKnownErrorTime.getDateTime();
}

/**
* Set the lastKnownErrorTime property: Time at which the last known error occurred.
*
* @param lastKnownErrorTime the lastKnownErrorTime value to set.
* @return the EndpointHealthDataInner object itself.
*/
public EndpointHealthDataInner withLastKnownErrorTime(OffsetDateTime lastKnownErrorTime) {
if (lastKnownErrorTime == null) {
this.lastKnownErrorTime = null;
} else {
this.lastKnownErrorTime = new DateTimeRfc1123(lastKnownErrorTime);
}
return this;
}

/**
* Get the lastSuccessfulSendAttemptTime property: Last time iot hub successfully sent a message to the endpoint.
*
* @return the lastSuccessfulSendAttemptTime value.
*/
public OffsetDateTime lastSuccessfulSendAttemptTime() {
if (this.lastSuccessfulSendAttemptTime == null) {
return null;
}
return this.lastSuccessfulSendAttemptTime.getDateTime();
}

/**
* Set the lastSuccessfulSendAttemptTime property: Last time iot hub successfully sent a message to the endpoint.
*
* @param lastSuccessfulSendAttemptTime the lastSuccessfulSendAttemptTime value to set.
* @return the EndpointHealthDataInner object itself.
*/
public EndpointHealthDataInner withLastSuccessfulSendAttemptTime(OffsetDateTime lastSuccessfulSendAttemptTime) {
if (lastSuccessfulSendAttemptTime == null) {
this.lastSuccessfulSendAttemptTime = null;
} else {
this.lastSuccessfulSendAttemptTime = new DateTimeRfc1123(lastSuccessfulSendAttemptTime);
}
return this;
}

/**
* Get the lastSendAttemptTime property: Last time iot hub tried to send a message to the endpoint.
*
* @return the lastSendAttemptTime value.
*/
public OffsetDateTime lastSendAttemptTime() {
if (this.lastSendAttemptTime == null) {
return null;
}
return this.lastSendAttemptTime.getDateTime();
}

/**
* Set the lastSendAttemptTime property: Last time iot hub tried to send a message to the endpoint.
*
* @param lastSendAttemptTime the lastSendAttemptTime value to set.
* @return the EndpointHealthDataInner object itself.
*/
public EndpointHealthDataInner withLastSendAttemptTime(OffsetDateTime lastSendAttemptTime) {
if (lastSendAttemptTime == null) {
this.lastSendAttemptTime = null;
} else {
this.lastSendAttemptTime = new DateTimeRfc1123(lastSendAttemptTime);
}
return this;
}

/**
* Validates the instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.ArmIdentity;
import com.azure.resourcemanager.iothub.models.IotHubProperties;
import com.azure.resourcemanager.iothub.models.IotHubSkuInfo;
import com.fasterxml.jackson.annotation.JsonIgnore;
Expand Down Expand Up @@ -38,6 +39,12 @@ public final class IotHubDescriptionInner extends Resource {
@JsonProperty(value = "sku", required = true)
private IotHubSkuInfo sku;

/*
* The managed identities for the IotHub.
*/
@JsonProperty(value = "identity")
private ArmIdentity identity;

/**
* Get the etag property: The Etag field is *not* required. If it is provided in the response body, it must also be
* provided as a header per the normal ETag convention.
Expand Down Expand Up @@ -100,6 +107,26 @@ public IotHubDescriptionInner withSku(IotHubSkuInfo sku) {
return this;
}

/**
* Get the identity property: The managed identities for the IotHub.
*
* @return the identity value.
*/
public ArmIdentity identity() {
return this.identity;
}

/**
* Set the identity property: The managed identities for the IotHub.
*
* @param identity the identity value to set.
* @return the IotHubDescriptionInner object itself.
*/
public IotHubDescriptionInner withIdentity(ArmIdentity identity) {
this.identity = identity;
return this;
}

/** {@inheritDoc} */
@Override
public IotHubDescriptionInner withLocation(String location) {
Expand Down Expand Up @@ -130,5 +157,8 @@ public void validate() {
} else {
sku().validate();
}
if (identity() != null) {
identity().validate();
}
}
}
Loading

0 comments on commit c4ab57b

Please sign in to comment.