diff --git a/sdk/confluent/azure-resourcemanager-confluent/CHANGELOG.md b/sdk/confluent/azure-resourcemanager-confluent/CHANGELOG.md
index 414377a51a566..c3e1640d2b7d2 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/CHANGELOG.md
+++ b/sdk/confluent/azure-resourcemanager-confluent/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-04-19)
+- 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)
diff --git a/sdk/confluent/azure-resourcemanager-confluent/README.md b/sdk/confluent/azure-resourcemanager-confluent/README.md
index a9a1ee92f0d8e..e0fd8e1e56f32 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/README.md
+++ b/sdk/confluent/azure-resourcemanager-confluent/README.md
@@ -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
@@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for Confluent Management SDK. Package
com.azure.resourcemanager
azure-resourcemanager-confluent
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -75,6 +89,8 @@ For details on contributing to this repository, see the [contributing guide](htt
1. Create new Pull Request
+[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
diff --git a/sdk/confluent/azure-resourcemanager-confluent/pom.xml b/sdk/confluent/azure-resourcemanager-confluent/pom.xml
index 9aa2c08500a95..98c11a0ac8d65 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/pom.xml
+++ b/sdk/confluent/azure-resourcemanager-confluent/pom.xml
@@ -13,7 +13,7 @@
jar
Microsoft Azure SDK for Confluent Management
- 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 https://aka.ms/azsdk/java/mgmt
+ This package contains Microsoft Azure SDK for Confluent Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2020-03-01.
https://github.com/Azure/azure-sdk-for-java
@@ -41,6 +41,11 @@
+
+ com.azure
+ azure-core
+ 1.15.0
+
com.azure
azure-core-management
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/ConfluentManager.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/ConfluentManager.java
index f83ab7100a8a4..71a9399b9081e 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/ConfluentManager.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/ConfluentManager.java
@@ -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 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);
@@ -179,6 +193,7 @@ public ConfluentManager authenticate(TokenCredential credential, AzureProfile pr
.add(
new BearerTokenAuthenticationPolicy(
credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ policies.addAll(this.policies);
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/OrganizationResourceInner.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/OrganizationResourceInner.java
index b118fa126b80f..5a962bf27baf6 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/OrganizationResourceInner.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/OrganizationResourceInner.java
@@ -8,9 +8,9 @@
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.confluent.models.OfferDetail;
+import com.azure.resourcemanager.confluent.models.OrganizationResourcePropertiesOfferDetail;
+import com.azure.resourcemanager.confluent.models.OrganizationResourcePropertiesUserDetail;
import com.azure.resourcemanager.confluent.models.ProvisionState;
-import com.azure.resourcemanager.confluent.models.UserDetail;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
@@ -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;
/*
@@ -50,13 +50,13 @@ public class OrganizationResourceInner extends Resource {
* Confluent offer detail
*/
@JsonProperty(value = "properties.offerDetail")
- private OfferDetail offerDetail;
+ private OrganizationResourcePropertiesOfferDetail offerDetail;
/*
* Subscriber detail
*/
@JsonProperty(value = "properties.userDetail")
- private UserDetail userDetail;
+ private OrganizationResourcePropertiesUserDetail userDetail;
/**
* Get the createdTime property: The creation time of the resource.
@@ -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.
*
@@ -110,7 +99,7 @@ public String ssoUrl() {
*
* @return the offerDetail value.
*/
- public OfferDetail offerDetail() {
+ public OrganizationResourcePropertiesOfferDetail offerDetail() {
return this.offerDetail;
}
@@ -120,7 +109,7 @@ public OfferDetail offerDetail() {
* @param offerDetail the offerDetail value to set.
* @return the OrganizationResourceInner object itself.
*/
- public OrganizationResourceInner withOfferDetail(OfferDetail offerDetail) {
+ public OrganizationResourceInner withOfferDetail(OrganizationResourcePropertiesOfferDetail offerDetail) {
this.offerDetail = offerDetail;
return this;
}
@@ -130,7 +119,7 @@ public OrganizationResourceInner withOfferDetail(OfferDetail offerDetail) {
*
* @return the userDetail value.
*/
- public UserDetail userDetail() {
+ public OrganizationResourcePropertiesUserDetail userDetail() {
return this.userDetail;
}
@@ -140,7 +129,7 @@ public UserDetail userDetail() {
* @param userDetail the userDetail value to set.
* @return the OrganizationResourceInner object itself.
*/
- public OrganizationResourceInner withUserDetail(UserDetail userDetail) {
+ public OrganizationResourceInner withUserDetail(OrganizationResourcePropertiesUserDetail userDetail) {
this.userDetail = userDetail;
return this;
}
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentAgreementResourceImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentAgreementResourceImpl.java
index 4b674c7371a35..3c98573f16fa3 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentAgreementResourceImpl.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentAgreementResourceImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.confluent.implementation;
-import com.azure.resourcemanager.confluent.ConfluentManager;
import com.azure.resourcemanager.confluent.fluent.models.ConfluentAgreementResourceInner;
import com.azure.resourcemanager.confluent.models.ConfluentAgreementResource;
import java.time.OffsetDateTime;
@@ -12,9 +11,11 @@
public final class ConfluentAgreementResourceImpl implements ConfluentAgreementResource {
private ConfluentAgreementResourceInner innerObject;
- private final ConfluentManager serviceManager;
+ private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager;
- ConfluentAgreementResourceImpl(ConfluentAgreementResourceInner innerObject, ConfluentManager serviceManager) {
+ ConfluentAgreementResourceImpl(
+ ConfluentAgreementResourceInner innerObject,
+ com.azure.resourcemanager.confluent.ConfluentManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -67,7 +68,7 @@ public ConfluentAgreementResourceInner innerModel() {
return this.innerObject;
}
- private ConfluentManager manager() {
+ private com.azure.resourcemanager.confluent.ConfluentManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientImpl.java
index 0f8a5e4847330..862786982b7cb 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientImpl.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientImpl.java
@@ -258,7 +258,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
if (managementError.getCode() == null || managementError.getMessage() == null) {
managementError = null;
}
- } catch (IOException ioe) {
+ } catch (IOException | RuntimeException ioe) {
logger.logThrowableAsWarning(ioe);
}
}
@@ -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() {
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsClientImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsClientImpl.java
index 05ec7061f9f2e..8227144bc0ab5 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsClientImpl.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsClientImpl.java
@@ -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;
@@ -67,6 +68,7 @@ private interface MarketplaceAgreementsService {
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> list(
@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@HeaderParam("Accept") String accept,
Context context);
@@ -77,6 +79,7 @@ Mono> list(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> create(
@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@BodyParam("application/json") ConfluentAgreementResourceInner body,
@HeaderParam("Accept") String accept,
@@ -117,7 +120,14 @@ private Mono> 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))
.>map(
res ->
new PagedResponseBase<>(
@@ -127,7 +137,7 @@ private Mono> listSinglePageAsync
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -156,7 +166,12 @@ private Mono> 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<>(
@@ -252,8 +267,15 @@ private Mono> createWithResponseAsync(
return FluxUtil
.withContext(
context ->
- service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), body, accept, context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ body,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -286,7 +308,14 @@ private Mono> 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);
}
/**
@@ -393,7 +422,7 @@ private Mono> listNextSinglePageA
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsImpl.java
index e1ca8e98d9319..3ed446bea06c6 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsImpl.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsImpl.java
@@ -9,7 +9,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.confluent.ConfluentManager;
import com.azure.resourcemanager.confluent.fluent.MarketplaceAgreementsClient;
import com.azure.resourcemanager.confluent.fluent.models.ConfluentAgreementResourceInner;
import com.azure.resourcemanager.confluent.models.ConfluentAgreementResource;
@@ -21,21 +20,22 @@ public final class MarketplaceAgreementsImpl implements MarketplaceAgreements {
private final MarketplaceAgreementsClient innerClient;
- private final ConfluentManager serviceManager;
+ private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager;
- public MarketplaceAgreementsImpl(MarketplaceAgreementsClient innerClient, ConfluentManager serviceManager) {
+ public MarketplaceAgreementsImpl(
+ MarketplaceAgreementsClient innerClient, com.azure.resourcemanager.confluent.ConfluentManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list() {
PagedIterable 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 list(Context context) {
PagedIterable 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() {
@@ -65,7 +65,7 @@ private MarketplaceAgreementsClient serviceClient() {
return this.innerClient;
}
- private ConfluentManager manager() {
+ private com.azure.resourcemanager.confluent.ConfluentManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OperationResultImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OperationResultImpl.java
index 5d450fa92f7e6..ddf8ce131eb9b 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OperationResultImpl.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OperationResultImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.confluent.implementation;
-import com.azure.resourcemanager.confluent.ConfluentManager;
import com.azure.resourcemanager.confluent.fluent.models.OperationResultInner;
import com.azure.resourcemanager.confluent.models.OperationDisplay;
import com.azure.resourcemanager.confluent.models.OperationResult;
@@ -12,9 +11,10 @@
public final class OperationResultImpl implements OperationResult {
private OperationResultInner innerObject;
- private final ConfluentManager serviceManager;
+ private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager;
- OperationResultImpl(OperationResultInner innerObject, ConfluentManager serviceManager) {
+ OperationResultImpl(
+ OperationResultInner innerObject, com.azure.resourcemanager.confluent.ConfluentManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -35,7 +35,7 @@ public OperationResultInner innerModel() {
return this.innerObject;
}
- private ConfluentManager manager() {
+ private com.azure.resourcemanager.confluent.ConfluentManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsClientImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsClientImpl.java
index 44925f051d503..ad47f56bc6fd0 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsClientImpl.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsClientImpl.java
@@ -109,7 +109,7 @@ private Mono> listSinglePageAsync() {
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -229,7 +229,7 @@ private Mono> listNextSinglePageAsync(String
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsImpl.java
index c5ddf8ab6cfc9..575d631328020 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsImpl.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsImpl.java
@@ -7,7 +7,6 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.confluent.ConfluentManager;
import com.azure.resourcemanager.confluent.fluent.OrganizationOperationsClient;
import com.azure.resourcemanager.confluent.fluent.models.OperationResultInner;
import com.azure.resourcemanager.confluent.models.OperationResult;
@@ -19,28 +18,29 @@ public final class OrganizationOperationsImpl implements OrganizationOperations
private final OrganizationOperationsClient innerClient;
- private final ConfluentManager serviceManager;
+ private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager;
- public OrganizationOperationsImpl(OrganizationOperationsClient innerClient, ConfluentManager serviceManager) {
+ public OrganizationOperationsImpl(
+ OrganizationOperationsClient innerClient, com.azure.resourcemanager.confluent.ConfluentManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list() {
PagedIterable 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 list(Context context) {
PagedIterable 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() {
return this.innerClient;
}
- private ConfluentManager manager() {
+ private com.azure.resourcemanager.confluent.ConfluentManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationResourceImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationResourceImpl.java
index 6f96eec5e81fd..61a4ea6285757 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationResourceImpl.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationResourceImpl.java
@@ -6,13 +6,12 @@
import com.azure.core.management.Region;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.confluent.ConfluentManager;
import com.azure.resourcemanager.confluent.fluent.models.OrganizationResourceInner;
-import com.azure.resourcemanager.confluent.models.OfferDetail;
import com.azure.resourcemanager.confluent.models.OrganizationResource;
+import com.azure.resourcemanager.confluent.models.OrganizationResourcePropertiesOfferDetail;
+import com.azure.resourcemanager.confluent.models.OrganizationResourcePropertiesUserDetail;
import com.azure.resourcemanager.confluent.models.OrganizationResourceUpdate;
import com.azure.resourcemanager.confluent.models.ProvisionState;
-import com.azure.resourcemanager.confluent.models.UserDetail;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.Map;
@@ -21,7 +20,7 @@ public final class OrganizationResourceImpl
implements OrganizationResource, OrganizationResource.Definition, OrganizationResource.Update {
private OrganizationResourceInner innerObject;
- private final ConfluentManager serviceManager;
+ private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -64,11 +63,11 @@ public String ssoUrl() {
return this.innerModel().ssoUrl();
}
- public OfferDetail offerDetail() {
+ public OrganizationResourcePropertiesOfferDetail offerDetail() {
return this.innerModel().offerDetail();
}
- public UserDetail userDetail() {
+ public OrganizationResourcePropertiesUserDetail userDetail() {
return this.innerModel().userDetail();
}
@@ -84,7 +83,7 @@ public OrganizationResourceInner innerModel() {
return this.innerObject;
}
- private ConfluentManager manager() {
+ private com.azure.resourcemanager.confluent.ConfluentManager manager() {
return this.serviceManager;
}
@@ -117,7 +116,7 @@ public OrganizationResource create(Context context) {
return this;
}
- OrganizationResourceImpl(String name, ConfluentManager serviceManager) {
+ OrganizationResourceImpl(String name, com.azure.resourcemanager.confluent.ConfluentManager serviceManager) {
this.innerObject = new OrganizationResourceInner();
this.serviceManager = serviceManager;
this.organizationName = name;
@@ -148,7 +147,8 @@ public OrganizationResource apply(Context context) {
return this;
}
- OrganizationResourceImpl(OrganizationResourceInner innerObject, ConfluentManager serviceManager) {
+ OrganizationResourceImpl(
+ OrganizationResourceInner innerObject, com.azure.resourcemanager.confluent.ConfluentManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
@@ -195,17 +195,12 @@ public OrganizationResourceImpl withTags(Map tags) {
}
}
- public OrganizationResourceImpl withProvisioningState(ProvisionState provisioningState) {
- this.innerModel().withProvisioningState(provisioningState);
- return this;
- }
-
- public OrganizationResourceImpl withOfferDetail(OfferDetail offerDetail) {
+ public OrganizationResourceImpl withOfferDetail(OrganizationResourcePropertiesOfferDetail offerDetail) {
this.innerModel().withOfferDetail(offerDetail);
return this;
}
- public OrganizationResourceImpl withUserDetail(UserDetail userDetail) {
+ public OrganizationResourceImpl withUserDetail(OrganizationResourcePropertiesUserDetail userDetail) {
this.innerModel().withUserDetail(userDetail);
return this;
}
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsClientImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsClientImpl.java
index 49f17ba2040cd..ddfde7f8dd3e1 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsClientImpl.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsClientImpl.java
@@ -218,7 +218,7 @@ private Mono> listSinglePageAsync() {
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -367,7 +367,7 @@ private Mono> listByResourceGroupSingle
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -528,7 +528,7 @@ private Mono> getByResourceGroupWithResponse
organizationName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -684,7 +684,7 @@ private Mono>> createWithResponseAsync(
body,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -986,7 +986,7 @@ private Mono> updateWithResponseAsync(
body,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1170,7 +1170,7 @@ private Mono>> deleteWithResponseAsync(
organizationName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1388,7 +1388,7 @@ private Mono> listBySubscriptionNextSin
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1461,7 +1461,7 @@ private Mono> listByResourceGroupNextSi
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsImpl.java
index 1e4a81b684a24..795aaec363ef9 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsImpl.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsImpl.java
@@ -9,7 +9,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.confluent.ConfluentManager;
import com.azure.resourcemanager.confluent.fluent.OrganizationsClient;
import com.azure.resourcemanager.confluent.fluent.models.OrganizationResourceInner;
import com.azure.resourcemanager.confluent.models.OrganizationResource;
@@ -21,32 +20,33 @@ public final class OrganizationsImpl implements Organizations {
private final OrganizationsClient innerClient;
- private final ConfluentManager serviceManager;
+ private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager;
- public OrganizationsImpl(OrganizationsClient innerClient, ConfluentManager serviceManager) {
+ public OrganizationsImpl(
+ OrganizationsClient innerClient, com.azure.resourcemanager.confluent.ConfluentManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list() {
PagedIterable 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 list(Context context) {
PagedIterable 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 listByResourceGroup(String resourceGroupName) {
PagedIterable 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 listByResourceGroup(String resourceGroupName, Context context) {
PagedIterable 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) {
@@ -161,7 +161,7 @@ private OrganizationsClient serviceClient() {
return this.innerClient;
}
- private ConfluentManager manager() {
+ private com.azure.resourcemanager.confluent.ConfluentManager manager() {
return this.serviceManager;
}
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/Utils.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/Utils.java
index a66443cf089f3..e1bedfdd1d8e2 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/Utils.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/Utils.java
@@ -4,12 +4,20 @@
package com.azure.resourcemanager.confluent.implementation;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.util.CoreUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
final class Utils {
static String getValueFromIdByName(String id, String name) {
@@ -64,4 +72,133 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri
}
return null;
}
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(
+ PagedFlux
+ .create(
+ () ->
+ (continuationToken, pageSize) ->
+ Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
+ this.mapper = mapper;
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page ->
+ new PagedResponseBase(
+ page.getRequest(),
+ page.getStatusCode(),
+ page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()),
+ page.getContinuationToken(),
+ null);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl(iterable.iterator(), mapper);
+ }
+ }
}
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OfferDetail.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OfferDetail.java
index 063de573a5c5c..6c4a318291823 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OfferDetail.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OfferDetail.java
@@ -47,7 +47,7 @@ public class OfferDetail {
/*
* SaaS Offer Status
*/
- @JsonProperty(value = "status")
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
private SaaSOfferStatus status;
/**
@@ -159,17 +159,6 @@ public SaaSOfferStatus status() {
return this.status;
}
- /**
- * Set the status property: SaaS Offer Status.
- *
- * @param status the status value to set.
- * @return the OfferDetail object itself.
- */
- public OfferDetail withStatus(SaaSOfferStatus status) {
- this.status = status;
- return this;
- }
-
/**
* Validates the instance.
*
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OperationListResult.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OperationListResult.java
index be2191ae1ab9f..11cbafcd8e7d2 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OperationListResult.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OperationListResult.java
@@ -26,7 +26,7 @@ public final class OperationListResult {
/*
* URL to get the next set of operation list results if there are any.
*/
- @JsonProperty(value = "nextLink")
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -58,17 +58,6 @@ public String nextLink() {
return this.nextLink;
}
- /**
- * Set the nextLink property: URL to get the next set of operation list results if there are any.
- *
- * @param nextLink the nextLink value to set.
- * @return the OperationListResult object itself.
- */
- public OperationListResult withNextLink(String nextLink) {
- this.nextLink = nextLink;
- return this;
- }
-
/**
* Validates the instance.
*
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResource.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResource.java
index 10be35ce7d808..81c2a7ab95ba2 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResource.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResource.java
@@ -80,14 +80,14 @@ public interface OrganizationResource {
*
* @return the offerDetail value.
*/
- OfferDetail offerDetail();
+ OrganizationResourcePropertiesOfferDetail offerDetail();
/**
* Gets the userDetail property: Subscriber detail.
*
* @return the userDetail value.
*/
- UserDetail userDetail();
+ OrganizationResourcePropertiesUserDetail userDetail();
/**
* Gets the region of the resource.
@@ -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.
*
@@ -184,16 +181,6 @@ interface WithTags {
*/
WithCreate withTags(Map 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 {
/**
@@ -202,7 +189,7 @@ interface WithOfferDetail {
* @param offerDetail Confluent offer detail.
* @return the next definition stage.
*/
- WithCreate withOfferDetail(OfferDetail offerDetail);
+ WithCreate withOfferDetail(OrganizationResourcePropertiesOfferDetail offerDetail);
}
/** The stage of the OrganizationResource definition allowing to specify userDetail. */
interface WithUserDetail {
@@ -212,7 +199,7 @@ interface WithUserDetail {
* @param userDetail Subscriber detail.
* @return the next definition stage.
*/
- WithCreate withUserDetail(UserDetail userDetail);
+ WithCreate withUserDetail(OrganizationResourcePropertiesUserDetail userDetail);
}
}
/**
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourceProperties.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourceProperties.java
index b25f6c0eddb87..c0f47bc8eba86 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourceProperties.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourceProperties.java
@@ -4,137 +4,26 @@
package com.azure.resourcemanager.confluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
-/** Organization resource property. */
-@Fluent
-public class OrganizationResourceProperties {
+/** Organization resource properties. */
+@Immutable
+public final class OrganizationResourceProperties extends OrganizationResourcePropertiesAutoGenerated {
@JsonIgnore private final ClientLogger logger = new ClientLogger(OrganizationResourceProperties.class);
- /*
- * The creation time of the resource.
- */
- @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime createdTime;
-
- /*
- * Provision states for confluent RP
- */
- @JsonProperty(value = "provisioningState")
- private ProvisionState provisioningState;
-
- /*
- * Id of the Confluent organization.
- */
- @JsonProperty(value = "organizationId", access = JsonProperty.Access.WRITE_ONLY)
- private String organizationId;
-
- /*
- * SSO url for the Confluent organization.
- */
- @JsonProperty(value = "ssoUrl", access = JsonProperty.Access.WRITE_ONLY)
- private String ssoUrl;
-
- /*
- * Confluent offer detail
- */
- @JsonProperty(value = "offerDetail")
- private OfferDetail offerDetail;
-
- /*
- * Subscriber detail
- */
- @JsonProperty(value = "userDetail")
- private UserDetail userDetail;
-
- /**
- * Get the createdTime property: The creation time of the resource.
- *
- * @return the createdTime value.
- */
- public OffsetDateTime createdTime() {
- return this.createdTime;
- }
-
- /**
- * Get the provisioningState property: Provision states for confluent RP.
- *
- * @return the provisioningState value.
- */
- 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.
- *
- * @return the organizationId value.
- */
- public String organizationId() {
- return this.organizationId;
- }
-
- /**
- * Get the ssoUrl property: SSO url for the Confluent organization.
- *
- * @return the ssoUrl value.
- */
- public String ssoUrl() {
- return this.ssoUrl;
- }
-
- /**
- * Get the offerDetail property: Confluent offer detail.
- *
- * @return the offerDetail value.
- */
- public OfferDetail offerDetail() {
- return this.offerDetail;
- }
-
- /**
- * Set the offerDetail property: Confluent offer detail.
- *
- * @param offerDetail the offerDetail value to set.
- * @return the OrganizationResourceProperties object itself.
- */
- public OrganizationResourceProperties withOfferDetail(OfferDetail offerDetail) {
- this.offerDetail = offerDetail;
+ /** {@inheritDoc} */
+ @Override
+ public OrganizationResourceProperties withOfferDetail(OrganizationResourcePropertiesOfferDetail offerDetail) {
+ super.withOfferDetail(offerDetail);
return this;
}
- /**
- * Get the userDetail property: Subscriber detail.
- *
- * @return the userDetail value.
- */
- public UserDetail userDetail() {
- return this.userDetail;
- }
-
- /**
- * Set the userDetail property: Subscriber detail.
- *
- * @param userDetail the userDetail value to set.
- * @return the OrganizationResourceProperties object itself.
- */
- public OrganizationResourceProperties withUserDetail(UserDetail userDetail) {
- this.userDetail = userDetail;
+ /** {@inheritDoc} */
+ @Override
+ public OrganizationResourceProperties withUserDetail(OrganizationResourcePropertiesUserDetail userDetail) {
+ super.withUserDetail(userDetail);
return this;
}
@@ -143,12 +32,8 @@ public OrganizationResourceProperties withUserDetail(UserDetail userDetail) {
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
+ @Override
public void validate() {
- if (offerDetail() != null) {
- offerDetail().validate();
- }
- if (userDetail() != null) {
- userDetail().validate();
- }
+ super.validate();
}
}
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourcePropertiesAutoGenerated.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourcePropertiesAutoGenerated.java
new file mode 100644
index 0000000000000..b057cbb2cdff1
--- /dev/null
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourcePropertiesAutoGenerated.java
@@ -0,0 +1,145 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Organization resource property. */
+@Fluent
+public class OrganizationResourcePropertiesAutoGenerated {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OrganizationResourcePropertiesAutoGenerated.class);
+
+ /*
+ * The creation time of the resource.
+ */
+ @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdTime;
+
+ /*
+ * Provision states for confluent RP
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisionState provisioningState;
+
+ /*
+ * Id of the Confluent organization.
+ */
+ @JsonProperty(value = "organizationId", access = JsonProperty.Access.WRITE_ONLY)
+ private String organizationId;
+
+ /*
+ * SSO url for the Confluent organization.
+ */
+ @JsonProperty(value = "ssoUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String ssoUrl;
+
+ /*
+ * Confluent offer detail
+ */
+ @JsonProperty(value = "offerDetail")
+ private OrganizationResourcePropertiesOfferDetail offerDetail;
+
+ /*
+ * Subscriber detail
+ */
+ @JsonProperty(value = "userDetail")
+ private OrganizationResourcePropertiesUserDetail userDetail;
+
+ /**
+ * Get the createdTime property: The creation time of the resource.
+ *
+ * @return the createdTime value.
+ */
+ public OffsetDateTime createdTime() {
+ return this.createdTime;
+ }
+
+ /**
+ * Get the provisioningState property: Provision states for confluent RP.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisionState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the organizationId property: Id of the Confluent organization.
+ *
+ * @return the organizationId value.
+ */
+ public String organizationId() {
+ return this.organizationId;
+ }
+
+ /**
+ * Get the ssoUrl property: SSO url for the Confluent organization.
+ *
+ * @return the ssoUrl value.
+ */
+ public String ssoUrl() {
+ return this.ssoUrl;
+ }
+
+ /**
+ * Get the offerDetail property: Confluent offer detail.
+ *
+ * @return the offerDetail value.
+ */
+ public OrganizationResourcePropertiesOfferDetail offerDetail() {
+ return this.offerDetail;
+ }
+
+ /**
+ * Set the offerDetail property: Confluent offer detail.
+ *
+ * @param offerDetail the offerDetail value to set.
+ * @return the OrganizationResourcePropertiesAutoGenerated object itself.
+ */
+ public OrganizationResourcePropertiesAutoGenerated withOfferDetail(
+ OrganizationResourcePropertiesOfferDetail offerDetail) {
+ this.offerDetail = offerDetail;
+ return this;
+ }
+
+ /**
+ * Get the userDetail property: Subscriber detail.
+ *
+ * @return the userDetail value.
+ */
+ public OrganizationResourcePropertiesUserDetail userDetail() {
+ return this.userDetail;
+ }
+
+ /**
+ * Set the userDetail property: Subscriber detail.
+ *
+ * @param userDetail the userDetail value to set.
+ * @return the OrganizationResourcePropertiesAutoGenerated object itself.
+ */
+ public OrganizationResourcePropertiesAutoGenerated withUserDetail(
+ OrganizationResourcePropertiesUserDetail userDetail) {
+ this.userDetail = userDetail;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (offerDetail() != null) {
+ offerDetail().validate();
+ }
+ if (userDetail() != null) {
+ userDetail().validate();
+ }
+ }
+}
diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourcePropertiesOfferDetail.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourcePropertiesOfferDetail.java
index 17bc08c7e175b..33df5ae25bbb8 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourcePropertiesOfferDetail.java
+++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResourcePropertiesOfferDetail.java
@@ -48,13 +48,6 @@ public OrganizationResourcePropertiesOfferDetail withTermUnit(String termUnit) {
return this;
}
- /** {@inheritDoc} */
- @Override
- public OrganizationResourcePropertiesOfferDetail withStatus(SaaSOfferStatus status) {
- super.withStatus(status);
- return this;
- }
-
/**
* Validates the instance.
*