Skip to content

Commit

Permalink
CodeGen from PR 3531 in test-repo-billy/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge fd1eea6765bc59ad82e26aed913626d7cab6dcda into 8df52d62be2e13ba064fd9c0c7874dd6751c8f4f
  • Loading branch information
SDKAuto committed Oct 17, 2024
1 parent a492158 commit 1b418de
Show file tree
Hide file tree
Showing 58 changed files with 881 additions and 708 deletions.
4 changes: 3 additions & 1 deletion sdk/edgezones/azure-resourcemanager-edgezones/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2024-10-17)

- 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).

### Features Added

Expand Down
15 changes: 6 additions & 9 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 @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-edgezones</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

With above configuration, `azure` client can be authenticated using the following code:
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
Expand Down Expand Up @@ -97,6 +93,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
Expand Down
10 changes: 5 additions & 5 deletions sdk/edgezones/azure-resourcemanager-edgezones/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
public final class ExtendedZonesGetSamples {
/*
* x-ms-original-file: specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/ExtendedZones_Get.json
* x-ms-original-file: 2024-04-01-preview/ExtendedZones_Get.json
*/
/**
* Sample code: GetExtendedZone.
Expand All @@ -40,7 +40,7 @@ public final class ExtendedZonesGetSamples {
*/
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 @@ -61,7 +61,7 @@ public final class ExtendedZonesListSamples {
*/
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 @@ -82,7 +82,7 @@ public final class ExtendedZonesRegisterSamples {
*/
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,7 +103,7 @@ public final class ExtendedZonesUnregisterSamples {
*/
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 Down
11 changes: 3 additions & 8 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,6 +46,7 @@
<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 All @@ -63,12 +64,6 @@
<artifactId>azure-core-test</artifactId>
<version>1.27.0-beta.2</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-jdk-httpclient</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.azure</groupId>
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 @@ -11,8 +11,8 @@
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.HttpLoggingPolicy;
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;
Expand All @@ -23,9 +23,9 @@
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
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;
Expand All @@ -44,12 +44,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 @@ -279,12 +279,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
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.fluent;

Expand All @@ -16,51 +16,51 @@
*/
public interface ExtendedZonesClient {
/**
* Lists the Azure Extended Zones available to a subscription.
* Gets an Azure Extended Zone for a subscription.
*
* @param extendedZoneName The name of the ExtendedZone.
* @param context The context to associate with this operation.
* @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 ExtendedZone list operation as paginated response with {@link PagedIterable}.
* @return an Azure Extended Zone for a subscription along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ExtendedZoneInner> list();
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ExtendedZoneInner> getWithResponse(String extendedZoneName, Context context);

/**
* Lists the Azure Extended Zones available to a subscription.
* Gets an Azure Extended Zone for a subscription.
*
* @param context The context to associate with this operation.
* @param extendedZoneName The name of the ExtendedZone.
* @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 ExtendedZone list operation as paginated response with {@link PagedIterable}.
* @return an Azure Extended Zone for a subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ExtendedZoneInner> list(Context context);
@ServiceMethod(returns = ReturnType.SINGLE)
ExtendedZoneInner get(String extendedZoneName);

/**
* Gets an Azure Extended Zone for a subscription.
* Lists the Azure Extended Zones available to a subscription.
*
* @param extendedZoneName The name of the ExtendedZone.
* @param context The context to associate with this operation.
* @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 an Azure Extended Zone for a subscription along with {@link Response}.
* @return the response of a ExtendedZone list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ExtendedZoneInner> getWithResponse(String extendedZoneName, Context context);
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ExtendedZoneInner> list();

/**
* Gets an Azure Extended Zone for a subscription.
* Lists the Azure Extended Zones available to a subscription.
*
* @param extendedZoneName The name of the ExtendedZone.
* @param context The context to associate with this operation.
* @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 an Azure Extended Zone for a subscription.
* @return the response of a ExtendedZone list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ExtendedZoneInner get(String extendedZoneName);
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ExtendedZoneInner> list(Context context);

/**
* Registers a subscription for an Extended Zone.
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.fluent;

Expand Down
Loading

0 comments on commit 1b418de

Please sign in to comment.