Skip to content

Commit

Permalink
CodeGen from PR 13243 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 3415900195b83632a85c484f86c89e1c04c9a754 into 427416fea2914776d8e200dbb93b0608ac15af91
  • Loading branch information
SDKAuto committed Mar 16, 2021
1 parent 6e215c0 commit 11a1211
Show file tree
Hide file tree
Showing 66 changed files with 2,014 additions and 329 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.2 (Unreleased)
## 1.0.0-beta.1 (2021-03-16)

- 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-03. 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.1 (2021-03-02)

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-03. 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.1</version>
<version>1.0.0-beta.2</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. 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 https://aka.ms/azsdk/java/mgmt</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-03.</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 @@ -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 @@ -476,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 @@ -484,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 @@ -493,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 @@ -502,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 11a1211

Please sign in to comment.