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
2 changes: 1 addition & 1 deletion sdk/clientcore/annotation-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<dependency>
<groupId>io.clientcore</groupId>
<artifactId>core</artifactId>
<version>1.0.0-beta.9</version> <!-- {x-version-update;io.clientcore:core;dependency} -->
<version>1.0.0-beta.8</version> <!-- {x-version-update;io.clientcore:core;dependency} -->
</dependency>

<!-- Unit Test -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2025-04-07)

- Azure Resource Manager StorageActions client library for Java. This package contains Microsoft Azure SDK for StorageActions Management SDK. The Azure Storage Actions Management API. Package tag package-2023-01-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 @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
StorageActionsManager manager = StorageActionsManager
.authenticate(credential, profile);
```

The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.

See [Authentication][authenticate] for more options.

Expand Down Expand Up @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/


Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.storageactions.fluent.StorageActionsMgmtClient;
import com.azure.resourcemanager.storageactions.implementation.OperationsImpl;
Expand All @@ -37,6 +38,7 @@
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -105,6 +107,9 @@ public static Configurable configure() {
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private static final String SDK_VERSION = "version";
private static final Map<String, String> PROPERTIES
= CoreUtils.getProperties("azure-resourcemanager-storageactions.properties");

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -212,12 +217,14 @@ public StorageActionsManager authenticate(TokenCredential credential, AzureProfi
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");

String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.storageactions")
.append("/")
.append("1.0.0-beta.2");
.append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,43 @@

package com.azure.resourcemanager.storageactions.models;

import com.azure.core.util.ExpandableStringEnum;
import java.util.Collection;

/**
* Action to be taken when the operation fails for a object.
*/
public enum OnFailure {
public final class OnFailure extends ExpandableStringEnum<OnFailure> {
/**
* Enum value break.
* Static value break for OnFailure.
*/
BREAK("break");
public static final OnFailure BREAK = fromString("break");

/**
* The actual serialized value for a OnFailure instance.
* Creates a new instance of OnFailure value.
*
* @deprecated Use the {@link #fromString(String)} factory method.
*/
private final String value;

OnFailure(String value) {
this.value = value;
@Deprecated
public OnFailure() {
}

/**
* Parses a serialized value to a OnFailure instance.
* Creates or finds a OnFailure from its string representation.
*
* @param value the serialized value to parse.
* @return the parsed OnFailure object, or null if unable to parse.
* @param name a name to look for.
* @return the corresponding OnFailure.
*/
public static OnFailure fromString(String value) {
if (value == null) {
return null;
}
OnFailure[] items = OnFailure.values();
for (OnFailure item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
public static OnFailure fromString(String name) {
return fromString(name, OnFailure.class);
}

/**
* {@inheritDoc}
* Gets known OnFailure values.
*
* @return known OnFailure values.
*/
@Override
public String toString() {
return this.value;
public static Collection<OnFailure> values() {
return values(OnFailure.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,43 @@

package com.azure.resourcemanager.storageactions.models;

import com.azure.core.util.ExpandableStringEnum;
import java.util.Collection;

/**
* Action to be taken when the operation is successful for a object.
*/
public enum OnSuccess {
public final class OnSuccess extends ExpandableStringEnum<OnSuccess> {
/**
* Enum value continue.
* Static value continue for OnSuccess.
*/
CONTINUE("continue");
public static final OnSuccess CONTINUE = fromString("continue");

/**
* The actual serialized value for a OnSuccess instance.
* Creates a new instance of OnSuccess value.
*
* @deprecated Use the {@link #fromString(String)} factory method.
*/
private final String value;

OnSuccess(String value) {
this.value = value;
@Deprecated
public OnSuccess() {
}

/**
* Parses a serialized value to a OnSuccess instance.
* Creates or finds a OnSuccess from its string representation.
*
* @param value the serialized value to parse.
* @return the parsed OnSuccess object, or null if unable to parse.
* @param name a name to look for.
* @return the corresponding OnSuccess.
*/
public static OnSuccess fromString(String value) {
if (value == null) {
return null;
}
OnSuccess[] items = OnSuccess.values();
for (OnSuccess item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
public static OnSuccess fromString(String name) {
return fromString(name, OnSuccess.class);
}

/**
* {@inheritDoc}
* Gets known OnSuccess values.
*
* @return known OnSuccess values.
*/
@Override
public String toString() {
return this.value;
public static Collection<OnSuccess> values() {
return values(OnSuccess.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,79 @@

package com.azure.resourcemanager.storageactions.models;

import com.azure.core.util.ExpandableStringEnum;
import java.util.Collection;

/**
* Represents the provisioning state of the storage task.
*/
public enum ProvisioningState {
public final class ProvisioningState extends ExpandableStringEnum<ProvisioningState> {
/**
* Enum value ValidateSubscriptionQuotaBegin.
* Static value ValidateSubscriptionQuotaBegin for ProvisioningState.
*/
VALIDATE_SUBSCRIPTION_QUOTA_BEGIN("ValidateSubscriptionQuotaBegin"),
public static final ProvisioningState VALIDATE_SUBSCRIPTION_QUOTA_BEGIN
= fromString("ValidateSubscriptionQuotaBegin");

/**
* Enum value ValidateSubscriptionQuotaEnd.
* Static value ValidateSubscriptionQuotaEnd for ProvisioningState.
*/
VALIDATE_SUBSCRIPTION_QUOTA_END("ValidateSubscriptionQuotaEnd"),
public static final ProvisioningState VALIDATE_SUBSCRIPTION_QUOTA_END = fromString("ValidateSubscriptionQuotaEnd");

/**
* Enum value Creating.
* Static value Accepted for ProvisioningState.
*/
CREATING("Creating"),
public static final ProvisioningState ACCEPTED = fromString("Accepted");

/**
* Enum value Succeeded.
* Static value Creating for ProvisioningState.
*/
SUCCEEDED("Succeeded"),
public static final ProvisioningState CREATING = fromString("Creating");

/**
* Enum value Deleting.
* Static value Succeeded for ProvisioningState.
*/
DELETING("Deleting"),
public static final ProvisioningState SUCCEEDED = fromString("Succeeded");

/**
* Enum value Canceled.
* Static value Deleting for ProvisioningState.
*/
CANCELED("Canceled"),
public static final ProvisioningState DELETING = fromString("Deleting");

/**
* Enum value Failed.
* Static value Canceled for ProvisioningState.
*/
FAILED("Failed");
public static final ProvisioningState CANCELED = fromString("Canceled");

/**
* The actual serialized value for a ProvisioningState instance.
* Static value Failed for ProvisioningState.
*/
private final String value;
public static final ProvisioningState FAILED = fromString("Failed");

ProvisioningState(String value) {
this.value = value;
/**
* Creates a new instance of ProvisioningState value.
*
* @deprecated Use the {@link #fromString(String)} factory method.
*/
@Deprecated
public ProvisioningState() {
}

/**
* Parses a serialized value to a ProvisioningState instance.
* Creates or finds a ProvisioningState from its string representation.
*
* @param value the serialized value to parse.
* @return the parsed ProvisioningState object, or null if unable to parse.
* @param name a name to look for.
* @return the corresponding ProvisioningState.
*/
public static ProvisioningState fromString(String value) {
if (value == null) {
return null;
}
ProvisioningState[] items = ProvisioningState.values();
for (ProvisioningState item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
public static ProvisioningState fromString(String name) {
return fromString(name, ProvisioningState.class);
}

/**
* {@inheritDoc}
* Gets known ProvisioningState values.
*
* @return known ProvisioningState values.
*/
@Override
public String toString() {
return this.value;
public static Collection<ProvisioningState> values() {
return values(ProvisioningState.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=${project.version}
Loading