Skip to content

Commit

Permalink
CodeGen from PR 18996 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 2a781ad77e4b5072d3c6a1f5ba5462f9539fb989 into ac286e05bedd69d301e1dc94ec70f66e8536686b
  • Loading branch information
SDKAuto committed May 11, 2022
1 parent f5adfe2 commit 7a58c77
Show file tree
Hide file tree
Showing 84 changed files with 229 additions and 312 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.6 (Unreleased)
## 1.0.0-beta.1 (2022-05-11)

- Azure Resource Manager AppConfiguration client library for Java. This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-2022-05-01. 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager AppConfiguration client library for Java.

This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-2021-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-2022-05-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

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-appconfiguration</artifactId>
<version>1.0.0-beta.5</version>
<version>1.0.0-beta.6</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for AppConfiguration Management</name>
<description>This package contains Microsoft Azure SDK for AppConfiguration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-10-01-preview.</description>
<description>This package contains Microsoft Azure SDK for AppConfiguration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2022-05-01.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
Expand Down Expand Up @@ -79,6 +81,19 @@ public static AppConfigurationManager authenticate(TokenCredential credential, A
return configure().authenticate(credential, profile);
}

/**
* Creates an instance of AppConfiguration service API entry point.
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the AppConfiguration service API instance.
*/
public static AppConfigurationManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
return new AppConfigurationManager(httpPipeline, profile, null);
}

/**
* Gets a Configurable instance that can be used to create AppConfigurationManager with optional configuration.
*
Expand All @@ -90,13 +105,14 @@ 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;
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
private final List<String> scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private RetryOptions retryOptions;
private Duration defaultPollInterval;

private Configurable() {
Expand Down Expand Up @@ -157,16 +173,31 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}

/**
* Sets the retry options for the HTTP pipeline retry policy.
*
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
*/
public Configurable withRetryOptions(RetryOptions retryOptions) {
this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
return this;
}

/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
* @param defaultPollInterval the default poll interval.
* @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 @@ -188,7 +219,7 @@ public AppConfigurationManager authenticate(TokenCredential credential, AzurePro
.append("-")
.append("com.azure.resourcemanager.appconfiguration")
.append("/")
.append("1.0.0-beta.5");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -206,10 +237,15 @@ public AppConfigurationManager authenticate(TokenCredential credential, AzurePro
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
if (retryOptions != null) {
retryPolicy = new RetryPolicy(retryOptions);
} else {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
Expand Down Expand Up @@ -240,23 +276,35 @@ public AppConfigurationManager authenticate(TokenCredential credential, AzurePro
}
}

/** @return Resource collection API of ConfigurationStores. */
/**
* Gets the resource collection API of ConfigurationStores.
*
* @return Resource collection API of ConfigurationStores.
*/
public ConfigurationStores configurationStores() {
if (this.configurationStores == null) {
this.configurationStores = new ConfigurationStoresImpl(clientObject.getConfigurationStores(), this);
}
return configurationStores;
}

/** @return Resource collection API of Operations. */
/**
* Gets the resource collection API of Operations.
*
* @return Resource collection API of Operations.
*/
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
return operations;
}

/** @return Resource collection API of PrivateEndpointConnections. */
/**
* Gets the resource collection API of PrivateEndpointConnections.
*
* @return Resource collection API of PrivateEndpointConnections.
*/
public PrivateEndpointConnections privateEndpointConnections() {
if (this.privateEndpointConnections == null) {
this.privateEndpointConnections =
Expand All @@ -265,15 +313,23 @@ public PrivateEndpointConnections privateEndpointConnections() {
return privateEndpointConnections;
}

/** @return Resource collection API of PrivateLinkResources. */
/**
* Gets the resource collection API of PrivateLinkResources.
*
* @return Resource collection API of PrivateLinkResources.
*/
public PrivateLinkResources privateLinkResources() {
if (this.privateLinkResources == null) {
this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
}
return privateLinkResources;
}

/** @return Resource collection API of KeyValues. */
/**
* Gets the resource collection API of KeyValues.
*
* @return Resource collection API of KeyValues.
*/
public KeyValues keyValues() {
if (this.keyValues == null) {
this.keyValues = new KeyValuesImpl(clientObject.getKeyValues(), this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
package com.azure.resourcemanager.appconfiguration.fluent.models;

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;

/** An API key used for authenticating with a configuration store endpoint. */
@Immutable
public final class ApiKeyInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ApiKeyInner.class);

/*
* The key ID.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import com.azure.resourcemanager.appconfiguration.models.PublicNetworkAccess;
import com.azure.resourcemanager.appconfiguration.models.ResourceIdentity;
import com.azure.resourcemanager.appconfiguration.models.Sku;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
Expand All @@ -27,8 +26,6 @@
*/
@Fluent
public final class ConfigurationStoreInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationStoreInner.class);

/*
* The managed identity information, if configured.
*/
Expand Down Expand Up @@ -319,11 +316,13 @@ public void validate() {
innerProperties().validate();
}
if (sku() == null) {
throw logger
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property sku in model ConfigurationStoreInner"));
} else {
sku().validate();
}
}

private static final ClientLogger LOGGER = new ClientLogger(ConfigurationStoreInner.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,18 @@
package com.azure.resourcemanager.appconfiguration.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.appconfiguration.models.CreateMode;
import com.azure.resourcemanager.appconfiguration.models.EncryptionProperties;
import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnectionReference;
import com.azure.resourcemanager.appconfiguration.models.ProvisioningState;
import com.azure.resourcemanager.appconfiguration.models.PublicNetworkAccess;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;

/** The properties of a configuration store. */
@Fluent
public final class ConfigurationStoreProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationStoreProperties.class);

/*
* The provisioning state of the configuration store.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@
package com.azure.resourcemanager.appconfiguration.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.appconfiguration.models.EncryptionProperties;
import com.azure.resourcemanager.appconfiguration.models.PublicNetworkAccess;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The properties for updating a configuration store. */
@Fluent
public final class ConfigurationStorePropertiesUpdateParameters {
@JsonIgnore
private final ClientLogger logger = new ClientLogger(ConfigurationStorePropertiesUpdateParameters.class);

/*
* The encryption settings of the configuration store.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
package com.azure.resourcemanager.appconfiguration.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;
import java.util.Map;

/** Deleted configuration store information with extended details. */
@Fluent
public final class DeletedConfigurationStoreInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedConfigurationStoreInner.class);

/*
* The resource ID for the deleted configuration store.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
package com.azure.resourcemanager.appconfiguration.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
Expand All @@ -15,8 +13,6 @@
/** Properties of the deleted configuration store. */
@Immutable
public final class DeletedConfigurationStoreProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedConfigurationStoreProperties.class);

/*
* The resource id of the original configuration store.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Map;

/** The key-value resource along with all resource properties. */
@Fluent
public final class KeyValueInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(KeyValueInner.class);

/*
* All key-value properties.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
package com.azure.resourcemanager.appconfiguration.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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
Expand All @@ -15,8 +13,6 @@
/** All key-value properties. */
@Fluent
public final class KeyValueProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(KeyValueProperties.class);

/*
* The primary identifier of a key-value.
* The key is used in unison with the label to uniquely identify a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@
package com.azure.resourcemanager.appconfiguration.fluent.models;

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;

/** The result of a request to check the availability of a resource name. */
@Immutable
public final class NameAvailabilityStatusInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityStatusInner.class);

/*
* The value indicating whether the resource name is available.
*/
Expand Down
Loading

0 comments on commit 7a58c77

Please sign in to comment.