Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Automation] Generate Fluent Lite from iothub#package-2020-03 #21237

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.2 (2021-05-07)

- 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).

### Breaking Change

#### `models.CertificateDescription$Update` was modified

* `withIfMatch(java.lang.String)` was removed

### New Feature

#### `models.CertificateDescription$Update` was modified

* `ifMatch(java.lang.String)` was added

## 1.0.0-beta.1 (2021-03-02)

Expand Down
2 changes: 1 addition & 1 deletion sdk/iothub/azure-resourcemanager-iothub/README.md
Original file line number Diff line number Diff line change
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-2020-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 @@ -182,7 +182,7 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
.append("-")
.append("com.azure.resourcemanager.iothub")
.append("/")
.append("1.0.0-beta.1");
.append("1.0.0-beta.2");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -209,6 +209,7 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
.add(
new BearerTokenAuthenticationPolicy(
credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
policies.addAll(this.policies);
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ 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.
* 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.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
Expand All @@ -84,7 +85,8 @@ 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.
* 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.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
Expand All @@ -109,7 +111,8 @@ 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.
* 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.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
Expand All @@ -129,7 +132,8 @@ 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.
* 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.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
Expand All @@ -147,7 +151,8 @@ 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.
* 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.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package com.azure.resourcemanager.iothub.implementation;

import com.azure.core.util.Context;
import com.azure.resourcemanager.iothub.IotHubManager;
import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
import com.azure.resourcemanager.iothub.models.CertificateBodyDescription;
import com.azure.resourcemanager.iothub.models.CertificateDescription;
Expand All @@ -15,7 +14,7 @@ public final class CertificateDescriptionImpl
implements CertificateDescription, CertificateDescription.Definition, CertificateDescription.Update {
private CertificateDescriptionInner innerObject;

private final IotHubManager serviceManager;
private final com.azure.resourcemanager.iothub.IotHubManager serviceManager;

public String id() {
return this.innerModel().id();
Expand All @@ -41,7 +40,7 @@ public CertificateDescriptionInner innerModel() {
return this.innerObject;
}

private IotHubManager manager() {
private com.azure.resourcemanager.iothub.IotHubManager manager() {
return this.serviceManager;
}

Expand Down Expand Up @@ -97,7 +96,7 @@ public CertificateDescription create(Context context) {
return this;
}

CertificateDescriptionImpl(String name, IotHubManager serviceManager) {
CertificateDescriptionImpl(String name, com.azure.resourcemanager.iothub.IotHubManager serviceManager) {
this.innerObject = new CertificateDescriptionInner();
this.serviceManager = serviceManager;
this.certificateName = name;
Expand Down Expand Up @@ -143,7 +142,8 @@ public CertificateDescription apply(Context context) {
return this;
}

CertificateDescriptionImpl(CertificateDescriptionInner innerObject, IotHubManager serviceManager) {
CertificateDescriptionImpl(
CertificateDescriptionInner innerObject, com.azure.resourcemanager.iothub.IotHubManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
Expand Down Expand Up @@ -182,13 +182,13 @@ public CertificateDescriptionImpl withCertificate(String certificate) {
}

public CertificateDescriptionImpl withIfMatch(String ifMatch) {
if (isInCreateMode()) {
this.createIfMatch = ifMatch;
return this;
} else {
this.updateIfMatch = ifMatch;
return this;
}
this.createIfMatch = ifMatch;
return this;
}

public CertificateDescriptionImpl ifMatch(String ifMatch) {
this.updateIfMatch = ifMatch;
return this;
}

private boolean isInCreateMode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package com.azure.resourcemanager.iothub.implementation;

import com.azure.resourcemanager.iothub.IotHubManager;
import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
import com.azure.resourcemanager.iothub.fluent.models.CertificateListDescriptionInner;
import com.azure.resourcemanager.iothub.models.CertificateDescription;
Expand All @@ -16,9 +15,10 @@
public final class CertificateListDescriptionImpl implements CertificateListDescription {
private CertificateListDescriptionInner innerObject;

private final IotHubManager serviceManager;
private final com.azure.resourcemanager.iothub.IotHubManager serviceManager;

CertificateListDescriptionImpl(CertificateListDescriptionInner innerObject, IotHubManager serviceManager) {
CertificateListDescriptionImpl(
CertificateListDescriptionInner innerObject, com.azure.resourcemanager.iothub.IotHubManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
Expand All @@ -41,7 +41,7 @@ public CertificateListDescriptionInner innerModel() {
return this.innerObject;
}

private IotHubManager manager() {
private com.azure.resourcemanager.iothub.IotHubManager manager() {
return this.serviceManager;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

package com.azure.resourcemanager.iothub.implementation;

import com.azure.resourcemanager.iothub.IotHubManager;
import com.azure.resourcemanager.iothub.fluent.models.CertificateWithNonceDescriptionInner;
import com.azure.resourcemanager.iothub.models.CertificatePropertiesWithNonce;
import com.azure.resourcemanager.iothub.models.CertificateWithNonceDescription;

public final class CertificateWithNonceDescriptionImpl implements CertificateWithNonceDescription {
private CertificateWithNonceDescriptionInner innerObject;

private final IotHubManager serviceManager;
private final com.azure.resourcemanager.iothub.IotHubManager serviceManager;

CertificateWithNonceDescriptionImpl(
CertificateWithNonceDescriptionInner innerObject, IotHubManager serviceManager) {
CertificateWithNonceDescriptionInner innerObject,
com.azure.resourcemanager.iothub.IotHubManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
Expand Down Expand Up @@ -44,7 +44,7 @@ public CertificateWithNonceDescriptionInner innerModel() {
return this.innerObject;
}

private IotHubManager manager() {
private com.azure.resourcemanager.iothub.IotHubManager manager() {
return this.serviceManager;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private Mono<Response<CertificateListDescriptionInner>> listByIotHubWithResponse
resourceName,
accept,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down Expand Up @@ -364,7 +364,7 @@ private Mono<Response<CertificateDescriptionInner>> getWithResponseAsync(
certificateName,
accept,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down Expand Up @@ -545,7 +545,7 @@ private Mono<Response<CertificateDescriptionInner>> createOrUpdateWithResponseAs
certificateDescription,
accept,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down Expand Up @@ -788,7 +788,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(
ifMatch,
accept,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down Expand Up @@ -959,7 +959,7 @@ private Mono<Response<CertificateWithNonceDescriptionInner>> generateVerificatio
ifMatch,
accept,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down Expand Up @@ -1159,7 +1159,7 @@ private Mono<Response<CertificateDescriptionInner>> verifyWithResponseAsync(
certificateVerificationBody,
accept,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.IotHubManager;
import com.azure.resourcemanager.iothub.fluent.CertificatesClient;
import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
import com.azure.resourcemanager.iothub.fluent.models.CertificateListDescriptionInner;
Expand All @@ -25,9 +24,10 @@ public final class CertificatesImpl implements Certificates {

private final CertificatesClient innerClient;

private final IotHubManager serviceManager;
private final com.azure.resourcemanager.iothub.IotHubManager serviceManager;

public CertificatesImpl(CertificatesClient innerClient, IotHubManager serviceManager) {
public CertificatesImpl(
CertificatesClient innerClient, com.azure.resourcemanager.iothub.IotHubManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
Expand Down Expand Up @@ -271,7 +271,7 @@ private CertificatesClient serviceClient() {
return this.innerClient;
}

private IotHubManager manager() {
private com.azure.resourcemanager.iothub.IotHubManager manager() {
return this.serviceManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

package com.azure.resourcemanager.iothub.implementation;

import com.azure.resourcemanager.iothub.IotHubManager;
import com.azure.resourcemanager.iothub.fluent.models.EndpointHealthDataInner;
import com.azure.resourcemanager.iothub.models.EndpointHealthData;
import com.azure.resourcemanager.iothub.models.EndpointHealthStatus;

public final class EndpointHealthDataImpl implements EndpointHealthData {
private EndpointHealthDataInner innerObject;

private final IotHubManager serviceManager;
private final com.azure.resourcemanager.iothub.IotHubManager serviceManager;

EndpointHealthDataImpl(EndpointHealthDataInner innerObject, IotHubManager serviceManager) {
EndpointHealthDataImpl(
EndpointHealthDataInner innerObject, com.azure.resourcemanager.iothub.IotHubManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
Expand All @@ -31,7 +31,7 @@ public EndpointHealthDataInner innerModel() {
return this.innerObject;
}

private IotHubManager manager() {
private com.azure.resourcemanager.iothub.IotHubManager manager() {
return this.serviceManager;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package com.azure.resourcemanager.iothub.implementation;

import com.azure.resourcemanager.iothub.IotHubManager;
import com.azure.resourcemanager.iothub.fluent.models.EventHubConsumerGroupInfoInner;
import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupInfo;
import java.util.Collections;
Expand All @@ -13,9 +12,10 @@
public final class EventHubConsumerGroupInfoImpl implements EventHubConsumerGroupInfo {
private EventHubConsumerGroupInfoInner innerObject;

private final IotHubManager serviceManager;
private final com.azure.resourcemanager.iothub.IotHubManager serviceManager;

EventHubConsumerGroupInfoImpl(EventHubConsumerGroupInfoInner innerObject, IotHubManager serviceManager) {
EventHubConsumerGroupInfoImpl(
EventHubConsumerGroupInfoInner innerObject, com.azure.resourcemanager.iothub.IotHubManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
Expand Down Expand Up @@ -49,7 +49,7 @@ public EventHubConsumerGroupInfoInner innerModel() {
return this.innerObject;
}

private IotHubManager manager() {
private com.azure.resourcemanager.iothub.IotHubManager manager() {
return this.serviceManager;
}
}
Loading