Skip to content

Commit

Permalink
CodeGen from PR 18228 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 67d8fc190612ba99f13ace9b8fc867dd947c6c86 into 2abe647120f14bb145968a5543ead8ed51394498
  • Loading branch information
SDKAuto committed Mar 15, 2022
1 parent 48cb91c commit 2519e00
Show file tree
Hide file tree
Showing 32 changed files with 156 additions and 200 deletions.
4 changes: 3 additions & 1 deletion sdk/confluent/azure-resourcemanager-confluent/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2022-03-15)

- Azure Resource Manager Confluent client library for Java. This package contains Microsoft Azure SDK for Confluent Management SDK. Package tag package-preview-2021-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/confluent/azure-resourcemanager-confluent/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-confluent</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static Configurable configure() {

/** The Configurable allowing configurations to be set. */
public static final class Configurable {
private final ClientLogger logger = new ClientLogger(Configurable.class);
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -160,9 +160,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
this.defaultPollInterval =
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
Expand All @@ -184,7 +186,7 @@ public ConfluentManager authenticate(TokenCredential credential, AzureProfile pr
.append("-")
.append("com.azure.resourcemanager.confluent")
.append("/")
.append("1.0.0-beta.3");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface MarketplaceAgreementsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response of a list operation.
* @return response of a list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ConfluentAgreementResourceInner> list();
Expand All @@ -30,7 +30,7 @@ public interface MarketplaceAgreementsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response of a list operation.
* @return response of a list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ConfluentAgreementResourceInner> list(Context context);
Expand All @@ -53,7 +53,7 @@ public interface MarketplaceAgreementsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return agreement Terms definition.
* @return agreement Terms definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ConfluentAgreementResourceInner> createWithResponse(ConfluentAgreementResourceInner body, Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface OrganizationOperationsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of GET request to list Confluent operations.
* @return result of GET request to list Confluent operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationResultInner> list();
Expand All @@ -29,7 +29,7 @@ public interface OrganizationOperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of GET request to list Confluent operations.
* @return result of GET request to list Confluent operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationResultInner> list(Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface OrganizationsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response of a list operation.
* @return the response of a list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OrganizationResourceInner> list();
Expand All @@ -33,7 +33,7 @@ public interface OrganizationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response of a list operation.
* @return the response of a list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OrganizationResourceInner> list(Context context);
Expand All @@ -45,7 +45,7 @@ public interface OrganizationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response of a list operation.
* @return the response of a list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OrganizationResourceInner> listByResourceGroup(String resourceGroupName);
Expand All @@ -58,7 +58,7 @@ public interface OrganizationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response of a list operation.
* @return the response of a list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OrganizationResourceInner> listByResourceGroup(String resourceGroupName, Context context);
Expand All @@ -85,7 +85,7 @@ public interface OrganizationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the properties of a specific Organization resource.
* @return the properties of a specific Organization resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<OrganizationResourceInner> getByResourceGroupWithResponse(
Expand All @@ -100,7 +100,7 @@ Response<OrganizationResourceInner> getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return organization resource.
* @return the {@link SyncPoller} for polling of organization resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<OrganizationResourceInner>, OrganizationResourceInner> beginCreate(
Expand All @@ -116,7 +116,7 @@ SyncPoller<PollResult<OrganizationResourceInner>, OrganizationResourceInner> beg
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return organization resource.
* @return the {@link SyncPoller} for polling of organization resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<OrganizationResourceInner>, OrganizationResourceInner> beginCreate(
Expand Down Expand Up @@ -188,7 +188,7 @@ OrganizationResourceInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return organization resource.
* @return organization resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<OrganizationResourceInner> updateWithResponse(
Expand All @@ -202,7 +202,7 @@ Response<OrganizationResourceInner> updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String organizationName);
Expand All @@ -216,7 +216,7 @@ Response<OrganizationResourceInner> updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String organizationName, Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ OrganizationResourceInner validateOrganization(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return organization resource.
* @return organization resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<OrganizationResourceInner> validateOrganizationWithResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
package com.azure.resourcemanager.confluent.fluent.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;

/** Terms properties for Marketplace and Confluent. */
@Fluent
public final class ConfluentAgreementProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ConfluentAgreementProperties.class);

/*
* Publisher identifier string.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Agreement Terms definition. */
@Fluent
public final class ConfluentAgreementResourceInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ConfluentAgreementResourceInner.class);

/*
* Metadata pertaining to creation and last modification of the resource
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
package com.azure.resourcemanager.confluent.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.confluent.models.OperationDisplay;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** An Confluent REST API operation. */
@Fluent
public final class OperationResultInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultInner.class);

/*
* Operation name: {provider}/{resource}/{operation}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
import com.azure.resourcemanager.confluent.models.OfferDetail;
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;
import java.util.Map;

/** Organization resource. */
@Fluent
public final class OrganizationResourceInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(OrganizationResourceInner.class);

/*
* Metadata pertaining to creation and last modification of the resource
*/
Expand Down Expand Up @@ -154,12 +151,14 @@ public OrganizationResourceInner withUserDetail(UserDetail userDetail) {
*/
public void validate() {
if (innerProperties() == null) {
throw logger
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property innerProperties in model OrganizationResourceInner"));
} else {
innerProperties().validate();
}
}

private static final ClientLogger LOGGER = new ClientLogger(OrganizationResourceInner.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@
import com.azure.resourcemanager.confluent.models.OfferDetail;
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;

/** Organization resource property. */
@Fluent
public final class OrganizationResourceProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(OrganizationResourceProperties.class);

/*
* The creation time of the resource.
*/
Expand Down Expand Up @@ -137,20 +134,22 @@ public OrganizationResourceProperties withUserDetail(UserDetail userDetail) {
*/
public void validate() {
if (offerDetail() == null) {
throw logger
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property offerDetail in model OrganizationResourceProperties"));
} else {
offerDetail().validate();
}
if (userDetail() == null) {
throw logger
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property userDetail in model OrganizationResourceProperties"));
} else {
userDetail().validate();
}
}

private static final ClientLogger LOGGER = new ClientLogger(OrganizationResourceProperties.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
/** Initializes a new instance of the ConfluentManagementClientImpl type. */
@ServiceClient(builder = ConfluentManagementClientBuilder.class)
public final class ConfluentManagementClientImpl implements ConfluentManagementClient {
private final ClientLogger logger = new ClientLogger(ConfluentManagementClientImpl.class);

/** Microsoft Azure subscription id. */
private final String subscriptionId;

Expand Down Expand Up @@ -273,7 +271,7 @@ public <T, U> Mono<U> getLroFinalResultOrError(AsyncPollResponse<PollResult<T>,
managementError = null;
}
} catch (IOException | RuntimeException ioe) {
logger.logThrowableAsWarning(ioe);
LOGGER.logThrowableAsWarning(ioe);
}
}
} else {
Expand Down Expand Up @@ -332,4 +330,6 @@ public Mono<String> getBodyAsString(Charset charset) {
return Mono.just(new String(responseBody, charset));
}
}

private static final ClientLogger LOGGER = new ClientLogger(ConfluentManagementClientImpl.class);
}
Loading

0 comments on commit 2519e00

Please sign in to comment.