Skip to content
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
1 change: 1 addition & 0 deletions eng/versioning/external_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ org.springframework:spring-messaging;5.2.10.RELEASE
org.springframework:spring-tx;5.2.10.RELEASE
org.springframework:spring-web;5.2.10.RELEASE
org.springframework:spring-webmvc;5.2.10.RELEASE
org.springframework:spring-webflux;5.2.10.RELEASE

# spring-boot-starter-parent is not managed by spring-boot-dependencies or spring-cloud-dependencies.
org.springframework.boot:spring-boot-starter-parent;2.3.7.RELEASE
Expand Down
3 changes: 2 additions & 1 deletion sdk/confluent/azure-resourcemanager-confluent/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-02-26)

- Azure Resource Manager Confluent client library for Java. This package contains Microsoft Azure SDK for Confluent Management SDK. Package tag package-2020-03-01. 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-01-14)

Expand Down
18 changes: 17 additions & 1 deletion sdk/confluent/azure-resourcemanager-confluent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ Azure Resource Manager Confluent client library for Java.

This package contains Microsoft Azure SDK for Confluent Management SDK. Package tag package-2020-03-01. 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

We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.

If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.

Thank you in advance for your collaboration. We really appreciate your time!

## Documentation

Various documentation is available to help you get started

- [API reference documentation][docs]

## Getting started

### Prerequisites
Expand All @@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for Confluent Management SDK. Package
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-confluent</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -75,6 +89,8 @@ For details on contributing to this repository, see the [contributing guide](htt
1. Create new Pull Request

<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
Expand Down
5 changes: 5 additions & 0 deletions sdk/confluent/azure-resourcemanager-confluent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.13.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-management</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,31 @@ public ConfluentManager authenticate(TokenCredential credential, AzureProfile pr
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder
.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.confluent")
.append("/")
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.name"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version"))
.append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}

if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies
.add(
new UserAgentPolicy(
null,
"com.azure.resourcemanager.confluent",
"1.0.0-beta.1",
Configuration.getGlobalConfiguration()));
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class OrganizationResourceInner extends Resource {
/*
* Provision states for confluent RP
*/
@JsonProperty(value = "properties.provisioningState")
@JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ProvisionState provisioningState;

/*
Expand Down Expand Up @@ -76,17 +76,6 @@ public ProvisionState provisioningState() {
return this.provisioningState;
}

/**
* Set the provisioningState property: Provision states for confluent RP.
*
* @param provisioningState the provisioningState value to set.
* @return the OrganizationResourceInner object itself.
*/
public OrganizationResourceInner withProvisioningState(ProvisionState provisioningState) {
this.provisioningState = provisioningState;
return this;
}

/**
* Get the organizationId property: Id of the Confluent organization.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public <T, U> Mono<U> getLroFinalResultOrError(AsyncPollResponse<PollResult<T>,
if (managementError.getCode() == null || managementError.getMessage() == null) {
managementError = null;
}
} catch (IOException ioe) {
} catch (IOException | RuntimeException ioe) {
logger.logThrowableAsWarning(ioe);
}
}
Expand Down Expand Up @@ -287,7 +287,7 @@ private static final class HttpResponseImpl extends HttpResponse {
super(null);
this.statusCode = statusCode;
this.httpHeaders = httpHeaders;
this.responseBody = responseBody.getBytes(StandardCharsets.UTF_8);
this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
}

public int getStatusCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.PathParam;
import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
Expand Down Expand Up @@ -67,6 +68,7 @@ private interface MarketplaceAgreementsService {
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ConfluentAgreementResourceListResponse>> list(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@HeaderParam("Accept") String accept,
Context context);
Expand All @@ -77,6 +79,7 @@ Mono<Response<ConfluentAgreementResourceListResponse>> list(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ConfluentAgreementResourceInner>> create(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@BodyParam("application/json") ConfluentAgreementResourceInner body,
@HeaderParam("Accept") String accept,
Expand Down Expand Up @@ -117,7 +120,14 @@ private Mono<PagedResponse<ConfluentAgreementResourceInner>> listSinglePageAsync
final String accept = "application/json";
return FluxUtil
.withContext(
context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), accept, context))
context ->
service
.list(
this.client.getEndpoint(),
this.client.getApiVersion(),
this.client.getSubscriptionId(),
accept,
context))
.<PagedResponse<ConfluentAgreementResourceInner>>map(
res ->
new PagedResponseBase<>(
Expand Down Expand Up @@ -156,7 +166,12 @@ private Mono<PagedResponse<ConfluentAgreementResourceInner>> listSinglePageAsync
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.list(this.client.getEndpoint(), this.client.getSubscriptionId(), accept, context)
.list(
this.client.getEndpoint(),
this.client.getApiVersion(),
this.client.getSubscriptionId(),
accept,
context)
.map(
res ->
new PagedResponseBase<>(
Expand Down Expand Up @@ -252,7 +267,14 @@ private Mono<Response<ConfluentAgreementResourceInner>> createWithResponseAsync(
return FluxUtil
.withContext(
context ->
service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), body, accept, context))
service
.create(
this.client.getEndpoint(),
this.client.getApiVersion(),
this.client.getSubscriptionId(),
body,
accept,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}

Expand Down Expand Up @@ -286,7 +308,14 @@ private Mono<Response<ConfluentAgreementResourceInner>> createWithResponseAsync(
}
final String accept = "application/json";
context = this.client.mergeContext(context);
return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), body, accept, context);
return service
.create(
this.client.getEndpoint(),
this.client.getApiVersion(),
this.client.getSubscriptionId(),
body,
accept,
context);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public MarketplaceAgreementsImpl(MarketplaceAgreementsClient innerClient, Conflu

public PagedIterable<ConfluentAgreementResource> list() {
PagedIterable<ConfluentAgreementResourceInner> inner = this.serviceClient().list();
return inner.mapPage(inner1 -> new ConfluentAgreementResourceImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new ConfluentAgreementResourceImpl(inner1, this.manager()));
}

public PagedIterable<ConfluentAgreementResource> list(Context context) {
PagedIterable<ConfluentAgreementResourceInner> inner = this.serviceClient().list(context);
return inner.mapPage(inner1 -> new ConfluentAgreementResourceImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new ConfluentAgreementResourceImpl(inner1, this.manager()));
}

public ConfluentAgreementResource create() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public OrganizationOperationsImpl(OrganizationOperationsClient innerClient, Conf

public PagedIterable<OperationResult> list() {
PagedIterable<OperationResultInner> inner = this.serviceClient().list();
return inner.mapPage(inner1 -> new OperationResultImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager()));
}

public PagedIterable<OperationResult> list(Context context) {
PagedIterable<OperationResultInner> inner = this.serviceClient().list(context);
return inner.mapPage(inner1 -> new OperationResultImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager()));
}

private OrganizationOperationsClient serviceClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,6 @@ public OrganizationResourceImpl withTags(Map<String, String> tags) {
}
}

public OrganizationResourceImpl withProvisioningState(ProvisionState provisioningState) {
this.innerModel().withProvisioningState(provisioningState);
return this;
}

public OrganizationResourceImpl withOfferDetail(OfferDetail offerDetail) {
this.innerModel().withOfferDetail(offerDetail);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ public OrganizationsImpl(OrganizationsClient innerClient, ConfluentManager servi

public PagedIterable<OrganizationResource> list() {
PagedIterable<OrganizationResourceInner> inner = this.serviceClient().list();
return inner.mapPage(inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
}

public PagedIterable<OrganizationResource> list(Context context) {
PagedIterable<OrganizationResourceInner> inner = this.serviceClient().list(context);
return inner.mapPage(inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
}

public PagedIterable<OrganizationResource> listByResourceGroup(String resourceGroupName) {
PagedIterable<OrganizationResourceInner> inner = this.serviceClient().listByResourceGroup(resourceGroupName);
return inner.mapPage(inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
}

public PagedIterable<OrganizationResource> listByResourceGroup(String resourceGroupName, Context context) {
PagedIterable<OrganizationResourceInner> inner =
this.serviceClient().listByResourceGroup(resourceGroupName, context);
return inner.mapPage(inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
}

public OrganizationResource getByResourceGroup(String resourceGroupName, String organizationName) {
Expand Down
Loading