diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/CHANGELOG.md b/sdk/edgezones/azure-resourcemanager-edgezones/CHANGELOG.md
index ac09300a1fcb..c323ca4151e7 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/CHANGELOG.md
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2024-10-01)
+
+- 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
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/README.md b/sdk/edgezones/azure-resourcemanager-edgezones/README.md
index 4a2b5d054089..9c4f7cc5735a 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/README.md
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/README.md
@@ -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
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-edgezones
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -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);
@@ -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
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/SAMPLE.md b/sdk/edgezones/azure-resourcemanager-edgezones/SAMPLE.md
index 54ca09dfbbc0..a0a8b9d11af3 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/SAMPLE.md
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/SAMPLE.md
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/pom.xml b/sdk/edgezones/azure-resourcemanager-edgezones/pom.xml
index 592fa8dcb0dd..6bbc419cea0e 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/pom.xml
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/pom.xml
@@ -1,7 +1,7 @@
4.0.0
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for Edge Zones Management
- 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.
+ 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.
https://github.com/Azure/azure-sdk-for-java
@@ -46,6 +46,7 @@
0
0
true
+ false
@@ -63,12 +64,6 @@
azure-core-test
1.27.0-beta.2
test
-
-
- com.azure
- azure-core-http-jdk-httpclient
-
-
com.azure
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/EdgeZonesManager.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/EdgeZonesManager.java
index a526908e2cf6..27256ef529e3 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/EdgeZonesManager.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/EdgeZonesManager.java
@@ -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;
@@ -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;
@@ -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;
@@ -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)
@@ -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;
}
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/MicrosoftEdgeZones.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/EdgeZonesClient.java
similarity index 86%
rename from sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/MicrosoftEdgeZones.java
rename to sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/EdgeZonesClient.java
index d90639b05524..fc9d82ad6a61 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/MicrosoftEdgeZones.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/EdgeZonesClient.java
@@ -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;
@@ -8,30 +8,30 @@
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.
*
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/ExtendedZonesClient.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/ExtendedZonesClient.java
index 390c1d7fe8ac..90bfeadf261f 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/ExtendedZonesClient.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/ExtendedZonesClient.java
@@ -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;
@@ -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 list();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response 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 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 getWithResponse(String extendedZoneName, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable 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 list(Context context);
/**
* Registers a subscription for an Extended Zone.
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/OperationsClient.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/OperationsClient.java
index 7e04caf5afdd..4fc5685c51bf 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/OperationsClient.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/OperationsClient.java
@@ -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;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/ExtendedZoneInner.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/ExtendedZoneInner.java
index 102e1be18a2d..b63ff5ae94d9 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/ExtendedZoneInner.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/ExtendedZoneInner.java
@@ -1,36 +1,52 @@
// 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.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.edgezones.models.ExtendedZoneProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Resource that represents an Azure Extended Zone available to a subscription for registering and unregistering.
*/
-@Fluent
+@Immutable
public final class ExtendedZoneInner extends ProxyResource {
/*
* The resource-specific properties for this resource.
*/
- @JsonProperty(value = "properties")
private ExtendedZoneProperties properties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of ExtendedZoneInner class.
*/
- public ExtendedZoneInner() {
+ private ExtendedZoneInner() {
}
/**
@@ -43,23 +59,42 @@ public ExtendedZoneProperties properties() {
}
/**
- * Set the properties property: The resource-specific properties for this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @param properties the properties value to set.
- * @return the ExtendedZoneInner object itself.
+ * @return the systemData value.
*/
- public ExtendedZoneInner withProperties(ExtendedZoneProperties properties) {
- this.properties = properties;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ * Get the type property: The type of the resource.
*
- * @return the systemData value.
+ * @return the type value.
*/
- public SystemData systemData() {
- return this.systemData;
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
}
/**
@@ -72,4 +107,49 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExtendedZoneInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExtendedZoneInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ExtendedZoneInner.
+ */
+ public static ExtendedZoneInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExtendedZoneInner deserializedExtendedZoneInner = new ExtendedZoneInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedExtendedZoneInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedExtendedZoneInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedExtendedZoneInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedExtendedZoneInner.properties = ExtendedZoneProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedExtendedZoneInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExtendedZoneInner;
+ });
+ }
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/OperationInner.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/OperationInner.java
index 972c88cb377b..f7af3a5d73a4 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/OperationInner.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/OperationInner.java
@@ -1,56 +1,56 @@
// 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.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.edgezones.models.ActionType;
import com.azure.resourcemanager.edgezones.models.OperationDisplay;
import com.azure.resourcemanager.edgezones.models.Origin;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
- * REST API Operation
- *
* Details of a REST API operation, returned from the Resource Provider Operations API.
*/
-@Fluent
-public final class OperationInner {
+@Immutable
+public final class OperationInner implements JsonSerializable {
/*
- * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
- * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations.
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ * Resource Manager/control-plane operations.
*/
- @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isDataAction;
/*
* Localized display information for this particular operation.
*/
- @JsonProperty(value = "display")
private OperationDisplay display;
/*
- * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
*/
- @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
private Origin origin;
/*
- * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
*/
- @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
private ActionType actionType;
/**
* Creates an instance of OperationInner class.
*/
- public OperationInner() {
+ private OperationInner() {
}
/**
@@ -65,7 +65,7 @@ public String name() {
/**
* Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
- * operations and "false" for ARM/control-plane operations.
+ * operations and "false" for Azure Resource Manager/control-plane operations.
*
* @return the isDataAction value.
*/
@@ -82,17 +82,6 @@ public OperationDisplay display() {
return this.display;
}
- /**
- * Set the display property: Localized display information for this particular operation.
- *
- * @param display the display value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withDisplay(OperationDisplay display) {
- this.display = display;
- return this;
- }
-
/**
* Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
* audit logs UX. Default value is "user,system".
@@ -104,8 +93,8 @@ public Origin origin() {
}
/**
- * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
- * only APIs.
+ * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
*
* @return the actionType value.
*/
@@ -123,4 +112,48 @@ public void validate() {
display().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/package-info.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/package-info.java
index 0e9075824996..f5c6d5a6aac8 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/package-info.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/models/package-info.java
@@ -1,9 +1,8 @@
// 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 containing the inner data models for MicrosoftEdgeZones.
- * null.
+ * Package containing the inner data models for EdgeZones.
*/
package com.azure.resourcemanager.edgezones.fluent.models;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/package-info.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/package-info.java
index bb33ab431648..01d2f26693cb 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/package-info.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/fluent/package-info.java
@@ -1,9 +1,8 @@
// 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 containing the service clients for MicrosoftEdgeZones.
- * null.
+ * Package containing the service clients for EdgeZones.
*/
package com.azure.resourcemanager.edgezones.fluent;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/MicrosoftEdgeZonesBuilder.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/EdgeZonesClientBuilder.java
similarity index 68%
rename from sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/MicrosoftEdgeZonesBuilder.java
rename to sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/EdgeZonesClientBuilder.java
index af1e83f7c55e..9d5d22d59af6 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/MicrosoftEdgeZonesBuilder.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/EdgeZonesClientBuilder.java
@@ -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.implementation;
@@ -15,39 +15,39 @@
import java.time.Duration;
/**
- * A builder for creating a new instance of the MicrosoftEdgeZonesImpl type.
+ * A builder for creating a new instance of the EdgeZonesClientImpl type.
*/
-@ServiceClientBuilder(serviceClients = { MicrosoftEdgeZonesImpl.class })
-public final class MicrosoftEdgeZonesBuilder {
+@ServiceClientBuilder(serviceClients = { EdgeZonesClientImpl.class })
+public final class EdgeZonesClientBuilder {
/*
- * The ID of the target subscription. The value must be an UUID.
+ * Service host
*/
- private String subscriptionId;
+ private String endpoint;
/**
- * Sets The ID of the target subscription. The value must be an UUID.
+ * Sets Service host.
*
- * @param subscriptionId the subscriptionId value.
- * @return the MicrosoftEdgeZonesBuilder.
+ * @param endpoint the endpoint value.
+ * @return the EdgeZonesClientBuilder.
*/
- public MicrosoftEdgeZonesBuilder subscriptionId(String subscriptionId) {
- this.subscriptionId = subscriptionId;
+ public EdgeZonesClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
return this;
}
/*
- * server parameter
+ * The ID of the target subscription. The value must be an UUID.
*/
- private String endpoint;
+ private String subscriptionId;
/**
- * Sets server parameter.
+ * Sets The ID of the target subscription. The value must be an UUID.
*
- * @param endpoint the endpoint value.
- * @return the MicrosoftEdgeZonesBuilder.
+ * @param subscriptionId the subscriptionId value.
+ * @return the EdgeZonesClientBuilder.
*/
- public MicrosoftEdgeZonesBuilder endpoint(String endpoint) {
- this.endpoint = endpoint;
+ public EdgeZonesClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
return this;
}
@@ -60,9 +60,9 @@ public MicrosoftEdgeZonesBuilder endpoint(String endpoint) {
* Sets The environment to connect to.
*
* @param environment the environment value.
- * @return the MicrosoftEdgeZonesBuilder.
+ * @return the EdgeZonesClientBuilder.
*/
- public MicrosoftEdgeZonesBuilder environment(AzureEnvironment environment) {
+ public EdgeZonesClientBuilder environment(AzureEnvironment environment) {
this.environment = environment;
return this;
}
@@ -76,9 +76,9 @@ public MicrosoftEdgeZonesBuilder environment(AzureEnvironment environment) {
* Sets The HTTP pipeline to send requests through.
*
* @param pipeline the pipeline value.
- * @return the MicrosoftEdgeZonesBuilder.
+ * @return the EdgeZonesClientBuilder.
*/
- public MicrosoftEdgeZonesBuilder pipeline(HttpPipeline pipeline) {
+ public EdgeZonesClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}
@@ -92,9 +92,9 @@ public MicrosoftEdgeZonesBuilder pipeline(HttpPipeline pipeline) {
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
- * @return the MicrosoftEdgeZonesBuilder.
+ * @return the EdgeZonesClientBuilder.
*/
- public MicrosoftEdgeZonesBuilder defaultPollInterval(Duration defaultPollInterval) {
+ public EdgeZonesClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -108,19 +108,19 @@ public MicrosoftEdgeZonesBuilder defaultPollInterval(Duration defaultPollInterva
* Sets The serializer to serialize an object into a string.
*
* @param serializerAdapter the serializerAdapter value.
- * @return the MicrosoftEdgeZonesBuilder.
+ * @return the EdgeZonesClientBuilder.
*/
- public MicrosoftEdgeZonesBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ public EdgeZonesClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
this.serializerAdapter = serializerAdapter;
return this;
}
/**
- * Builds an instance of MicrosoftEdgeZonesImpl with the provided parameters.
+ * Builds an instance of EdgeZonesClientImpl with the provided parameters.
*
- * @return an instance of MicrosoftEdgeZonesImpl.
+ * @return an instance of EdgeZonesClientImpl.
*/
- public MicrosoftEdgeZonesImpl buildClient() {
+ public EdgeZonesClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
HttpPipeline localPipeline = (pipeline != null)
@@ -131,8 +131,8 @@ public MicrosoftEdgeZonesImpl buildClient() {
SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
- MicrosoftEdgeZonesImpl client = new MicrosoftEdgeZonesImpl(localPipeline, localSerializerAdapter,
- localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ EdgeZonesClientImpl client = new EdgeZonesClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
return client;
}
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/MicrosoftEdgeZonesImpl.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/EdgeZonesClientImpl.java
similarity index 92%
rename from sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/MicrosoftEdgeZonesImpl.java
rename to sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/EdgeZonesClientImpl.java
index 414f2bca814c..04e199303f4a 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/MicrosoftEdgeZonesImpl.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/EdgeZonesClientImpl.java
@@ -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.implementation;
@@ -13,8 +13,8 @@
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.exception.ManagementError;
import com.azure.core.management.exception.ManagementException;
-import com.azure.core.management.polling.PollerFactory;
import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
@@ -23,8 +23,8 @@
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.edgezones.fluent.EdgeZonesClient;
import com.azure.resourcemanager.edgezones.fluent.ExtendedZonesClient;
-import com.azure.resourcemanager.edgezones.fluent.MicrosoftEdgeZones;
import com.azure.resourcemanager.edgezones.fluent.OperationsClient;
import java.io.IOException;
import java.lang.reflect.Type;
@@ -36,31 +36,17 @@
import reactor.core.publisher.Mono;
/**
- * Initializes a new instance of the MicrosoftEdgeZonesImpl type.
+ * Initializes a new instance of the EdgeZonesClientImpl type.
*/
-@ServiceClient(builder = MicrosoftEdgeZonesBuilder.class)
-public final class MicrosoftEdgeZonesImpl implements MicrosoftEdgeZones {
- /**
- * The ID of the target subscription. The value must be an UUID.
- */
- private final String subscriptionId;
-
- /**
- * Gets The ID of the target subscription. The value must be an UUID.
- *
- * @return the subscriptionId value.
- */
- public String getSubscriptionId() {
- return this.subscriptionId;
- }
-
+@ServiceClient(builder = EdgeZonesClientBuilder.class)
+public final class EdgeZonesClientImpl implements EdgeZonesClient {
/**
- * server parameter.
+ * Service host.
*/
private final String endpoint;
/**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
@@ -69,12 +55,12 @@ public String getEndpoint() {
}
/**
- * Api Version.
+ * Version parameter.
*/
private final String apiVersion;
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
@@ -82,6 +68,20 @@ public String getApiVersion() {
return this.apiVersion;
}
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
/**
* The HTTP pipeline to send requests through.
*/
@@ -153,22 +153,22 @@ public ExtendedZonesClient getExtendedZones() {
}
/**
- * Initializes an instance of MicrosoftEdgeZones client.
+ * Initializes an instance of EdgeZonesClient client.
*
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
+ * @param endpoint Service host.
* @param subscriptionId The ID of the target subscription. The value must be an UUID.
- * @param endpoint server parameter.
*/
- MicrosoftEdgeZonesImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval,
- AzureEnvironment environment, String subscriptionId, String endpoint) {
+ EdgeZonesClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval,
+ AzureEnvironment environment, String endpoint, String subscriptionId) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
- this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
this.apiVersion = "2024-04-01-preview";
this.operations = new OperationsClientImpl(this);
this.extendedZones = new ExtendedZonesClientImpl(this);
@@ -300,5 +300,5 @@ public Mono getBodyAsString(Charset charset) {
}
}
- private static final ClientLogger LOGGER = new ClientLogger(MicrosoftEdgeZonesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(EdgeZonesClientImpl.class);
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZoneImpl.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZoneImpl.java
index 355ab41252cf..0b61e3f8f5a8 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZoneImpl.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZoneImpl.java
@@ -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.implementation;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZonesClientImpl.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZonesClientImpl.java
index 52187c11e6c7..e546bcd3d00c 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZonesClientImpl.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZonesClientImpl.java
@@ -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.implementation;
@@ -28,7 +28,7 @@
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.edgezones.fluent.ExtendedZonesClient;
import com.azure.resourcemanager.edgezones.fluent.models.ExtendedZoneInner;
-import com.azure.resourcemanager.edgezones.models.ExtendedZoneListResult;
+import com.azure.resourcemanager.edgezones.implementation.models.ExtendedZoneListResult;
import reactor.core.publisher.Mono;
/**
@@ -43,48 +43,48 @@ public final class ExtendedZonesClientImpl implements ExtendedZonesClient {
/**
* The service client containing this operation class.
*/
- private final MicrosoftEdgeZonesImpl client;
+ private final EdgeZonesClientImpl client;
/**
* Initializes an instance of ExtendedZonesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- ExtendedZonesClientImpl(MicrosoftEdgeZonesImpl client) {
+ ExtendedZonesClientImpl(EdgeZonesClientImpl client) {
this.service
= RestProxy.create(ExtendedZonesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for MicrosoftEdgeZonesExtendedZones to be used by the proxy service to
+ * The interface defining all the services for EdgeZonesClientExtendedZones to be used by the proxy service to
* perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "MicrosoftEdgeZonesEx")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "EdgeZonesClientExten")
public interface ExtendedZonesService {
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones")
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
+ Mono> get(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
- @HeaderParam("Accept") String accept, Context context);
+ @PathParam("extendedZoneName") String extendedZoneName, @HeaderParam("Accept") String accept,
+ Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}")
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(@HostParam("$host") String endpoint,
+ Mono> list(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
- @PathParam("extendedZoneName") String extendedZoneName, @HeaderParam("Accept") String accept,
- Context context);
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/register")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> register(@HostParam("$host") String endpoint,
+ Mono> register(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("extendedZoneName") String extendedZoneName, @HeaderParam("Accept") String accept,
Context context);
@@ -93,7 +93,7 @@ Mono> register(@HostParam("$host") String endpoint,
@Post("/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/unregister")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> unregister(@HostParam("$host") String endpoint,
+ Mono> unregister(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("extendedZoneName") String extendedZoneName, @HeaderParam("Accept") String accept,
Context context);
@@ -103,20 +103,22 @@ Mono> unregister(@HostParam("$host") String endpoint
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listBySubscriptionNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
}
/**
- * Lists the Azure Extended Zones available to a subscription.
+ * Gets an Azure Extended Zone for a subscription.
*
+ * @param extendedZoneName The name of the ExtendedZone.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
+ * @return an Azure Extended Zone for a subscription along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync() {
+ private Mono> getWithResponseAsync(String extendedZoneName) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -125,27 +127,30 @@ private Mono> listSinglePageAsync() {
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ if (extendedZoneName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter extendedZoneName is required and cannot be null."));
+ }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), extendedZoneName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * 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 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 along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
+ * @return an Azure Extended Zone for a subscription along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(Context context) {
+ private Mono> getWithResponseAsync(String extendedZoneName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -154,81 +159,69 @@ private Mono> listSinglePageAsync(Context conte
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ if (extendedZoneName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter extendedZoneName is required and cannot be null."));
+ }
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept,
- context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ extendedZoneName, accept, context);
}
/**
- * Lists the Azure Extended Zones available to a subscription.
+ * Gets an Azure Extended Zone for a subscription.
*
+ * @param extendedZoneName The name of the ExtendedZone.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 PagedFlux}.
+ * @return an Azure Extended Zone for a subscription on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- return new PagedFlux<>(() -> listSinglePageAsync(),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String extendedZoneName) {
+ return getWithResponseAsync(extendedZoneName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * 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 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 PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(context),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Lists the Azure Extended Zones available to a subscription.
- *
- * @throws 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)
- public PagedIterable list() {
- return new PagedIterable<>(listAsync());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String extendedZoneName, Context context) {
+ return getWithResponseAsync(extendedZoneName, context).block();
}
/**
- * 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 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)
- public PagedIterable list(Context context) {
- return new PagedIterable<>(listAsync(context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExtendedZoneInner get(String extendedZoneName) {
+ return getWithResponse(extendedZoneName, Context.NONE).getValue();
}
/**
- * Gets an Azure Extended Zone for a subscription.
+ * Lists the Azure Extended Zones available to a subscription.
*
- * @param extendedZoneName The name of the ExtendedZone.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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} on successful completion of
- * {@link Mono}.
+ * @return the response of a ExtendedZone list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String extendedZoneName) {
+ private Mono> listSinglePageAsync() {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -237,30 +230,27 @@ private Mono> getWithResponseAsync(String extendedZo
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- if (extendedZoneName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter extendedZoneName is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), extendedZoneName, accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * 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 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} on successful completion of
- * {@link Mono}.
+ * @return the response of a ExtendedZone list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String extendedZoneName, Context context) {
+ private Mono> listSinglePageAsync(Context context) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -269,57 +259,67 @@ private Mono> getWithResponseAsync(String extendedZo
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- if (extendedZoneName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter extendedZoneName is required and cannot be null."));
- }
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- extendedZoneName, accept, context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept,
+ context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
/**
- * Gets an Azure Extended Zone for a subscription.
+ * Lists the Azure Extended Zones available to a subscription.
*
- * @param extendedZoneName The name of the ExtendedZone.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 on successful completion of {@link Mono}.
+ * @return the response of a ExtendedZone list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String extendedZoneName) {
- return getWithResponseAsync(extendedZoneName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
}
/**
- * 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 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 PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String extendedZoneName, Context context) {
- return getWithResponseAsync(extendedZoneName, context).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
}
/**
- * Gets an Azure Extended Zone for a subscription.
+ * Lists the Azure Extended Zones available to a subscription.
*
- * @param extendedZoneName The name of the ExtendedZone.
+ * @throws 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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Lists the Azure Extended Zones available to a subscription.
+ *
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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)
- public ExtendedZoneInner get(String extendedZoneName) {
- return getWithResponse(extendedZoneName, Context.NONE).getValue();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
}
/**
@@ -541,9 +541,7 @@ public ExtendedZoneInner unregister(String extendedZoneName) {
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -571,9 +569,7 @@ private Mono> listBySubscriptionNextSinglePageA
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZonesImpl.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZonesImpl.java
index f10ced118019..2c9666ef3dc1 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZonesImpl.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ExtendedZonesImpl.java
@@ -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.implementation;
@@ -27,16 +27,6 @@ public ExtendedZonesImpl(ExtendedZonesClient innerClient,
this.serviceManager = serviceManager;
}
- public PagedIterable list() {
- PagedIterable inner = this.serviceClient().list();
- return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtendedZoneImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(Context context) {
- PagedIterable inner = this.serviceClient().list(context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtendedZoneImpl(inner1, this.manager()));
- }
-
public Response getWithResponse(String extendedZoneName, Context context) {
Response inner = this.serviceClient().getWithResponse(extendedZoneName, context);
if (inner != null) {
@@ -56,6 +46,16 @@ public ExtendedZone get(String extendedZoneName) {
}
}
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtendedZoneImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtendedZoneImpl(inner1, this.manager()));
+ }
+
public Response registerWithResponse(String extendedZoneName, Context context) {
Response inner = this.serviceClient().registerWithResponse(extendedZoneName, context);
if (inner != null) {
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationImpl.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationImpl.java
index a2822452ed9b..cc4ab797ed1a 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationImpl.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationImpl.java
@@ -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.implementation;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationsClientImpl.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationsClientImpl.java
index cca56e43db7d..1330a661f73d 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationsClientImpl.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationsClientImpl.java
@@ -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.implementation;
@@ -27,7 +27,7 @@
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.edgezones.fluent.OperationsClient;
import com.azure.resourcemanager.edgezones.fluent.models.OperationInner;
-import com.azure.resourcemanager.edgezones.models.OperationListResult;
+import com.azure.resourcemanager.edgezones.implementation.models.OperationListResult;
import reactor.core.publisher.Mono;
/**
@@ -42,31 +42,31 @@ public final class OperationsClientImpl implements OperationsClient {
/**
* The service client containing this operation class.
*/
- private final MicrosoftEdgeZonesImpl client;
+ private final EdgeZonesClientImpl client;
/**
* Initializes an instance of OperationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- OperationsClientImpl(MicrosoftEdgeZonesImpl client) {
+ OperationsClientImpl(EdgeZonesClientImpl client) {
this.service
= RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for MicrosoftEdgeZonesOperations to be used by the proxy service to
- * perform REST calls.
+ * The interface defining all the services for EdgeZonesClientOperations to be used by the proxy service to perform
+ * REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "MicrosoftEdgeZonesOp")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "EdgeZonesClientOpera")
public interface OperationsService {
@Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.EdgeZones/operations")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
+ Mono> list(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -74,7 +74,7 @@ Mono> list(@HostParam("$host") String endpoint,
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -183,9 +183,7 @@ public PagedIterable list(Context context) {
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -211,9 +209,7 @@ private Mono> listNextSinglePageAsync(String nextL
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationsImpl.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationsImpl.java
index 181c1a7cafd8..b14961073959 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationsImpl.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/OperationsImpl.java
@@ -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.implementation;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ResourceManagerUtils.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ResourceManagerUtils.java
index b35b573a9e78..4245db2f0d3c 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ResourceManagerUtils.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/ResourceManagerUtils.java
@@ -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.implementation;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/models/ExtendedZoneListResult.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/models/ExtendedZoneListResult.java
new file mode 100644
index 000000000000..bc6802131165
--- /dev/null
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/models/ExtendedZoneListResult.java
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgezones.implementation.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.edgezones.fluent.models.ExtendedZoneInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response of a ExtendedZone list operation.
+ */
+@Immutable
+public final class ExtendedZoneListResult implements JsonSerializable {
+ /*
+ * The ExtendedZone items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of ExtendedZoneListResult class.
+ */
+ private ExtendedZoneListResult() {
+ }
+
+ /**
+ * Get the value property: The ExtendedZone items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property value in model ExtendedZoneListResult"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ExtendedZoneListResult.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExtendedZoneListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExtendedZoneListResult if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ExtendedZoneListResult.
+ */
+ public static ExtendedZoneListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExtendedZoneListResult deserializedExtendedZoneListResult = new ExtendedZoneListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> ExtendedZoneInner.fromJson(reader1));
+ deserializedExtendedZoneListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedExtendedZoneListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExtendedZoneListResult;
+ });
+ }
+}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/models/OperationListResult.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/models/OperationListResult.java
new file mode 100644
index 000000000000..9fcfac93f08a
--- /dev/null
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/models/OperationListResult.java
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgezones.implementation.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.edgezones.fluent.models.OperationInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ * results.
+ */
+@Immutable
+public final class OperationListResult implements JsonSerializable {
+ /*
+ * The Operation items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of OperationListResult class.
+ */
+ private OperationListResult() {
+ }
+
+ /**
+ * Get the value property: The Operation items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property value in model OperationListResult"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the OperationListResult.
+ */
+ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationListResult deserializedOperationListResult = new OperationListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1));
+ deserializedOperationListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedOperationListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationListResult;
+ });
+ }
+}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/package-info.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/package-info.java
index 2941470a4fd4..c317d7e347ab 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/package-info.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/implementation/package-info.java
@@ -1,9 +1,8 @@
// 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 containing the implementations for MicrosoftEdgeZones.
- * null.
+ * Package containing the implementations for EdgeZones.
*/
package com.azure.resourcemanager.edgezones.implementation;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ActionType.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ActionType.java
index 2896e2a255dd..e3ab2ffefae7 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ActionType.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ActionType.java
@@ -1,19 +1,18 @@
// 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.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
- * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
*/
public final class ActionType extends ExpandableStringEnum {
/**
- * Static value Internal for ActionType.
+ * Actions are for internal-only APIs.
*/
public static final ActionType INTERNAL = fromString("Internal");
@@ -32,7 +31,6 @@ public ActionType() {
* @param name a name to look for.
* @return the corresponding ActionType.
*/
- @JsonCreator
public static ActionType fromString(String name) {
return fromString(name, ActionType.class);
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZone.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZone.java
index 8ebc9eb0a83b..b6f09c368aeb 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZone.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZone.java
@@ -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.models;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZoneListResult.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZoneListResult.java
deleted file mode 100644
index 83f2dc695463..000000000000
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZoneListResult.java
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.edgezones.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.edgezones.fluent.models.ExtendedZoneInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/**
- * The response of a ExtendedZone list operation.
- */
-@Fluent
-public final class ExtendedZoneListResult {
- /*
- * The ExtendedZone items on this page
- */
- @JsonProperty(value = "value", required = true)
- private List value;
-
- /*
- * The link to the next page of items
- */
- @JsonProperty(value = "nextLink")
- private String nextLink;
-
- /**
- * Creates an instance of ExtendedZoneListResult class.
- */
- public ExtendedZoneListResult() {
- }
-
- /**
- * Get the value property: The ExtendedZone items on this page.
- *
- * @return the value value.
- */
- public List value() {
- return this.value;
- }
-
- /**
- * Set the value property: The ExtendedZone items on this page.
- *
- * @param value the value value to set.
- * @return the ExtendedZoneListResult object itself.
- */
- public ExtendedZoneListResult withValue(List value) {
- this.value = value;
- return this;
- }
-
- /**
- * Get the nextLink property: The link to the next page of items.
- *
- * @return the nextLink value.
- */
- public String nextLink() {
- return this.nextLink;
- }
-
- /**
- * Set the nextLink property: The link to the next page of items.
- *
- * @param nextLink the nextLink value to set.
- * @return the ExtendedZoneListResult object itself.
- */
- public ExtendedZoneListResult withNextLink(String nextLink) {
- this.nextLink = nextLink;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (value() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property value in model ExtendedZoneListResult"));
- } else {
- value().forEach(e -> e.validate());
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(ExtendedZoneListResult.class);
-}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZoneProperties.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZoneProperties.java
index 44b8367cb095..240d67f37e16 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZoneProperties.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZoneProperties.java
@@ -1,87 +1,80 @@
// 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.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* The properties of an Extended Zone resource.
*/
@Immutable
-public final class ExtendedZoneProperties {
+public final class ExtendedZoneProperties implements JsonSerializable {
/*
* Status of the last operation performed by the subscription on the Edge Zone resource
*/
- @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ProvisioningState provisioningState;
/*
* Indicates the Azure Extended Zone registration’s approval status.
*/
- @JsonProperty(value = "registrationState", access = JsonProperty.Access.WRITE_ONLY)
private RegistrationState registrationState;
/*
* Display name of the Azure Extended Zone.
*/
- @JsonProperty(value = "displayName", required = true, access = JsonProperty.Access.WRITE_ONLY)
private String displayName;
/*
* Regional display name of the Azure Extended Zone.
*/
- @JsonProperty(value = "regionalDisplayName", required = true, access = JsonProperty.Access.WRITE_ONLY)
private String regionalDisplayName;
/*
* Type of region for the Azure Extended Zone.
*/
- @JsonProperty(value = "regionType", required = true, access = JsonProperty.Access.WRITE_ONLY)
private String regionType;
/*
* Category of region for the Azure Extended Zone.
*/
- @JsonProperty(value = "regionCategory", required = true, access = JsonProperty.Access.WRITE_ONLY)
private String regionCategory;
/*
* Geography of the Azure Extended Zone.
*/
- @JsonProperty(value = "geography", required = true, access = JsonProperty.Access.WRITE_ONLY)
private String geography;
/*
* The Geography Group of the Azure Extended Zone.
*/
- @JsonProperty(value = "geographyGroup", required = true, access = JsonProperty.Access.WRITE_ONLY)
private String geographyGroup;
/*
* The Longitude of the Azure Extended Zone.
*/
- @JsonProperty(value = "longitude", required = true, access = JsonProperty.Access.WRITE_ONLY)
private String longitude;
/*
* The Latitude of the Azure Extended Zone.
*/
- @JsonProperty(value = "latitude", required = true, access = JsonProperty.Access.WRITE_ONLY)
private String latitude;
/*
* The Home Location of the Azure Extended Zone.
*/
- @JsonProperty(value = "homeLocation", required = true, access = JsonProperty.Access.WRITE_ONLY)
private String homeLocation;
/**
* Creates an instance of ExtendedZoneProperties class.
*/
- public ExtendedZoneProperties() {
+ private ExtendedZoneProperties() {
}
/**
@@ -191,4 +184,62 @@ public String homeLocation() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExtendedZoneProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExtendedZoneProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ExtendedZoneProperties.
+ */
+ public static ExtendedZoneProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExtendedZoneProperties deserializedExtendedZoneProperties = new ExtendedZoneProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("displayName".equals(fieldName)) {
+ deserializedExtendedZoneProperties.displayName = reader.getString();
+ } else if ("regionalDisplayName".equals(fieldName)) {
+ deserializedExtendedZoneProperties.regionalDisplayName = reader.getString();
+ } else if ("regionType".equals(fieldName)) {
+ deserializedExtendedZoneProperties.regionType = reader.getString();
+ } else if ("regionCategory".equals(fieldName)) {
+ deserializedExtendedZoneProperties.regionCategory = reader.getString();
+ } else if ("geography".equals(fieldName)) {
+ deserializedExtendedZoneProperties.geography = reader.getString();
+ } else if ("geographyGroup".equals(fieldName)) {
+ deserializedExtendedZoneProperties.geographyGroup = reader.getString();
+ } else if ("longitude".equals(fieldName)) {
+ deserializedExtendedZoneProperties.longitude = reader.getString();
+ } else if ("latitude".equals(fieldName)) {
+ deserializedExtendedZoneProperties.latitude = reader.getString();
+ } else if ("homeLocation".equals(fieldName)) {
+ deserializedExtendedZoneProperties.homeLocation = reader.getString();
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedExtendedZoneProperties.provisioningState
+ = ProvisioningState.fromString(reader.getString());
+ } else if ("registrationState".equals(fieldName)) {
+ deserializedExtendedZoneProperties.registrationState
+ = RegistrationState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExtendedZoneProperties;
+ });
+ }
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZones.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZones.java
index afb4a6c6b476..9f91ef3c39fd 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZones.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ExtendedZones.java
@@ -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.models;
@@ -13,47 +13,47 @@
*/
public interface ExtendedZones {
/**
- * 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}.
*/
- PagedIterable list();
+ Response 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.
*/
- PagedIterable list(Context context);
+ ExtendedZone 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}.
*/
- Response getWithResponse(String extendedZoneName, Context context);
+ PagedIterable 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}.
*/
- ExtendedZone get(String extendedZoneName);
+ PagedIterable list(Context context);
/**
* Registers a subscription for an Extended Zone.
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Operation.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Operation.java
index 3839f474c867..0e867cbe8415 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Operation.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Operation.java
@@ -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.models;
@@ -20,7 +20,7 @@ public interface Operation {
/**
* Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
- * operations and "false" for ARM/control-plane operations.
+ * operations and "false" for Azure Resource Manager/control-plane operations.
*
* @return the isDataAction value.
*/
@@ -42,8 +42,8 @@ public interface Operation {
Origin origin();
/**
- * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
- * only APIs.
+ * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
*
* @return the actionType value.
*/
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/OperationDisplay.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/OperationDisplay.java
index 7fa4a38b19b2..0a07db6529ef 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/OperationDisplay.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/OperationDisplay.java
@@ -1,45 +1,48 @@
// 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.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
- * Localized display information for this particular operation.
+ * Localized display information for and operation.
*/
@Immutable
-public final class OperationDisplay {
+public final class OperationDisplay implements JsonSerializable {
/*
- * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or
+ * "Microsoft Compute".
*/
- @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
private String provider;
/*
- * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or
+ * "Job Schedule Collections".
*/
- @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
private String resource;
/*
- * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine".
+ * The concise, localized friendly name for the operation; suitable for dropdowns. E.g.
+ * "Create or Update Virtual Machine", "Restart Virtual Machine".
*/
- @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY)
private String operation;
/*
* The short, localized friendly description of the operation; suitable for tool tips and detailed views.
*/
- @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
private String description;
/**
* Creates an instance of OperationDisplay class.
*/
- public OperationDisplay() {
+ private OperationDisplay() {
}
/**
@@ -89,4 +92,45 @@ public String description() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationDisplay from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationDisplay.
+ */
+ public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationDisplay deserializedOperationDisplay = new OperationDisplay();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("provider".equals(fieldName)) {
+ deserializedOperationDisplay.provider = reader.getString();
+ } else if ("resource".equals(fieldName)) {
+ deserializedOperationDisplay.resource = reader.getString();
+ } else if ("operation".equals(fieldName)) {
+ deserializedOperationDisplay.operation = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedOperationDisplay.description = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationDisplay;
+ });
+ }
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/OperationListResult.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/OperationListResult.java
deleted file mode 100644
index 31c2d9eea541..000000000000
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/OperationListResult.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.edgezones.models;
-
-import com.azure.core.annotation.Immutable;
-import com.azure.resourcemanager.edgezones.fluent.models.OperationInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/**
- * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
- * results.
- */
-@Immutable
-public final class OperationListResult {
- /*
- * List of operations supported by the resource provider
- */
- @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
- private List value;
-
- /*
- * URL to get the next set of operation list results (if there are any).
- */
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
- private String nextLink;
-
- /**
- * Creates an instance of OperationListResult class.
- */
- public OperationListResult() {
- }
-
- /**
- * Get the value property: List of operations supported by the resource provider.
- *
- * @return the value value.
- */
- public List value() {
- return this.value;
- }
-
- /**
- * Get the nextLink property: URL to get the next set of operation list results (if there are any).
- *
- * @return the nextLink value.
- */
- public String nextLink() {
- return this.nextLink;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (value() != null) {
- value().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Operations.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Operations.java
index 22315b6bb92c..53fd25597c35 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Operations.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Operations.java
@@ -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.models;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Origin.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Origin.java
index 427af993184f..018d2ada55a5 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Origin.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/Origin.java
@@ -1,11 +1,10 @@
// 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.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -14,17 +13,17 @@
*/
public final class Origin extends ExpandableStringEnum {
/**
- * Static value user for Origin.
+ * Indicates the operation is initiated by a user.
*/
public static final Origin USER = fromString("user");
/**
- * Static value system for Origin.
+ * Indicates the operation is initiated by a system.
*/
public static final Origin SYSTEM = fromString("system");
/**
- * Static value user,system for Origin.
+ * Indicates the operation is initiated by a user or system.
*/
public static final Origin USER_SYSTEM = fromString("user,system");
@@ -43,7 +42,6 @@ public Origin() {
* @param name a name to look for.
* @return the corresponding Origin.
*/
- @JsonCreator
public static Origin fromString(String name) {
return fromString(name, Origin.class);
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ProvisioningState.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ProvisioningState.java
index b503b73e1395..01056ce9243d 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ProvisioningState.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/ProvisioningState.java
@@ -1,11 +1,10 @@
// 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.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -13,37 +12,37 @@
*/
public final class ProvisioningState extends ExpandableStringEnum {
/**
- * Static value Succeeded for ProvisioningState.
+ * Resource has been created.
*/
public static final ProvisioningState SUCCEEDED = fromString("Succeeded");
/**
- * Static value Failed for ProvisioningState.
+ * Resource creation failed.
*/
public static final ProvisioningState FAILED = fromString("Failed");
/**
- * Static value Canceled for ProvisioningState.
+ * Resource creation was canceled.
*/
public static final ProvisioningState CANCELED = fromString("Canceled");
/**
- * Static value Provisioning for ProvisioningState.
+ * Provisioning State.
*/
public static final ProvisioningState PROVISIONING = fromString("Provisioning");
/**
- * Static value Updating for ProvisioningState.
+ * Updating State.
*/
public static final ProvisioningState UPDATING = fromString("Updating");
/**
- * Static value Deleting for ProvisioningState.
+ * Deleting State.
*/
public static final ProvisioningState DELETING = fromString("Deleting");
/**
- * Static value Accepted for ProvisioningState.
+ * Accepted State.
*/
public static final ProvisioningState ACCEPTED = fromString("Accepted");
@@ -62,7 +61,6 @@ public ProvisioningState() {
* @param name a name to look for.
* @return the corresponding ProvisioningState.
*/
- @JsonCreator
public static ProvisioningState fromString(String name) {
return fromString(name, ProvisioningState.class);
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/RegistrationState.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/RegistrationState.java
index 3ccc8de764bd..23ea3664aa90 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/RegistrationState.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/RegistrationState.java
@@ -1,11 +1,10 @@
// 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.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -13,22 +12,22 @@
*/
public final class RegistrationState extends ExpandableStringEnum {
/**
- * Static value NotRegistered for RegistrationState.
+ * Subscription not registered for the Azure Extended Zone.
*/
public static final RegistrationState NOT_REGISTERED = fromString("NotRegistered");
/**
- * Static value PendingRegister for RegistrationState.
+ * Subscription pending registration for the Azure Extended Zone.
*/
public static final RegistrationState PENDING_REGISTER = fromString("PendingRegister");
/**
- * Static value Registered for RegistrationState.
+ * Subscription is registered for the Azure Extended Zone.
*/
public static final RegistrationState REGISTERED = fromString("Registered");
/**
- * Static value PendingUnregister for RegistrationState.
+ * Subscription is pending unregistering for the Azure Extended Zone.
*/
public static final RegistrationState PENDING_UNREGISTER = fromString("PendingUnregister");
@@ -47,7 +46,6 @@ public RegistrationState() {
* @param name a name to look for.
* @return the corresponding RegistrationState.
*/
- @JsonCreator
public static RegistrationState fromString(String name) {
return fromString(name, RegistrationState.class);
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/package-info.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/package-info.java
index 19d29ca38e33..3df35aaca0fb 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/package-info.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/models/package-info.java
@@ -1,9 +1,8 @@
// 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 containing the data models for MicrosoftEdgeZones.
- * null.
+ * Package containing the data models for EdgeZones.
*/
package com.azure.resourcemanager.edgezones.models;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/package-info.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/package-info.java
index 3b7a3e9bb0e0..8befcfaaffe3 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/package-info.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/package-info.java
@@ -1,9 +1,8 @@
// 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 containing the classes for MicrosoftEdgeZones.
- * null.
+ * Package containing the classes for EdgeZones.
*/
package com.azure.resourcemanager.edgezones;
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/module-info.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/module-info.java
index 4670c8337568..fd66222ee460 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/module-info.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/module-info.java
@@ -1,13 +1,16 @@
// 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.
module com.azure.resourcemanager.edgezones {
requires transitive com.azure.core.management;
+
exports com.azure.resourcemanager.edgezones;
exports com.azure.resourcemanager.edgezones.fluent;
exports com.azure.resourcemanager.edgezones.fluent.models;
exports com.azure.resourcemanager.edgezones.models;
- opens com.azure.resourcemanager.edgezones.fluent.models to com.azure.core, com.fasterxml.jackson.databind;
- opens com.azure.resourcemanager.edgezones.models to com.azure.core, com.fasterxml.jackson.databind;
-}
\ No newline at end of file
+
+ opens com.azure.resourcemanager.edgezones.fluent.models to com.azure.core;
+ opens com.azure.resourcemanager.edgezones.models to com.azure.core;
+ opens com.azure.resourcemanager.edgezones.implementation.models to com.azure.core;
+}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-edgezones/proxy-config.json b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-edgezones/proxy-config.json
index 35a6d9549e30..62f3b34f8dbc 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-edgezones/proxy-config.json
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-edgezones/proxy-config.json
@@ -1 +1 @@
-[ [ "com.azure.resourcemanager.edgezones.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.edgezones.implementation.ExtendedZonesClientImpl$ExtendedZonesService" ] ]
\ No newline at end of file
+[["com.azure.resourcemanager.edgezones.implementation.ExtendedZonesClientImpl$ExtendedZonesService"],["com.azure.resourcemanager.edgezones.implementation.OperationsClientImpl$OperationsService"]]
\ No newline at end of file
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-edgezones/reflect-config.json b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-edgezones/reflect-config.json
index b6b99feffe81..0637a088a01e 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-edgezones/reflect-config.json
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-edgezones/reflect-config.json
@@ -1,51 +1 @@
-[ {
- "name" : "com.azure.resourcemanager.edgezones.models.OperationListResult",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.edgezones.fluent.models.OperationInner",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.edgezones.models.OperationDisplay",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.edgezones.models.ExtendedZoneListResult",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.edgezones.fluent.models.ExtendedZoneInner",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.edgezones.models.ExtendedZoneProperties",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.edgezones.models.Origin",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.edgezones.models.ActionType",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.edgezones.models.ProvisioningState",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.edgezones.models.RegistrationState",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-} ]
\ No newline at end of file
+[]
\ No newline at end of file
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesGetSamples.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesGetSamples.java
index 6cb676224a4b..543f731962d2 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesGetSamples.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesGetSamples.java
@@ -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.generated;
@@ -9,7 +9,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.
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesListSamples.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesListSamples.java
index a4137ac9787f..50bda82eee5c 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesListSamples.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesListSamples.java
@@ -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.generated;
@@ -9,7 +9,7 @@
*/
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.
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesRegisterSamples.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesRegisterSamples.java
index c22184b1233a..354233af3a81 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesRegisterSamples.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesRegisterSamples.java
@@ -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.generated;
@@ -9,7 +9,7 @@
*/
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.
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesUnregisterSamples.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesUnregisterSamples.java
index 205503a7a881..2685cc4d2df6 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesUnregisterSamples.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesUnregisterSamples.java
@@ -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.generated;
@@ -9,7 +9,7 @@
*/
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.
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/OperationsListSamples.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/OperationsListSamples.java
index 206f371a8806..c6c85c4f219c 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/OperationsListSamples.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/samples/java/com/azure/resourcemanager/edgezones/generated/OperationsListSamples.java
@@ -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.generated;
@@ -9,7 +9,7 @@
*/
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.
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZoneInnerTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZoneInnerTests.java
index 697bf07231d8..80ab8c24c999 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZoneInnerTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZoneInnerTests.java
@@ -1,24 +1,17 @@
// 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.generated;
import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.edgezones.fluent.models.ExtendedZoneInner;
-import com.azure.resourcemanager.edgezones.models.ExtendedZoneProperties;
public final class ExtendedZoneInnerTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
ExtendedZoneInner model = BinaryData.fromString(
- "{\"properties\":{\"provisioningState\":\"Failed\",\"registrationState\":\"NotRegistered\",\"displayName\":\"wmfdatscmdvpjhul\",\"regionalDisplayName\":\"uuvmkjozkrwfnd\",\"regionType\":\"odjpslwejd\",\"regionCategory\":\"vwryoqpso\",\"geography\":\"cctazakljlahbc\",\"geographyGroup\":\"yffdfdos\",\"longitude\":\"gexpaojakhmsbz\",\"latitude\":\"hcrzevd\",\"homeLocation\":\"hlxaolthqtr\"},\"id\":\"jbp\",\"name\":\"zfsinzgvf\",\"type\":\"jrwzox\"}")
+ "{\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"PendingUnregister\",\"displayName\":\"zvgnwzs\",\"regionalDisplayName\":\"mglzufcy\",\"regionType\":\"kohdbiha\",\"regionCategory\":\"ufhfcbjysa\",\"geography\":\"ithxqhabifpi\",\"geographyGroup\":\"xwczbyscnp\",\"longitude\":\"x\",\"latitude\":\"hiv\",\"homeLocation\":\"qniwbybrkxvdumj\"},\"id\":\"tfwvukxgaudc\",\"name\":\"snhsjcnyejhkryh\",\"type\":\"napczwlokjy\"}")
.toObject(ExtendedZoneInner.class);
}
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExtendedZoneInner model = new ExtendedZoneInner().withProperties(new ExtendedZoneProperties());
- model = BinaryData.fromObject(model).toObject(ExtendedZoneInner.class);
- }
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZoneListResultTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZoneListResultTests.java
index e828b099f4c1..c6ba61b9d379 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZoneListResultTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZoneListResultTests.java
@@ -1,31 +1,19 @@
// 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.generated;
import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.edgezones.fluent.models.ExtendedZoneInner;
-import com.azure.resourcemanager.edgezones.models.ExtendedZoneListResult;
-import com.azure.resourcemanager.edgezones.models.ExtendedZoneProperties;
-import java.util.Arrays;
+import com.azure.resourcemanager.edgezones.implementation.models.ExtendedZoneListResult;
import org.junit.jupiter.api.Assertions;
public final class ExtendedZoneListResultTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
ExtendedZoneListResult model = BinaryData.fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"registrationState\":\"NotRegistered\",\"displayName\":\"xqhabi\",\"regionalDisplayName\":\"pikxwczbyscnpqxu\",\"regionType\":\"ivyqniwbybrkxvd\",\"regionCategory\":\"mjgr\",\"geography\":\"fwvuk\",\"geographyGroup\":\"gaudcc\",\"longitude\":\"nhsjcnyej\",\"latitude\":\"kryhtnapczwlokj\",\"homeLocation\":\"emkkvnipjox\"},\"id\":\"nchgej\",\"name\":\"podmailzydehojwy\",\"type\":\"huxinpmqnj\"}],\"nextLink\":\"wixjsprozvcp\"}")
+ "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"registrationState\":\"PendingUnregister\",\"displayName\":\"dio\",\"regionalDisplayName\":\"jpslwejd\",\"regionType\":\"vwryoqpso\",\"regionCategory\":\"cctazakljlahbc\",\"geography\":\"yffdfdos\",\"geographyGroup\":\"gexpaojakhmsbz\",\"longitude\":\"hcrzevd\",\"latitude\":\"hlxaolthqtr\",\"homeLocation\":\"qjbpfzfsin\"},\"id\":\"v\",\"name\":\"cjrwzoxxjtfellu\",\"type\":\"fziton\"},{\"properties\":{\"provisioningState\":\"Failed\",\"registrationState\":\"PendingUnregister\",\"displayName\":\"kjlxofpdvhpf\",\"regionalDisplayName\":\"xypininmayhuybbk\",\"regionType\":\"odepoogin\",\"regionCategory\":\"vamih\",\"geography\":\"ognarxzxtheotus\",\"geographyGroup\":\"vyevcciqi\",\"longitude\":\"nhungbw\",\"latitude\":\"zrnf\",\"homeLocation\":\"gxg\"},\"id\":\"pemvtzfkufubljof\",\"name\":\"qeof\",\"type\":\"aeqjhqjbasvms\"}],\"nextLink\":\"qulngsntnbybkzgc\"}")
.toObject(ExtendedZoneListResult.class);
- Assertions.assertEquals("wixjsprozvcp", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExtendedZoneListResult model = new ExtendedZoneListResult()
- .withValue(Arrays.asList(new ExtendedZoneInner().withProperties(new ExtendedZoneProperties())))
- .withNextLink("wixjsprozvcp");
- model = BinaryData.fromObject(model).toObject(ExtendedZoneListResult.class);
- Assertions.assertEquals("wixjsprozvcp", model.nextLink());
+ Assertions.assertEquals("qulngsntnbybkzgc", model.nextLink());
}
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonePropertiesTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonePropertiesTests.java
index 329bedcaa29a..0d37261dff72 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonePropertiesTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonePropertiesTests.java
@@ -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.generated;
@@ -11,13 +11,7 @@ public final class ExtendedZonePropertiesTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
ExtendedZoneProperties model = BinaryData.fromString(
- "{\"provisioningState\":\"Accepted\",\"registrationState\":\"Registered\",\"displayName\":\"lluwfzitonpeq\",\"regionalDisplayName\":\"pjkjlxofpdv\",\"regionType\":\"pfxxy\",\"regionCategory\":\"ininmay\",\"geography\":\"uybbkpodep\",\"geographyGroup\":\"oginuvamiheognar\",\"longitude\":\"zxtheotusivyevcc\",\"latitude\":\"qi\",\"homeLocation\":\"nhungbw\"}")
+ "{\"provisioningState\":\"Canceled\",\"registrationState\":\"PendingRegister\",\"displayName\":\"ni\",\"regionalDisplayName\":\"joxzjnchgejspodm\",\"regionType\":\"ilzyd\",\"regionCategory\":\"h\",\"geography\":\"jwyahuxinpmqnja\",\"geographyGroup\":\"wixjsprozvcp\",\"longitude\":\"tegjvwmf\",\"latitude\":\"atscmd\",\"homeLocation\":\"pjhulsuuvmkj\"}")
.toObject(ExtendedZoneProperties.class);
}
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExtendedZoneProperties model = new ExtendedZoneProperties();
- model = BinaryData.fromObject(model).toObject(ExtendedZoneProperties.class);
- }
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesGetWithResponseMockTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesGetWithResponseMockTests.java
index c273860f58a4..2ca476359ece 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesGetWithResponseMockTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesGetWithResponseMockTests.java
@@ -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.generated;
@@ -20,7 +20,7 @@ public final class ExtendedZonesGetWithResponseMockTests {
@Test
public void testGetWithResponse() throws Exception {
String responseStr
- = "{\"properties\":{\"provisioningState\":\"Deleting\",\"registrationState\":\"PendingUnregister\",\"displayName\":\"xhocdgeablgphuti\",\"regionalDisplayName\":\"ndv\",\"regionType\":\"aozwyiftyhxhu\",\"regionCategory\":\"okftyxolniwpwcuk\",\"geography\":\"fkgiawxk\",\"geographyGroup\":\"ryplwckbasyypn\",\"longitude\":\"dhsgcba\",\"latitude\":\"phejkotynqgoulz\",\"homeLocation\":\"dlikwyqkgfgibma\"},\"id\":\"akeqs\",\"name\":\"xybz\",\"type\":\"qedqytbciqfoufl\"}";
+ = "{\"properties\":{\"provisioningState\":\"Updating\",\"registrationState\":\"NotRegistered\",\"displayName\":\"eebvmgxsab\",\"regionalDisplayName\":\"yqduujit\",\"regionType\":\"jczdzevndh\",\"regionCategory\":\"rwpdappdsbdkvwrw\",\"geography\":\"feusnhut\",\"geographyGroup\":\"eltmrldhugjzzdat\",\"longitude\":\"xhocdgeablgphuti\",\"latitude\":\"ndv\",\"homeLocation\":\"aozwyiftyhxhu\"},\"id\":\"k\",\"name\":\"tyxolniwpwc\",\"type\":\"kjfkg\"}";
HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
@@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception {
new AzureProfile("", "", AzureEnvironment.AZURE));
ExtendedZone response
- = manager.extendedZones().getWithResponse("nhutjeltmrldhugj", com.azure.core.util.Context.NONE).getValue();
+ = manager.extendedZones().getWithResponse("nzl", com.azure.core.util.Context.NONE).getValue();
}
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesListMockTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesListMockTests.java
index 8cd26b391519..95e58ae85645 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesListMockTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesListMockTests.java
@@ -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.generated;
@@ -21,7 +21,7 @@ public final class ExtendedZonesListMockTests {
@Test
public void testList() throws Exception {
String responseStr
- = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"registrationState\":\"PendingUnregister\",\"displayName\":\"ybkzgcwr\",\"regionalDisplayName\":\"clxxwrljdo\",\"regionType\":\"skcqvkocrcjd\",\"regionCategory\":\"wtnhxbnjbiksqr\",\"geography\":\"lssai\",\"geographyGroup\":\"qpjwnzlljfm\",\"longitude\":\"pee\",\"latitude\":\"vmgxsab\",\"homeLocation\":\"yqduujit\"},\"id\":\"czdzev\",\"name\":\"dhkrwpdappdsbdk\",\"type\":\"wrwjfeu\"}]}";
+ = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"PendingUnregister\",\"displayName\":\"ryplwckbasyypn\",\"regionalDisplayName\":\"dhsgcba\",\"regionType\":\"phejkotynqgoulz\",\"regionCategory\":\"dlikwyqkgfgibma\",\"geography\":\"gakeqsr\",\"geographyGroup\":\"yb\",\"longitude\":\"qqedqytbciqfou\",\"latitude\":\"lmmnkzsmodmglo\",\"homeLocation\":\"gpbkwtmut\"},\"id\":\"qktapspwgcuert\",\"name\":\"mkdo\",\"type\":\"vqwhbmdgbbjfd\"}]}";
HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesRegisterWithResponseMockTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesRegisterWithResponseMockTests.java
index 1721079e60ac..e4fb83736483 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesRegisterWithResponseMockTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesRegisterWithResponseMockTests.java
@@ -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.generated;
@@ -20,7 +20,7 @@ public final class ExtendedZonesRegisterWithResponseMockTests {
@Test
public void testRegisterWithResponse() throws Exception {
String responseStr
- = "{\"properties\":{\"provisioningState\":\"Provisioning\",\"registrationState\":\"Registered\",\"displayName\":\"pbkwtmu\",\"regionalDisplayName\":\"duqkt\",\"regionType\":\"pspwgcuertu\",\"regionCategory\":\"kdosvqw\",\"geography\":\"bmdg\",\"geographyGroup\":\"bjf\",\"longitude\":\"dgmb\",\"latitude\":\"bexppb\",\"homeLocation\":\"tq\"},\"id\":\"ol\",\"name\":\"p\",\"type\":\"psalgbqux\"}";
+ = "{\"properties\":{\"provisioningState\":\"Provisioning\",\"registrationState\":\"NotRegistered\",\"displayName\":\"fpfpsalgbquxigj\",\"regionalDisplayName\":\"jgzjaoyfhrtx\",\"regionType\":\"lnerkujysvleju\",\"regionCategory\":\"fqawrlyxw\",\"geography\":\"kcprbnw\",\"geographyGroup\":\"xgjvtbv\",\"longitude\":\"ysszdnrujqguh\",\"latitude\":\"uouq\",\"homeLocation\":\"prwzwbnguitnwui\"},\"id\":\"a\",\"name\":\"x\",\"type\":\"fizuckyf\"}";
HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
@@ -30,7 +30,7 @@ public void testRegisterWithResponse() throws Exception {
new AzureProfile("", "", AzureEnvironment.AZURE));
ExtendedZone response
- = manager.extendedZones().registerWithResponse("mnkzsmod", com.azure.core.util.Context.NONE).getValue();
+ = manager.extendedZones().registerWithResponse("gmbmbexppbh", com.azure.core.util.Context.NONE).getValue();
}
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesUnregisterWithResponseMockTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesUnregisterWithResponseMockTests.java
index 4a5ffd65aaa4..333bdd0b5e14 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesUnregisterWithResponseMockTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/ExtendedZonesUnregisterWithResponseMockTests.java
@@ -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.generated;
@@ -20,7 +20,7 @@ public final class ExtendedZonesUnregisterWithResponseMockTests {
@Test
public void testUnregisterWithResponse() throws Exception {
String responseStr
- = "{\"properties\":{\"provisioningState\":\"Accepted\",\"registrationState\":\"PendingRegister\",\"displayName\":\"jysvl\",\"regionalDisplayName\":\"juvf\",\"regionType\":\"awrlyx\",\"regionCategory\":\"jkcpr\",\"geography\":\"nwbxgjvtbvpyssz\",\"geographyGroup\":\"nruj\",\"longitude\":\"guhmuouqfpr\",\"latitude\":\"zw\",\"homeLocation\":\"nguitnwuizgazxu\"},\"id\":\"zuckyfi\",\"name\":\"rfidfvzwdz\",\"type\":\"htymw\"}";
+ = "{\"properties\":{\"provisioningState\":\"Canceled\",\"registrationState\":\"PendingRegister\",\"displayName\":\"wdzuhtymwisd\",\"regionalDisplayName\":\"fthwxmnteiwa\",\"regionType\":\"pvkmijcmmxdcuf\",\"regionCategory\":\"fsrpymzidnse\",\"geography\":\"cxtbzsg\",\"geographyGroup\":\"yc\",\"longitude\":\"sne\",\"latitude\":\"mdwzjeiachboo\",\"homeLocation\":\"flnrosfqpteehzz\"},\"id\":\"pyqr\",\"name\":\"mzinpvswjdk\",\"type\":\"rsoodqxhcrmnoh\"}";
HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
@@ -29,9 +29,8 @@ public void testUnregisterWithResponse() throws Exception {
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
- ExtendedZone response = manager.extendedZones()
- .unregisterWithResponse("gjyjgzjaoyfhrtxi", com.azure.core.util.Context.NONE)
- .getValue();
+ ExtendedZone response
+ = manager.extendedZones().unregisterWithResponse("hr", com.azure.core.util.Context.NONE).getValue();
}
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationDisplayTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationDisplayTests.java
index d16a824e2de1..21d5beb55d4e 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationDisplayTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationDisplayTests.java
@@ -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.generated;
@@ -11,13 +11,7 @@ public final class OperationDisplayTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
OperationDisplay model = BinaryData.fromString(
- "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}")
+ "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}")
.toObject(OperationDisplay.class);
}
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationDisplay model = new OperationDisplay();
- model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
- }
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationInnerTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationInnerTests.java
index ecd8b608674d..d493fbb53954 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationInnerTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationInnerTests.java
@@ -1,24 +1,20 @@
// 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.generated;
import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.edgezones.fluent.models.OperationInner;
-import com.azure.resourcemanager.edgezones.models.OperationDisplay;
+import com.azure.resourcemanager.edgezones.models.ActionType;
+import org.junit.jupiter.api.Assertions;
public final class OperationInnerTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
OperationInner model = BinaryData.fromString(
- "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}")
+ "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}")
.toObject(OperationInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationInner model = new OperationInner().withDisplay(new OperationDisplay());
- model = BinaryData.fromObject(model).toObject(OperationInner.class);
+ Assertions.assertEquals(ActionType.INTERNAL, model.actionType());
}
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationListResultTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationListResultTests.java
index e58856f39125..ab7fcbe71182 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationListResultTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationListResultTests.java
@@ -1,23 +1,21 @@
// 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.generated;
import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.edgezones.models.OperationListResult;
+import com.azure.resourcemanager.edgezones.implementation.models.OperationListResult;
+import com.azure.resourcemanager.edgezones.models.ActionType;
+import org.junit.jupiter.api.Assertions;
public final class OperationListResultTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
OperationListResult model = BinaryData.fromString(
- "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}")
+ "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}")
.toObject(OperationListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationListResult model = new OperationListResult();
- model = BinaryData.fromObject(model).toObject(OperationListResult.class);
+ Assertions.assertEquals(ActionType.INTERNAL, model.value().get(0).actionType());
+ Assertions.assertEquals("kfo", model.nextLink());
}
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationsListMockTests.java b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationsListMockTests.java
index 2aa0aa73e57e..4fed55c56056 100644
--- a/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationsListMockTests.java
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/src/test/java/com/azure/resourcemanager/edgezones/generated/OperationsListMockTests.java
@@ -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.generated;
@@ -11,9 +11,11 @@
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.edgezones.EdgeZonesManager;
+import com.azure.resourcemanager.edgezones.models.ActionType;
import com.azure.resourcemanager.edgezones.models.Operation;
import java.nio.charset.StandardCharsets;
import java.time.OffsetDateTime;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.Mono;
@@ -21,7 +23,7 @@ public final class OperationsListMockTests {
@Test
public void testList() throws Exception {
String responseStr
- = "{\"value\":[{\"name\":\"rnfygxgispem\",\"isDataAction\":true,\"display\":{\"provider\":\"ufubl\",\"resource\":\"fxqeof\",\"operation\":\"e\",\"description\":\"hqjbasvmsmj\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}";
+ = "{\"value\":[{\"name\":\"wclxxwrl\",\"isDataAction\":true,\"display\":{\"provider\":\"kcqvkocrc\",\"resource\":\"kwt\",\"operation\":\"xbnjbiksq\",\"description\":\"lssai\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}";
HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
@@ -32,5 +34,6 @@ public void testList() throws Exception {
PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE);
+ Assertions.assertEquals(ActionType.INTERNAL, response.iterator().next().actionType());
}
}
diff --git a/sdk/edgezones/azure-resourcemanager-edgezones/tsp-location.yaml b/sdk/edgezones/azure-resourcemanager-edgezones/tsp-location.yaml
new file mode 100644
index 000000000000..a14e82e41c68
--- /dev/null
+++ b/sdk/edgezones/azure-resourcemanager-edgezones/tsp-location.yaml
@@ -0,0 +1,4 @@
+directory: specification/edgezones/EdgeZones.Management
+commit: cf2870c3d6554ef0543db96283c8820cb9ed7c2b
+repo: Azure/azure-rest-api-specs
+additionalDirectories: