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
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-01-22)

- 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
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 @@ -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 @@ -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 @@ -155,10 +155,7 @@ interface WithResourceGroup {
* resource to be created, but also allows for any other optional properties to be specified.
*/
interface WithCreate
extends DefinitionStages.WithTags,
DefinitionStages.WithProvisioningState,
DefinitionStages.WithOfferDetail,
DefinitionStages.WithUserDetail {
extends DefinitionStages.WithTags, DefinitionStages.WithOfferDetail, DefinitionStages.WithUserDetail {
/**
* Executes the create request.
*
Expand All @@ -184,16 +181,6 @@ interface WithTags {
*/
WithCreate withTags(Map<String, String> tags);
}
/** The stage of the OrganizationResource definition allowing to specify provisioningState. */
interface WithProvisioningState {
/**
* Specifies the provisioningState property: Provision states for confluent RP.
*
* @param provisioningState Provision states for confluent RP.
* @return the next definition stage.
*/
WithCreate withProvisioningState(ProvisionState provisioningState);
}
/** The stage of the OrganizationResource definition allowing to specify offerDetail. */
interface WithOfferDetail {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class OrganizationResourceProperties {
/*
* Provision states for confluent RP
*/
@JsonProperty(value = "provisioningState")
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ProvisionState provisioningState;

/*
Expand Down Expand Up @@ -69,17 +69,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 OrganizationResourceProperties object itself.
*/
public OrganizationResourceProperties withProvisioningState(ProvisionState provisioningState) {
this.provisioningState = provisioningState;
return this;
}

/**
* Get the organizationId property: Id of the Confluent organization.
*
Expand Down