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
18 changes: 14 additions & 4 deletions sdk/edgezones/azure-resourcemanager-edgezones/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.3 (2025-04-15)

### Features Added
- Azure Resource Manager Edge Zones client library for Java. This package contains Microsoft Azure SDK for Edge Zones Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Breaking Changes

### Bugs Fixed
#### `models.ExtendedZoneListResult` was removed

#### `models.OperationListResult` was removed

#### `EdgeZonesManager` was modified

* `fluent.MicrosoftEdgeZones serviceClient()` -> `fluent.EdgeZonesClient serviceClient()`

### Features Added

* `implementation.models.OperationListResult` was added

### Other Changes
* `implementation.models.ExtendedZoneListResult` was added

## 1.0.0-beta.2 (2024-12-04)

Expand Down
8 changes: 3 additions & 5 deletions sdk/edgezones/azure-resourcemanager-edgezones/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager Edge Zones client library for Java.

This package contains Microsoft Azure SDK for Edge Zones Management SDK. Package tag package-2024-04-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 Edge Zones Management SDK. 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 @@ -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();
EdgeZonesManager manager = EdgeZonesManager
.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/


66 changes: 28 additions & 38 deletions sdk/edgezones/azure-resourcemanager-edgezones/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,13 @@
- [List](#operations_list)
### ExtendedZones_Get

```java
/**
* Samples for ExtendedZones Get.
*/
public final class ExtendedZonesGetSamples {
/*
* x-ms-original-file:
* specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/
* ExtendedZones_Get.json
*/
/**
* Sample code: GetExtendedZone.
*
* @param manager Entry point to EdgeZonesManager.
*/
public static void getExtendedZone(com.azure.resourcemanager.edgezones.EdgeZonesManager manager) {
manager.extendedZones().getWithResponse("losangeles", com.azure.core.util.Context.NONE);
}
}
```

### ExtendedZones_List

```java
/**
* Samples for ExtendedZones List.
*/
public final class ExtendedZonesListSamples {
/*
* x-ms-original-file:
* specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/
* ExtendedZones_ListBySubscription.json
* x-ms-original-file: 2024-04-01-preview/ExtendedZones_ListBySubscription.json
*/
/**
* Sample code: ListExtendedZones.
Expand All @@ -57,17 +32,15 @@ public final class ExtendedZonesListSamples {
}
```

### ExtendedZones_Register
### ExtendedZones_List

```java
/**
* Samples for ExtendedZones Register.
*/
public final class ExtendedZonesRegisterSamples {
/*
* x-ms-original-file:
* specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/
* ExtendedZones_Register.json
* x-ms-original-file: 2024-04-01-preview/ExtendedZones_Register.json
*/
/**
* Sample code: RegisterExtendedZone.
Expand All @@ -80,17 +53,15 @@ public final class ExtendedZonesRegisterSamples {
}
```

### ExtendedZones_Unregister
### ExtendedZones_Register

```java
/**
* Samples for ExtendedZones Unregister.
*/
public final class ExtendedZonesUnregisterSamples {
/*
* x-ms-original-file:
* specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/
* ExtendedZones_Unregister.json
* x-ms-original-file: 2024-04-01-preview/ExtendedZones_Unregister.json
*/
/**
* Sample code: UnregisterExtendedZone.
Expand All @@ -103,17 +74,15 @@ public final class ExtendedZonesUnregisterSamples {
}
```

### Operations_List
### ExtendedZones_Unregister

```java
/**
* Samples for Operations List.
*/
public final class OperationsListSamples {
/*
* x-ms-original-file:
* specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/Operations_List.
* json
* x-ms-original-file: 2024-04-01-preview/Operations_List.json
*/
/**
* Sample code: ListOperations.
Expand All @@ -126,3 +95,24 @@ public final class OperationsListSamples {
}
```

### Operations_List

```java
/**
* Samples for ExtendedZones Get.
*/
public final class ExtendedZonesGetSamples {
/*
* x-ms-original-file: 2024-04-01-preview/ExtendedZones_Get.json
*/
/**
* Sample code: GetExtendedZone.
*
* @param manager Entry point to EdgeZonesManager.
*/
public static void getExtendedZone(com.azure.resourcemanager.edgezones.EdgeZonesManager manager) {
manager.extendedZones().getWithResponse("losangeles", com.azure.core.util.Context.NONE);
}
}
```

5 changes: 2 additions & 3 deletions sdk/edgezones/azure-resourcemanager-edgezones/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest Code Generator.
~ Code generated by Microsoft (R) TypeSpec Code Generator.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
Expand All @@ -18,7 +18,7 @@
<packaging>jar</packaging>

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

<licenses>
Expand Down Expand Up @@ -46,7 +46,6 @@
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.edgezones;

Expand All @@ -22,17 +22,19 @@
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.edgezones.fluent.MicrosoftEdgeZones;
import com.azure.resourcemanager.edgezones.fluent.EdgeZonesClient;
import com.azure.resourcemanager.edgezones.implementation.EdgeZonesClientBuilder;
import com.azure.resourcemanager.edgezones.implementation.ExtendedZonesImpl;
import com.azure.resourcemanager.edgezones.implementation.MicrosoftEdgeZonesBuilder;
import com.azure.resourcemanager.edgezones.implementation.OperationsImpl;
import com.azure.resourcemanager.edgezones.models.ExtendedZones;
import com.azure.resourcemanager.edgezones.models.Operations;
import java.time.Duration;
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 All @@ -44,12 +46,12 @@ public final class EdgeZonesManager {

private ExtendedZones extendedZones;

private final MicrosoftEdgeZones clientObject;
private final EdgeZonesClient clientObject;

private EdgeZonesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject = new MicrosoftEdgeZonesBuilder().pipeline(httpPipeline)
this.clientObject = new EdgeZonesClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
Expand Down Expand Up @@ -96,6 +98,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-edgezones.properties");

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -203,12 +208,14 @@ public EdgeZonesManager authenticate(TokenCredential credential, AzureProfile pr
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.edgezones")
.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 Expand Up @@ -279,12 +286,12 @@ public ExtendedZones extendedZones() {
}

/**
* Gets wrapped service client MicrosoftEdgeZones providing direct access to the underlying auto-generated API
* Gets wrapped service client EdgeZonesClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
*
* @return Wrapped service client MicrosoftEdgeZones.
* @return Wrapped service client EdgeZonesClient.
*/
public MicrosoftEdgeZones serviceClient() {
public EdgeZonesClient serviceClient() {
return this.clientObject;
}
}
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.edgezones.fluent;

import com.azure.core.http.HttpPipeline;
import java.time.Duration;

/**
* The interface for MicrosoftEdgeZones class.
* The interface for EdgeZonesClient class.
*/
public interface MicrosoftEdgeZones {
public interface EdgeZonesClient {
/**
* Gets The ID of the target subscription. The value must be an UUID.
*
* @return the subscriptionId value.
*/
String getSubscriptionId();

/**
* Gets server parameter.
* Gets Service host.
*
* @return the endpoint value.
*/
String getEndpoint();

/**
* Gets Api Version.
* Gets Version parameter.
*
* @return the apiVersion value.
*/
String getApiVersion();

/**
* Gets The ID of the target subscription. The value must be an UUID.
*
* @return the subscriptionId value.
*/
String getSubscriptionId();

/**
* Gets The HTTP pipeline to send requests through.
*
Expand Down
Loading