diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/CHANGELOG.md b/sdk/agrifood/azure-resourcemanager-agrifood/CHANGELOG.md
index 7356ee0b3cb8d..307525bc09b5e 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/CHANGELOG.md
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-11-17)
+
+- Azure Resource Manager AgriFood client library for Java. This package contains Microsoft Azure SDK for AgriFood Management SDK. APIs documentation for Azure AgFoodPlatform Resource Provider Service. Package tag package-preview-2021-09. 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/agrifood/azure-resourcemanager-agrifood/README.md b/sdk/agrifood/azure-resourcemanager-agrifood/README.md
index 22161355b5368..97a45f5fb2987 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/README.md
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-agrifood
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
### Authentication
-By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
- `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.
-In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-With above configuration, `azure` client can be authenticated by following code:
+With above configuration, `azure` client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide][cg].
-1. Fork it
-1. Create your feature branch (`git checkout -b my-new-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-new-feature`)
-1. Create new Pull Request
+This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[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
+[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/SAMPLE.md b/sdk/agrifood/azure-resourcemanager-agrifood/SAMPLE.md
index 50eb313368ea1..3ffc89d722ebd 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/SAMPLE.md
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/SAMPLE.md
@@ -3,11 +3,10 @@
## Extensions
-- [Create](#extensions_create)
+- [CreateOrUpdate](#extensions_createorupdate)
- [Delete](#extensions_delete)
- [Get](#extensions_get)
- [ListByFarmBeats](#extensions_listbyfarmbeats)
-- [Update](#extensions_update)
## FarmBeatsExtensions
@@ -43,25 +42,25 @@
- [Get](#privatelinkresources_get)
- [ListByResource](#privatelinkresources_listbyresource)
-### Extensions_Create
+### Extensions_CreateOrUpdate
```java
-import com.azure.core.util.Context;
-
-/** Samples for Extensions Create. */
-public final class ExtensionsCreateSamples {
+/** Samples for Extensions CreateOrUpdate. */
+public final class ExtensionsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Extensions_Create.json
+ * x-ms-original-file: specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Extensions_CreateOrUpdate.json
*/
/**
- * Sample code: Extensions_Create.
+ * Sample code: Extensions_CreateOrUpdate.
*
* @param manager Entry point to AgriFoodManager.
*/
- public static void extensionsCreate(com.azure.resourcemanager.agrifood.AgriFoodManager manager) {
+ public static void extensionsCreateOrUpdate(com.azure.resourcemanager.agrifood.AgriFoodManager manager) {
manager
.extensions()
- .createWithResponse("examples-rg", "examples-farmbeatsResourceName", "provider.extension", Context.NONE);
+ .define("provider.extension")
+ .withExistingFarmBeat("examples-rg", "examples-farmbeatsResourceName")
+ .create();
}
}
```
@@ -135,29 +134,6 @@ public final class ExtensionsListByFarmBeatsSamples {
}
```
-### Extensions_Update
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for Extensions Update. */
-public final class ExtensionsUpdateSamples {
- /*
- * x-ms-original-file: specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Extensions_Update.json
- */
- /**
- * Sample code: Extensions_Update.
- *
- * @param manager Entry point to AgriFoodManager.
- */
- public static void extensionsUpdate(com.azure.resourcemanager.agrifood.AgriFoodManager manager) {
- manager
- .extensions()
- .updateWithResponse("examples-rg", "examples-farmbeatsResourceName", "provider.extension", Context.NONE);
- }
-}
-```
-
### FarmBeatsExtensions_Get
```java
@@ -255,7 +231,9 @@ public final class FarmBeatsModelsDeleteSamples {
* @param manager Entry point to AgriFoodManager.
*/
public static void farmBeatsModelsDelete(com.azure.resourcemanager.agrifood.AgriFoodManager manager) {
- manager.farmBeatsModels().deleteWithResponse("examples-rg", "examples-farmBeatsResourceName", Context.NONE);
+ manager
+ .farmBeatsModels()
+ .deleteByResourceGroupWithResponse("examples-rg", "examples-farmBeatsResourceName", Context.NONE);
}
}
```
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/AgriFoodManager.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/AgriFoodManager.java
index c367847fb042e..7f3554885b507 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/AgriFoodManager.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/AgriFoodManager.java
@@ -44,6 +44,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.UUID;
import java.util.stream.Collectors;
/** Entry point to AgriFoodManager. APIs documentation for Azure AgFoodPlatform Resource Provider Service. */
@@ -71,7 +72,7 @@ private AgriFoodManager(HttpPipeline httpPipeline, AzureProfile profile, Duratio
new AgriFoodManagementClientBuilder()
.pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
- .subscriptionId(profile.getSubscriptionId())
+ .subscriptionId(UUID.fromString(profile.getSubscriptionId()))
.defaultPollInterval(defaultPollInterval)
.buildClient();
}
@@ -285,7 +286,7 @@ public AgriFoodManager authenticate(TokenCredential credential, AzureProfile pro
}
/**
- * Gets the resource collection API of Extensions.
+ * Gets the resource collection API of Extensions. It manages Extension.
*
* @return Resource collection API of Extensions.
*/
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/AgriFoodManagementClient.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/AgriFoodManagementClient.java
index 00b52b1d45c59..165e448e58110 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/AgriFoodManagementClient.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/AgriFoodManagementClient.java
@@ -6,15 +6,16 @@
import com.azure.core.http.HttpPipeline;
import java.time.Duration;
+import java.util.UUID;
/** The interface for AgriFoodManagementClient class. */
public interface AgriFoodManagementClient {
/**
- * Gets The ID of the target subscription.
+ * Gets The ID of the target subscription. The value must be an UUID.
*
* @return the subscriptionId value.
*/
- String getSubscriptionId();
+ UUID getSubscriptionId();
/**
* Gets server parameter.
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/ExtensionsClient.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/ExtensionsClient.java
index 98635606463ef..203de7cf971c6 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/ExtensionsClient.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/ExtensionsClient.java
@@ -10,30 +10,19 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.agrifood.fluent.models.ExtensionInner;
+import com.azure.resourcemanager.agrifood.models.ExtensionInstallationRequest;
import java.util.List;
/** An instance of this class provides access to all the operations defined in ExtensionsClient. */
public interface ExtensionsClient {
/**
- * Install extension.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
- * @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 extension resource.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- ExtensionInner create(String resourceGroupName, String farmBeatsResourceName, String extensionId);
-
- /**
- * Install extension.
+ * Install or Update extension. AdditionalApiProperties are merged patch and if the extension is updated to a new
+ * version then the obsolete entries will be auto deleted from AdditionalApiProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
+ * @param requestBody Extension resource request body.
* @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.
@@ -41,11 +30,16 @@ public interface ExtensionsClient {
* @return extension resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context);
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String farmBeatsResourceName,
+ String extensionId,
+ ExtensionInstallationRequest requestBody,
+ Context context);
/**
- * Get installed extension details by extension id.
+ * Install or Update extension. AdditionalApiProperties are merged patch and if the extension is updated to a new
+ * version then the obsolete entries will be auto deleted from AdditionalApiProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
@@ -53,10 +47,10 @@ Response createWithResponse(
* @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 installed extension details by extension id.
+ * @return extension resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ExtensionInner get(String resourceGroupName, String farmBeatsResourceName, String extensionId);
+ ExtensionInner createOrUpdate(String resourceGroupName, String farmBeatsResourceName, String extensionId);
/**
* Get installed extension details by extension id.
@@ -75,7 +69,7 @@ Response getWithResponse(
String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context);
/**
- * Upgrade to latest extension.
+ * Get installed extension details by extension id.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
@@ -83,13 +77,13 @@ Response getWithResponse(
* @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 extension resource.
+ * @return installed extension details by extension id.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ExtensionInner update(String resourceGroupName, String farmBeatsResourceName, String extensionId);
+ ExtensionInner get(String resourceGroupName, String farmBeatsResourceName, String extensionId);
/**
- * Upgrade to latest extension.
+ * Uninstall extension.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
@@ -98,10 +92,10 @@ Response getWithResponse(
* @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 extension resource along with {@link Response}.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
+ Response deleteWithResponse(
String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context);
/**
@@ -117,22 +111,6 @@ Response updateWithResponse(
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String farmBeatsResourceName, String extensionId);
- /**
- * Uninstall extension.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
- * @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 {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context);
-
/**
* Get installed extensions details.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/FarmBeatsExtensionsClient.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/FarmBeatsExtensionsClient.java
index 7e94f2f52d116..16e48bb28a00e 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/FarmBeatsExtensionsClient.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/FarmBeatsExtensionsClient.java
@@ -51,24 +51,24 @@ PagedIterable list(
* Get farmBeats extension.
*
* @param farmBeatsExtensionId farmBeatsExtensionId to be queried.
+ * @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 farmBeats extension.
+ * @return farmBeats extension along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- FarmBeatsExtensionInner get(String farmBeatsExtensionId);
+ Response getWithResponse(String farmBeatsExtensionId, Context context);
/**
* Get farmBeats extension.
*
* @param farmBeatsExtensionId farmBeatsExtensionId to be queried.
- * @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 farmBeats extension along with {@link Response}.
+ * @return farmBeats extension.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String farmBeatsExtensionId, Context context);
+ FarmBeatsExtensionInner get(String farmBeatsExtensionId);
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/FarmBeatsModelsClient.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/FarmBeatsModelsClient.java
index beee985eef68f..6fdc7d39d50da 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/FarmBeatsModelsClient.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/FarmBeatsModelsClient.java
@@ -22,28 +22,28 @@ public interface FarmBeatsModelsClient {
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
+ * @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 farmBeats resource.
+ * @return farmBeats resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- FarmBeatsInner getByResourceGroup(String resourceGroupName, String farmBeatsResourceName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, Context context);
/**
* Get FarmBeats resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
- * @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 farmBeats resource along with {@link Response}.
+ * @return farmBeats resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String farmBeatsResourceName, Context context);
+ FarmBeatsInner getByResourceGroup(String resourceGroupName, String farmBeatsResourceName);
/**
* Create or update FarmBeats resource.
@@ -51,13 +51,15 @@ Response getByResourceGroupWithResponse(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param body FarmBeats resource create or update request object.
+ * @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 farmBeats ARM Resource.
+ * @return farmBeats ARM Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- FarmBeatsInner createOrUpdate(String resourceGroupName, String farmBeatsResourceName, FarmBeatsInner body);
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, FarmBeatsInner body, Context context);
/**
* Create or update FarmBeats resource.
@@ -65,15 +67,13 @@ Response getByResourceGroupWithResponse(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param body FarmBeats resource create or update request object.
- * @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 farmBeats ARM Resource along with {@link Response}.
+ * @return farmBeats ARM Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(
- String resourceGroupName, String farmBeatsResourceName, FarmBeatsInner body, Context context);
+ FarmBeatsInner createOrUpdate(String resourceGroupName, String farmBeatsResourceName, FarmBeatsInner body);
/**
* Update a FarmBeats resource.
@@ -141,26 +141,26 @@ FarmBeatsInner update(
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
+ * @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 {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String farmBeatsResourceName);
+ Response deleteWithResponse(String resourceGroupName, String farmBeatsResourceName, Context context);
/**
* Delete a FarmBeats resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
- * @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 {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String resourceGroupName, String farmBeatsResourceName, Context context);
+ void delete(String resourceGroupName, String farmBeatsResourceName);
/**
* Lists the FarmBeats instances for a subscription.
@@ -224,14 +224,15 @@ PagedIterable listByResourceGroup(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param operationResultsId The operation results id.
+ * @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 operationResults for a FarmBeats resource.
+ * @return operationResults for a FarmBeats resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ArmAsyncOperationInner getOperationResult(
- String resourceGroupName, String farmBeatsResourceName, String operationResultsId);
+ Response getOperationResultWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String operationResultsId, Context context);
/**
* Get operationResults for a FarmBeats resource.
@@ -239,13 +240,12 @@ ArmAsyncOperationInner getOperationResult(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param operationResultsId The operation results id.
- * @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 operationResults for a FarmBeats resource along with {@link Response}.
+ * @return operationResults for a FarmBeats resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getOperationResultWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String operationResultsId, Context context);
+ ArmAsyncOperationInner getOperationResult(
+ String resourceGroupName, String farmBeatsResourceName, String operationResultsId);
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/LocationsClient.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/LocationsClient.java
index a86bbfbb430ee..7cc5da7997d7c 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/LocationsClient.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/LocationsClient.java
@@ -17,25 +17,25 @@ public interface LocationsClient {
* Checks the name availability of the resource with requested resource name.
*
* @param body NameAvailabilityRequest object.
+ * @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 check availability result.
+ * @return the check availability result along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body);
+ Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityRequest body, Context context);
/**
* Checks the name availability of the resource with requested resource name.
*
* @param body NameAvailabilityRequest object.
- * @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 check availability result along with {@link Response}.
+ * @return the check availability result.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response checkNameAvailabilityWithResponse(
- CheckNameAvailabilityRequest body, Context context);
+ CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body);
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/PrivateEndpointConnectionsClient.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/PrivateEndpointConnectionsClient.java
index f1d874c24109a..8d8afe5f37490 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/PrivateEndpointConnectionsClient.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/PrivateEndpointConnectionsClient.java
@@ -22,17 +22,19 @@ public interface PrivateEndpointConnectionsClient {
* @param farmBeatsResourceName FarmBeats resource name.
* @param privateEndpointConnectionName Private endpoint connection name.
* @param body Request object.
+ * @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 Private Endpoint Connection resource.
+ * @return the private endpoint connection resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PrivateEndpointConnectionInner createOrUpdate(
+ Response createOrUpdateWithResponse(
String resourceGroupName,
String farmBeatsResourceName,
String privateEndpointConnectionName,
- PrivateEndpointConnectionInner body);
+ PrivateEndpointConnectionInner body,
+ Context context);
/**
* Approves or Rejects a Private endpoint connection request.
@@ -41,19 +43,17 @@ PrivateEndpointConnectionInner createOrUpdate(
* @param farmBeatsResourceName FarmBeats resource name.
* @param privateEndpointConnectionName Private endpoint connection name.
* @param body Request object.
- * @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 Private Endpoint Connection resource along with {@link Response}.
+ * @return the private endpoint connection resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(
+ PrivateEndpointConnectionInner createOrUpdate(
String resourceGroupName,
String farmBeatsResourceName,
String privateEndpointConnectionName,
- PrivateEndpointConnectionInner body,
- Context context);
+ PrivateEndpointConnectionInner body);
/**
* Get Private endpoint connection object.
@@ -61,14 +61,15 @@ Response createOrUpdateWithResponse(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param privateEndpointConnectionName Private endpoint connection name.
+ * @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 private endpoint connection object.
+ * @return private endpoint connection object along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PrivateEndpointConnectionInner get(
- String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName);
+ Response getWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName, Context context);
/**
* Get Private endpoint connection object.
@@ -76,15 +77,14 @@ PrivateEndpointConnectionInner get(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param privateEndpointConnectionName Private endpoint connection name.
- * @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 private endpoint connection object along with {@link Response}.
+ * @return private endpoint connection object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName, Context context);
+ PrivateEndpointConnectionInner get(
+ String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName);
/**
* Delete Private endpoint connection request.
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/PrivateLinkResourcesClient.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/PrivateLinkResourcesClient.java
index 246da2a55dee4..fa6b805d171f3 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/PrivateLinkResourcesClient.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/PrivateLinkResourcesClient.java
@@ -47,13 +47,15 @@ PagedIterable listByResource(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param subResourceName Sub resource name.
+ * @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 private link resource object.
+ * @return private link resource object along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PrivateLinkResourceInner get(String resourceGroupName, String farmBeatsResourceName, String subResourceName);
+ Response getWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String subResourceName, Context context);
/**
* Get Private link resource object.
@@ -61,13 +63,11 @@ PagedIterable listByResource(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param subResourceName Sub resource name.
- * @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 private link resource object along with {@link Response}.
+ * @return private link resource object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String subResourceName, Context context);
+ PrivateLinkResourceInner get(String resourceGroupName, String farmBeatsResourceName, String subResourceName);
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ArmAsyncOperationInner.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ArmAsyncOperationInner.java
index 71d60768ac31a..fa6c88b614a29 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ArmAsyncOperationInner.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ArmAsyncOperationInner.java
@@ -19,6 +19,10 @@ public final class ArmAsyncOperationInner {
@JsonProperty(value = "status")
private String status;
+ /** Creates an instance of ArmAsyncOperationInner class. */
+ public ArmAsyncOperationInner() {
+ }
+
/**
* Get the status property: Status of the async operation.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/CheckNameAvailabilityResponseInner.java
index 35c79bff3f32b..6a5b119dce383 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/CheckNameAvailabilityResponseInner.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/CheckNameAvailabilityResponseInner.java
@@ -29,6 +29,10 @@ public final class CheckNameAvailabilityResponseInner {
@JsonProperty(value = "message")
private String message;
+ /** Creates an instance of CheckNameAvailabilityResponseInner class. */
+ public CheckNameAvailabilityResponseInner() {
+ }
+
/**
* Get the nameAvailable property: Indicates if the resource name is available.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ExtensionInner.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ExtensionInner.java
index 9958f6107edbb..2ee37d11cda40 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ExtensionInner.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ExtensionInner.java
@@ -4,12 +4,15 @@
package com.azure.resourcemanager.agrifood.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.resourcemanager.agrifood.models.ApiProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
/** Extension resource. */
-@Fluent
+@Immutable
public final class ExtensionInner extends ProxyResource {
/*
* Extension resource properties.
@@ -23,6 +26,16 @@ public final class ExtensionInner extends ProxyResource {
@JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of ExtensionInner class. */
+ public ExtensionInner() {
+ }
+
/**
* Get the innerProperties property: Extension resource properties.
*
@@ -41,6 +54,15 @@ public String etag() {
return this.etag;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the extensionId property: Extension Id.
*
@@ -86,6 +108,15 @@ public String extensionApiDocsLink() {
return this.innerProperties() == null ? null : this.innerProperties().extensionApiDocsLink();
}
+ /**
+ * Get the additionalApiProperties property: Additional api properties.
+ *
+ * @return the additionalApiProperties value.
+ */
+ public Map additionalApiProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().additionalApiProperties();
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ExtensionProperties.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ExtensionProperties.java
index 69fcb9a327be8..72684e1af75aa 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ExtensionProperties.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/ExtensionProperties.java
@@ -5,7 +5,10 @@
package com.azure.resourcemanager.agrifood.fluent.models;
import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.agrifood.models.ApiProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
/** Extension resource properties. */
@Immutable
@@ -40,6 +43,17 @@ public final class ExtensionProperties {
@JsonProperty(value = "extensionApiDocsLink", access = JsonProperty.Access.WRITE_ONLY)
private String extensionApiDocsLink;
+ /*
+ * Additional api properties.
+ */
+ @JsonProperty(value = "additionalApiProperties", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map additionalApiProperties;
+
+ /** Creates an instance of ExtensionProperties class. */
+ public ExtensionProperties() {
+ }
+
/**
* Get the extensionId property: Extension Id.
*
@@ -85,11 +99,30 @@ public String extensionApiDocsLink() {
return this.extensionApiDocsLink;
}
+ /**
+ * Get the additionalApiProperties property: Additional api properties.
+ *
+ * @return the additionalApiProperties value.
+ */
+ public Map additionalApiProperties() {
+ return this.additionalApiProperties;
+ }
+
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (additionalApiProperties() != null) {
+ additionalApiProperties()
+ .values()
+ .forEach(
+ e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
}
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsExtensionInner.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsExtensionInner.java
index 1a6b25cf16f80..0343f2b9779c8 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsExtensionInner.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsExtensionInner.java
@@ -4,7 +4,7 @@
package com.azure.resourcemanager.agrifood.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.resourcemanager.agrifood.models.DetailedInformation;
@@ -12,7 +12,7 @@
import java.util.List;
/** FarmBeats extension resource. */
-@Fluent
+@Immutable
public final class FarmBeatsExtensionInner extends ProxyResource {
/*
* FarmBeatsExtension properties.
@@ -26,6 +26,10 @@ public final class FarmBeatsExtensionInner extends ProxyResource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /** Creates an instance of FarmBeatsExtensionInner class. */
+ public FarmBeatsExtensionInner() {
+ }
+
/**
* Get the innerProperties property: FarmBeatsExtension properties.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsExtensionProperties.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsExtensionProperties.java
index a5308cfbc52a5..e1827b5022f65 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsExtensionProperties.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsExtensionProperties.java
@@ -75,6 +75,10 @@ public final class FarmBeatsExtensionProperties {
@JsonProperty(value = "detailedInformation", access = JsonProperty.Access.WRITE_ONLY)
private List detailedInformation;
+ /** Creates an instance of FarmBeatsExtensionProperties class. */
+ public FarmBeatsExtensionProperties() {
+ }
+
/**
* Get the targetResourceType property: Target ResourceType of the farmBeatsExtension.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsInner.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsInner.java
index 62c0263d9152c..1717fdec46e41 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsInner.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsInner.java
@@ -6,11 +6,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.agrifood.models.Identity;
import com.azure.resourcemanager.agrifood.models.ProvisioningState;
import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
import com.azure.resourcemanager.agrifood.models.SensorIntegration;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.net.URL;
import java.util.Map;
/** FarmBeats ARM Resource. */
@@ -28,6 +30,16 @@ public final class FarmBeatsInner extends Resource {
@JsonProperty(value = "properties")
private FarmBeatsPropertiesInner innerProperties;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of FarmBeatsInner class. */
+ public FarmBeatsInner() {
+ }
+
/**
* Get the identity property: Identity for the resource.
*
@@ -57,6 +69,15 @@ private FarmBeatsPropertiesInner innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/** {@inheritDoc} */
@Override
public FarmBeatsInner withLocation(String location) {
@@ -76,7 +97,7 @@ public FarmBeatsInner withTags(Map tags) {
*
* @return the instanceUri value.
*/
- public String instanceUri() {
+ public URL instanceUri() {
return this.innerProperties() == null ? null : this.innerProperties().instanceUri();
}
@@ -136,7 +157,7 @@ public FarmBeatsInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkA
}
/**
- * Get the privateEndpointConnections property: The Private Endpoint Connection resource.
+ * Get the privateEndpointConnections property: The private endpoint connection resource.
*
* @return the privateEndpointConnections value.
*/
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsPropertiesInner.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsPropertiesInner.java
index fdb8c06f4a29d..59a86687f01a4 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsPropertiesInner.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/FarmBeatsPropertiesInner.java
@@ -9,6 +9,7 @@
import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
import com.azure.resourcemanager.agrifood.models.SensorIntegration;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.net.URL;
/** FarmBeats ARM Resource properties. */
@Fluent
@@ -17,7 +18,7 @@ public final class FarmBeatsPropertiesInner {
* Uri of the FarmBeats instance.
*/
@JsonProperty(value = "instanceUri", access = JsonProperty.Access.WRITE_ONLY)
- private String instanceUri;
+ private URL instanceUri;
/*
* FarmBeats instance provisioning state.
@@ -38,17 +39,21 @@ public final class FarmBeatsPropertiesInner {
private PublicNetworkAccess publicNetworkAccess;
/*
- * The Private Endpoint Connection resource.
+ * The private endpoint connection resource.
*/
@JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
private PrivateEndpointConnectionInner privateEndpointConnections;
+ /** Creates an instance of FarmBeatsPropertiesInner class. */
+ public FarmBeatsPropertiesInner() {
+ }
+
/**
* Get the instanceUri property: Uri of the FarmBeats instance.
*
* @return the instanceUri value.
*/
- public String instanceUri() {
+ public URL instanceUri() {
return this.instanceUri;
}
@@ -102,7 +107,7 @@ public FarmBeatsPropertiesInner withPublicNetworkAccess(PublicNetworkAccess publ
}
/**
- * Get the privateEndpointConnections property: The Private Endpoint Connection resource.
+ * Get the privateEndpointConnections property: The private endpoint connection resource.
*
* @return the privateEndpointConnections value.
*/
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/OperationInner.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/OperationInner.java
index 2383ed94899ad..4ebd3244c4814 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/OperationInner.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/OperationInner.java
@@ -50,6 +50,10 @@ public final class OperationInner {
@JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
private ActionType actionType;
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
/**
* Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
* "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateEndpointConnectionInner.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateEndpointConnectionInner.java
index 17660c73003e2..8396db6ab5ace 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateEndpointConnectionInner.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateEndpointConnectionInner.java
@@ -11,8 +11,9 @@
import com.azure.resourcemanager.agrifood.models.PrivateEndpointConnectionProvisioningState;
import com.azure.resourcemanager.agrifood.models.PrivateLinkServiceConnectionState;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
-/** The Private Endpoint Connection resource. */
+/** The private endpoint connection resource. */
@Fluent
public final class PrivateEndpointConnectionInner extends ProxyResource {
/*
@@ -27,6 +28,10 @@ public final class PrivateEndpointConnectionInner extends ProxyResource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /** Creates an instance of PrivateEndpointConnectionInner class. */
+ public PrivateEndpointConnectionInner() {
+ }
+
/**
* Get the innerProperties property: Resource properties.
*
@@ -46,7 +51,16 @@ public SystemData systemData() {
}
/**
- * Get the privateEndpoint property: The resource of private end point.
+ * Get the groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupIds();
+ }
+
+ /**
+ * Get the privateEndpoint property: The private endpoint resource.
*
* @return the privateEndpoint value.
*/
@@ -55,7 +69,7 @@ public PrivateEndpoint privateEndpoint() {
}
/**
- * Set the privateEndpoint property: The resource of private end point.
+ * Set the privateEndpoint property: The private endpoint resource.
*
* @param privateEndpoint the privateEndpoint value to set.
* @return the PrivateEndpointConnectionInner object itself.
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateEndpointConnectionProperties.java
index abb5495d87532..5b2cdf3452ae9 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateEndpointConnectionProperties.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateEndpointConnectionProperties.java
@@ -10,12 +10,19 @@
import com.azure.resourcemanager.agrifood.models.PrivateEndpointConnectionProvisioningState;
import com.azure.resourcemanager.agrifood.models.PrivateLinkServiceConnectionState;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
-/** Properties of the PrivateEndpointConnectProperties. */
+/** Properties of the private endpoint connection. */
@Fluent
public final class PrivateEndpointConnectionProperties {
/*
- * The resource of private end point.
+ * The group ids for the private endpoint resource.
+ */
+ @JsonProperty(value = "groupIds", access = JsonProperty.Access.WRITE_ONLY)
+ private List groupIds;
+
+ /*
+ * The private endpoint resource.
*/
@JsonProperty(value = "privateEndpoint")
private PrivateEndpoint privateEndpoint;
@@ -32,8 +39,21 @@ public final class PrivateEndpointConnectionProperties {
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private PrivateEndpointConnectionProvisioningState provisioningState;
+ /** Creates an instance of PrivateEndpointConnectionProperties class. */
+ public PrivateEndpointConnectionProperties() {
+ }
+
+ /**
+ * Get the groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.groupIds;
+ }
+
/**
- * Get the privateEndpoint property: The resource of private end point.
+ * Get the privateEndpoint property: The private endpoint resource.
*
* @return the privateEndpoint value.
*/
@@ -42,7 +62,7 @@ public PrivateEndpoint privateEndpoint() {
}
/**
- * Set the privateEndpoint property: The resource of private end point.
+ * Set the privateEndpoint property: The private endpoint resource.
*
* @param privateEndpoint the privateEndpoint value to set.
* @return the PrivateEndpointConnectionProperties object itself.
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateLinkResourceInner.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateLinkResourceInner.java
index 78e2775fe9bd6..85f8c4f682df6 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateLinkResourceInner.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateLinkResourceInner.java
@@ -25,6 +25,10 @@ public final class PrivateLinkResourceInner extends ProxyResource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /** Creates an instance of PrivateLinkResourceInner class. */
+ public PrivateLinkResourceInner() {
+ }
+
/**
* Get the innerProperties property: Resource properties.
*
@@ -62,7 +66,7 @@ public List requiredMembers() {
}
/**
- * Get the requiredZoneNames property: The private link resource Private link DNS zone name.
+ * Get the requiredZoneNames property: The private link resource private link DNS zone name.
*
* @return the requiredZoneNames value.
*/
@@ -71,7 +75,7 @@ public List requiredZoneNames() {
}
/**
- * Set the requiredZoneNames property: The private link resource Private link DNS zone name.
+ * Set the requiredZoneNames property: The private link resource private link DNS zone name.
*
* @param requiredZoneNames the requiredZoneNames value to set.
* @return the PrivateLinkResourceInner object itself.
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateLinkResourceProperties.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateLinkResourceProperties.java
index 471b216902dd4..2651bd087b738 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateLinkResourceProperties.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/fluent/models/PrivateLinkResourceProperties.java
@@ -24,11 +24,15 @@ public final class PrivateLinkResourceProperties {
private List requiredMembers;
/*
- * The private link resource Private link DNS zone name.
+ * The private link resource private link DNS zone name.
*/
@JsonProperty(value = "requiredZoneNames")
private List requiredZoneNames;
+ /** Creates an instance of PrivateLinkResourceProperties class. */
+ public PrivateLinkResourceProperties() {
+ }
+
/**
* Get the groupId property: The private link resource group id.
*
@@ -48,7 +52,7 @@ public List requiredMembers() {
}
/**
- * Get the requiredZoneNames property: The private link resource Private link DNS zone name.
+ * Get the requiredZoneNames property: The private link resource private link DNS zone name.
*
* @return the requiredZoneNames value.
*/
@@ -57,7 +61,7 @@ public List requiredZoneNames() {
}
/**
- * Set the requiredZoneNames property: The private link resource Private link DNS zone name.
+ * Set the requiredZoneNames property: The private link resource private link DNS zone name.
*
* @param requiredZoneNames the requiredZoneNames value to set.
* @return the PrivateLinkResourceProperties object itself.
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/AgriFoodManagementClientBuilder.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/AgriFoodManagementClientBuilder.java
index 5588d38232fda..59662e0a163ee 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/AgriFoodManagementClientBuilder.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/AgriFoodManagementClientBuilder.java
@@ -13,22 +13,23 @@
import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerAdapter;
import java.time.Duration;
+import java.util.UUID;
/** A builder for creating a new instance of the AgriFoodManagementClientImpl type. */
@ServiceClientBuilder(serviceClients = {AgriFoodManagementClientImpl.class})
public final class AgriFoodManagementClientBuilder {
/*
- * The ID of the target subscription.
+ * The ID of the target subscription. The value must be an UUID.
*/
- private String subscriptionId;
+ private UUID subscriptionId;
/**
- * Sets The ID of the target subscription.
+ * Sets The ID of the target subscription. The value must be an UUID.
*
* @param subscriptionId the subscriptionId value.
* @return the AgriFoodManagementClientBuilder.
*/
- public AgriFoodManagementClientBuilder subscriptionId(String subscriptionId) {
+ public AgriFoodManagementClientBuilder subscriptionId(UUID subscriptionId) {
this.subscriptionId = subscriptionId;
return this;
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/AgriFoodManagementClientImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/AgriFoodManagementClientImpl.java
index f88545b443c4b..61f16abe0d095 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/AgriFoodManagementClientImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/AgriFoodManagementClientImpl.java
@@ -36,21 +36,22 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
+import java.util.UUID;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the AgriFoodManagementClientImpl type. */
@ServiceClient(builder = AgriFoodManagementClientBuilder.class)
public final class AgriFoodManagementClientImpl implements AgriFoodManagementClient {
- /** The ID of the target subscription. */
- private final String subscriptionId;
+ /** The ID of the target subscription. The value must be an UUID. */
+ private final UUID subscriptionId;
/**
- * Gets The ID of the target subscription.
+ * Gets The ID of the target subscription. The value must be an UUID.
*
* @return the subscriptionId value.
*/
- public String getSubscriptionId() {
+ public UUID getSubscriptionId() {
return this.subscriptionId;
}
@@ -205,7 +206,7 @@ public PrivateLinkResourcesClient getPrivateLinkResources() {
* @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 subscriptionId The ID of the target subscription.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
* @param endpoint server parameter.
*/
AgriFoodManagementClientImpl(
@@ -213,7 +214,7 @@ public PrivateLinkResourcesClient getPrivateLinkResources() {
SerializerAdapter serializerAdapter,
Duration defaultPollInterval,
AzureEnvironment environment,
- String subscriptionId,
+ UUID subscriptionId,
String endpoint) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionImpl.java
index 1c28f880aa3a4..27c6143ada989 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionImpl.java
@@ -4,19 +4,20 @@
package com.azure.resourcemanager.agrifood.implementation;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
import com.azure.resourcemanager.agrifood.fluent.models.ExtensionInner;
+import com.azure.resourcemanager.agrifood.models.ApiProperties;
import com.azure.resourcemanager.agrifood.models.Extension;
+import com.azure.resourcemanager.agrifood.models.ExtensionInstallationRequest;
+import java.util.Collections;
+import java.util.Map;
-public final class ExtensionImpl implements Extension {
+public final class ExtensionImpl implements Extension, Extension.Definition, Extension.Update {
private ExtensionInner innerObject;
private final com.azure.resourcemanager.agrifood.AgriFoodManager serviceManager;
- ExtensionImpl(ExtensionInner innerObject, com.azure.resourcemanager.agrifood.AgriFoodManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
public String id() {
return this.innerModel().id();
}
@@ -33,6 +34,10 @@ public String etag() {
return this.innerModel().etag();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String extensionId() {
return this.innerModel().extensionId();
}
@@ -53,6 +58,19 @@ public String extensionApiDocsLink() {
return this.innerModel().extensionApiDocsLink();
}
+ public Map additionalApiProperties() {
+ Map inner = this.innerModel().additionalApiProperties();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public ExtensionInner innerModel() {
return this.innerObject;
}
@@ -60,4 +78,128 @@ public ExtensionInner innerModel() {
private com.azure.resourcemanager.agrifood.AgriFoodManager manager() {
return this.serviceManager;
}
+
+ private String resourceGroupName;
+
+ private String farmBeatsResourceName;
+
+ private String extensionId;
+
+ private ExtensionInstallationRequest createRequestBody;
+
+ private ExtensionInstallationRequest updateRequestBody;
+
+ public ExtensionImpl withExistingFarmBeat(String resourceGroupName, String farmBeatsResourceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.farmBeatsResourceName = farmBeatsResourceName;
+ return this;
+ }
+
+ public Extension create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .createOrUpdateWithResponse(
+ resourceGroupName, farmBeatsResourceName, extensionId, createRequestBody, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Extension create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .createOrUpdateWithResponse(
+ resourceGroupName, farmBeatsResourceName, extensionId, createRequestBody, context)
+ .getValue();
+ return this;
+ }
+
+ ExtensionImpl(String name, com.azure.resourcemanager.agrifood.AgriFoodManager serviceManager) {
+ this.innerObject = new ExtensionInner();
+ this.serviceManager = serviceManager;
+ this.extensionId = name;
+ this.createRequestBody = new ExtensionInstallationRequest();
+ }
+
+ public ExtensionImpl update() {
+ this.updateRequestBody = new ExtensionInstallationRequest();
+ return this;
+ }
+
+ public Extension apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .createOrUpdateWithResponse(
+ resourceGroupName, farmBeatsResourceName, extensionId, updateRequestBody, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Extension apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .createOrUpdateWithResponse(
+ resourceGroupName, farmBeatsResourceName, extensionId, updateRequestBody, context)
+ .getValue();
+ return this;
+ }
+
+ ExtensionImpl(ExtensionInner innerObject, com.azure.resourcemanager.agrifood.AgriFoodManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.farmBeatsResourceName = Utils.getValueFromIdByName(innerObject.id(), "farmBeats");
+ this.extensionId = Utils.getValueFromIdByName(innerObject.id(), "extensions");
+ }
+
+ public Extension refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .getWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Extension refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .getWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, context)
+ .getValue();
+ return this;
+ }
+
+ public ExtensionImpl withExtensionVersion(String extensionVersion) {
+ if (isInCreateMode()) {
+ this.createRequestBody.withExtensionVersion(extensionVersion);
+ return this;
+ } else {
+ this.updateRequestBody.withExtensionVersion(extensionVersion);
+ return this;
+ }
+ }
+
+ public ExtensionImpl withAdditionalApiProperties(Map additionalApiProperties) {
+ if (isInCreateMode()) {
+ this.createRequestBody.withAdditionalApiProperties(additionalApiProperties);
+ return this;
+ } else {
+ this.updateRequestBody.withAdditionalApiProperties(additionalApiProperties);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionsClientImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionsClientImpl.java
index dc71a237cff03..701f5108dca75 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionsClientImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionsClientImpl.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.agrifood.implementation;
+import com.azure.core.annotation.BodyParam;
import com.azure.core.annotation.Delete;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
@@ -11,7 +12,6 @@
import com.azure.core.annotation.Headers;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.Patch;
import com.azure.core.annotation.PathParam;
import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
@@ -30,10 +30,12 @@
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.agrifood.fluent.ExtensionsClient;
import com.azure.resourcemanager.agrifood.fluent.models.ExtensionInner;
+import com.azure.resourcemanager.agrifood.models.ExtensionInstallationRequest;
import com.azure.resourcemanager.agrifood.models.ExtensionListResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.UUID;
import java.util.stream.Collectors;
import reactor.core.publisher.Mono;
@@ -62,20 +64,21 @@ public final class ExtensionsClientImpl implements ExtensionsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "AgriFoodManagementCl")
- private interface ExtensionsService {
+ public interface ExtensionsService {
@Headers({"Content-Type: application/json"})
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform"
+ "/farmBeats/{farmBeatsResourceName}/extensions/{extensionId}")
- @ExpectedResponses({201})
+ @ExpectedResponses({200, 201})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> create(
+ Mono> createOrUpdate(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@PathParam("extensionId") String extensionId,
@QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ExtensionInstallationRequest requestBody,
@HeaderParam("Accept") String accept,
Context context);
@@ -87,23 +90,7 @@ Mono> create(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("farmBeatsResourceName") String farmBeatsResourceName,
- @PathParam("extensionId") String extensionId,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Patch(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform"
- + "/farmBeats/{farmBeatsResourceName}/extensions/{extensionId}")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
- @HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@PathParam("extensionId") String extensionId,
@@ -119,7 +106,7 @@ Mono> update(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> delete(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@PathParam("extensionId") String extensionId,
@@ -135,7 +122,7 @@ Mono> delete(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByFarmBeats(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@QueryParam("api-version") String apiVersion,
@@ -158,19 +145,24 @@ Mono> listByFarmBeatsNext(
}
/**
- * Install extension.
+ * Install or Update extension. AdditionalApiProperties are merged patch and if the extension is updated to a new
+ * version then the obsolete entries will be auto deleted from AdditionalApiProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
+ * @param requestBody Extension resource request body.
* @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 extension resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createWithResponseAsync(
- String resourceGroupName, String farmBeatsResourceName, String extensionId) {
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String farmBeatsResourceName,
+ String extensionId,
+ ExtensionInstallationRequest requestBody) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -194,29 +186,35 @@ private Mono> createWithResponseAsync(
if (extensionId == null) {
return Mono.error(new IllegalArgumentException("Parameter extensionId is required and cannot be null."));
}
+ if (requestBody != null) {
+ requestBody.validate();
+ }
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .create(
+ .createOrUpdate(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
resourceGroupName,
farmBeatsResourceName,
extensionId,
this.client.getApiVersion(),
+ requestBody,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Install extension.
+ * Install or Update extension. AdditionalApiProperties are merged patch and if the extension is updated to a new
+ * version then the obsolete entries will be auto deleted from AdditionalApiProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
+ * @param requestBody Extension resource request body.
* @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.
@@ -224,8 +222,12 @@ private Mono> createWithResponseAsync(
* @return extension resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createWithResponseAsync(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context) {
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String farmBeatsResourceName,
+ String extensionId,
+ ExtensionInstallationRequest requestBody,
+ Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -249,22 +251,27 @@ private Mono> createWithResponseAsync(
if (extensionId == null) {
return Mono.error(new IllegalArgumentException("Parameter extensionId is required and cannot be null."));
}
+ if (requestBody != null) {
+ requestBody.validate();
+ }
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .create(
+ .createOrUpdate(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
resourceGroupName,
farmBeatsResourceName,
extensionId,
this.client.getApiVersion(),
+ requestBody,
accept,
context);
}
/**
- * Install extension.
+ * Install or Update extension. AdditionalApiProperties are merged patch and if the extension is updated to a new
+ * version then the obsolete entries will be auto deleted from AdditionalApiProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
@@ -275,44 +282,57 @@ private Mono> createWithResponseAsync(
* @return extension resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(
+ private Mono createOrUpdateAsync(
String resourceGroupName, String farmBeatsResourceName, String extensionId) {
- return createWithResponseAsync(resourceGroupName, farmBeatsResourceName, extensionId)
+ final ExtensionInstallationRequest requestBody = null;
+ return createOrUpdateWithResponseAsync(resourceGroupName, farmBeatsResourceName, extensionId, requestBody)
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Install extension.
+ * Install or Update extension. AdditionalApiProperties are merged patch and if the extension is updated to a new
+ * version then the obsolete entries will be auto deleted from AdditionalApiProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
+ * @param requestBody Extension resource request body.
+ * @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 extension resource.
+ * @return extension resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ExtensionInner create(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
- return createAsync(resourceGroupName, farmBeatsResourceName, extensionId).block();
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String farmBeatsResourceName,
+ String extensionId,
+ ExtensionInstallationRequest requestBody,
+ Context context) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName, farmBeatsResourceName, extensionId, requestBody, context)
+ .block();
}
/**
- * Install extension.
+ * Install or Update extension. AdditionalApiProperties are merged patch and if the extension is updated to a new
+ * version then the obsolete entries will be auto deleted from AdditionalApiProperties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
- * @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 extension resource along with {@link Response}.
+ * @return extension resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context) {
- return createWithResponseAsync(resourceGroupName, farmBeatsResourceName, extensionId, context).block();
+ public ExtensionInner createOrUpdate(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
+ final ExtensionInstallationRequest requestBody = null;
+ return createOrUpdateWithResponse(
+ resourceGroupName, farmBeatsResourceName, extensionId, requestBody, Context.NONE)
+ .getValue();
}
/**
@@ -440,22 +460,6 @@ private Mono getAsync(String resourceGroupName, String farmBeats
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Get installed extension details by extension id.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
- * @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 installed extension details by extension id.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ExtensionInner get(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
- return getAsync(resourceGroupName, farmBeatsResourceName, extensionId).block();
- }
-
/**
* Get installed extension details by extension id.
*
@@ -475,161 +479,19 @@ public Response getWithResponse(
}
/**
- * Upgrade to latest extension.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
- * @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 extension resource along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
- String resourceGroupName, String farmBeatsResourceName, String extensionId) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (farmBeatsResourceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter farmBeatsResourceName is required and cannot be null."));
- }
- if (extensionId == null) {
- return Mono.error(new IllegalArgumentException("Parameter extensionId is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .update(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- farmBeatsResourceName,
- extensionId,
- this.client.getApiVersion(),
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Upgrade to latest extension.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
- * @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 extension resource along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (farmBeatsResourceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter farmBeatsResourceName is required and cannot be null."));
- }
- if (extensionId == null) {
- return Mono.error(new IllegalArgumentException("Parameter extensionId is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .update(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- farmBeatsResourceName,
- extensionId,
- this.client.getApiVersion(),
- accept,
- context);
- }
-
- /**
- * Upgrade to latest extension.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
- * @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 extension resource on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(
- String resourceGroupName, String farmBeatsResourceName, String extensionId) {
- return updateWithResponseAsync(resourceGroupName, farmBeatsResourceName, extensionId)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Upgrade to latest extension.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
- * @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 extension resource.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ExtensionInner update(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
- return updateAsync(resourceGroupName, farmBeatsResourceName, extensionId).block();
- }
-
- /**
- * Upgrade to latest extension.
+ * Get installed extension details by extension id.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
- * @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 extension resource along with {@link Response}.
+ * @return installed extension details by extension id.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context) {
- return updateWithResponseAsync(resourceGroupName, farmBeatsResourceName, extensionId, context).block();
+ public ExtensionInner get(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
+ return getWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, Context.NONE).getValue();
}
/**
@@ -761,13 +623,16 @@ private Mono deleteAsync(String resourceGroupName, String farmBeatsResourc
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
+ * @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 {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
- deleteAsync(resourceGroupName, farmBeatsResourceName, extensionId).block();
+ public Response deleteWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, farmBeatsResourceName, extensionId, context).block();
}
/**
@@ -776,16 +641,13 @@ public void delete(String resourceGroupName, String farmBeatsResourceName, Strin
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
- * @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 {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context) {
- return deleteWithResponseAsync(resourceGroupName, farmBeatsResourceName, extensionId, context).block();
+ public void delete(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
+ deleteWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, Context.NONE);
}
/**
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionsImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionsImpl.java
index 4632d5ee09aee..0205cc35eeb05 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionsImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/ExtensionsImpl.java
@@ -28,39 +28,6 @@ public ExtensionsImpl(
this.serviceManager = serviceManager;
}
- public Extension create(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
- ExtensionInner inner = this.serviceClient().create(resourceGroupName, farmBeatsResourceName, extensionId);
- if (inner != null) {
- return new ExtensionImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public Response createWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context) {
- Response inner =
- this.serviceClient().createWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new ExtensionImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public Extension get(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
- ExtensionInner inner = this.serviceClient().get(resourceGroupName, farmBeatsResourceName, extensionId);
- if (inner != null) {
- return new ExtensionImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(
String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context) {
Response inner =
@@ -76,8 +43,8 @@ public Response getWithResponse(
}
}
- public Extension update(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
- ExtensionInner inner = this.serviceClient().update(resourceGroupName, farmBeatsResourceName, extensionId);
+ public Extension get(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
+ ExtensionInner inner = this.serviceClient().get(resourceGroupName, farmBeatsResourceName, extensionId);
if (inner != null) {
return new ExtensionImpl(inner, this.manager());
} else {
@@ -85,30 +52,15 @@ public Extension update(String resourceGroupName, String farmBeatsResourceName,
}
}
- public Response updateWithResponse(
+ public Response deleteWithResponse(
String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context) {
- Response inner =
- this.serviceClient().updateWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new ExtensionImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return this.serviceClient().deleteWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, context);
}
public void delete(String resourceGroupName, String farmBeatsResourceName, String extensionId) {
this.serviceClient().delete(resourceGroupName, farmBeatsResourceName, extensionId);
}
- public Response deleteWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context) {
- return this.serviceClient().deleteWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, context);
- }
-
public PagedIterable listByFarmBeats(String resourceGroupName, String farmBeatsResourceName) {
PagedIterable inner =
this.serviceClient().listByFarmBeats(resourceGroupName, farmBeatsResourceName);
@@ -137,6 +89,110 @@ public PagedIterable listByFarmBeats(
return Utils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager()));
}
+ public Extension getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String farmBeatsResourceName = Utils.getValueFromIdByName(id, "farmBeats");
+ if (farmBeatsResourceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'farmBeats'.", id)));
+ }
+ String extensionId = Utils.getValueFromIdByName(id, "extensions");
+ if (extensionId == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String farmBeatsResourceName = Utils.getValueFromIdByName(id, "farmBeats");
+ if (farmBeatsResourceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'farmBeats'.", id)));
+ }
+ String extensionId = Utils.getValueFromIdByName(id, "extensions");
+ if (extensionId == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String farmBeatsResourceName = Utils.getValueFromIdByName(id, "farmBeats");
+ if (farmBeatsResourceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'farmBeats'.", id)));
+ }
+ String extensionId = Utils.getValueFromIdByName(id, "extensions");
+ if (extensionId == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String farmBeatsResourceName = Utils.getValueFromIdByName(id, "farmBeats");
+ if (farmBeatsResourceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'farmBeats'.", id)));
+ }
+ String extensionId = Utils.getValueFromIdByName(id, "extensions");
+ if (extensionId == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, farmBeatsResourceName, extensionId, context);
+ }
+
private ExtensionsClient serviceClient() {
return this.innerClient;
}
@@ -144,4 +200,8 @@ private ExtensionsClient serviceClient() {
private com.azure.resourcemanager.agrifood.AgriFoodManager manager() {
return this.serviceManager;
}
+
+ public ExtensionImpl define(String name) {
+ return new ExtensionImpl(name, this.manager());
+ }
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsExtensionsClientImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsExtensionsClientImpl.java
index 7f57404c03415..c3361df326730 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsExtensionsClientImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsExtensionsClientImpl.java
@@ -59,7 +59,7 @@ public final class FarmBeatsExtensionsClientImpl implements FarmBeatsExtensionsC
*/
@Host("{$host}")
@ServiceInterface(name = "AgriFoodManagementCl")
- private interface FarmBeatsExtensionsService {
+ public interface FarmBeatsExtensionsService {
@Headers({"Content-Type: application/json"})
@Get("/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions")
@ExpectedResponses({200})
@@ -448,29 +448,29 @@ private Mono getAsync(String farmBeatsExtensionId) {
* Get farmBeats extension.
*
* @param farmBeatsExtensionId farmBeatsExtensionId to be queried.
+ * @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 farmBeats extension.
+ * @return farmBeats extension along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public FarmBeatsExtensionInner get(String farmBeatsExtensionId) {
- return getAsync(farmBeatsExtensionId).block();
+ public Response getWithResponse(String farmBeatsExtensionId, Context context) {
+ return getWithResponseAsync(farmBeatsExtensionId, context).block();
}
/**
* Get farmBeats extension.
*
* @param farmBeatsExtensionId farmBeatsExtensionId to be queried.
- * @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 farmBeats extension along with {@link Response}.
+ * @return farmBeats extension.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String farmBeatsExtensionId, Context context) {
- return getWithResponseAsync(farmBeatsExtensionId, context).block();
+ public FarmBeatsExtensionInner get(String farmBeatsExtensionId) {
+ return getWithResponse(farmBeatsExtensionId, Context.NONE).getValue();
}
/**
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsExtensionsImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsExtensionsImpl.java
index 0f5b98b443bd6..bf31bee45d618 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsExtensionsImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsExtensionsImpl.java
@@ -53,15 +53,6 @@ public PagedIterable list(
return Utils.mapPage(inner, inner1 -> new FarmBeatsExtensionImpl(inner1, this.manager()));
}
- public FarmBeatsExtension get(String farmBeatsExtensionId) {
- FarmBeatsExtensionInner inner = this.serviceClient().get(farmBeatsExtensionId);
- if (inner != null) {
- return new FarmBeatsExtensionImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(String farmBeatsExtensionId, Context context) {
Response inner = this.serviceClient().getWithResponse(farmBeatsExtensionId, context);
if (inner != null) {
@@ -75,6 +66,15 @@ public Response getWithResponse(String farmBeatsExtensionId,
}
}
+ public FarmBeatsExtension get(String farmBeatsExtensionId) {
+ FarmBeatsExtensionInner inner = this.serviceClient().get(farmBeatsExtensionId);
+ if (inner != null) {
+ return new FarmBeatsExtensionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private FarmBeatsExtensionsClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsImpl.java
index 065faced5d758..f094a87e61924 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsImpl.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.agrifood.implementation;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.agrifood.fluent.models.FarmBeatsInner;
import com.azure.resourcemanager.agrifood.fluent.models.PrivateEndpointConnectionInner;
@@ -16,6 +17,7 @@
import com.azure.resourcemanager.agrifood.models.ProvisioningState;
import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
import com.azure.resourcemanager.agrifood.models.SensorIntegration;
+import java.net.URL;
import java.util.Collections;
import java.util.Map;
@@ -53,7 +55,11 @@ public Identity identity() {
return this.innerModel().identity();
}
- public String instanceUri() {
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public URL instanceUri() {
return this.innerModel().instanceUri();
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsModelsClientImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsModelsClientImpl.java
index 06ff014400f42..0a1fcc5605999 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsModelsClientImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsModelsClientImpl.java
@@ -38,6 +38,7 @@
import com.azure.resourcemanager.agrifood.models.FarmBeatsListResponse;
import com.azure.resourcemanager.agrifood.models.FarmBeatsUpdateRequestModel;
import java.nio.ByteBuffer;
+import java.util.UUID;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -66,7 +67,7 @@ public final class FarmBeatsModelsClientImpl implements FarmBeatsModelsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "AgriFoodManagementCl")
- private interface FarmBeatsModelsService {
+ public interface FarmBeatsModelsService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform"
@@ -75,7 +76,7 @@ private interface FarmBeatsModelsService {
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getByResourceGroup(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@QueryParam("api-version") String apiVersion,
@@ -90,7 +91,7 @@ Mono> getByResourceGroup(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> createOrUpdate(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@QueryParam("api-version") String apiVersion,
@@ -106,7 +107,7 @@ Mono> createOrUpdate(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> update(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@QueryParam("api-version") String apiVersion,
@@ -122,7 +123,7 @@ Mono>> update(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> delete(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@QueryParam("api-version") String apiVersion,
@@ -137,7 +138,7 @@ Mono> list(
@HostParam("$host") String endpoint,
@QueryParam("$maxPageSize") Integer maxPageSize,
@QueryParam("$skipToken") String skipToken,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@QueryParam("api-version") String apiVersion,
@HeaderParam("Accept") String accept,
Context context);
@@ -153,7 +154,7 @@ Mono> listByResourceGroup(
@QueryParam("$maxPageSize") Integer maxPageSize,
@QueryParam("$skipToken") String skipToken,
@PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@QueryParam("api-version") String apiVersion,
@HeaderParam("Accept") String accept,
Context context);
@@ -166,7 +167,7 @@ Mono> listByResourceGroup(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getOperationResult(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@QueryParam("api-version") String apiVersion,
@@ -312,14 +313,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
+ * @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 farmBeats resource.
+ * @return farmBeats resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public FarmBeatsInner getByResourceGroup(String resourceGroupName, String farmBeatsResourceName) {
- return getByResourceGroupAsync(resourceGroupName, farmBeatsResourceName).block();
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, farmBeatsResourceName, context).block();
}
/**
@@ -327,16 +330,14 @@ public FarmBeatsInner getByResourceGroup(String resourceGroupName, String farmBe
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
- * @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 farmBeats resource along with {@link Response}.
+ * @return farmBeats resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String farmBeatsResourceName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, farmBeatsResourceName, context).block();
+ public FarmBeatsInner getByResourceGroup(String resourceGroupName, String farmBeatsResourceName) {
+ return getByResourceGroupWithResponse(resourceGroupName, farmBeatsResourceName, Context.NONE).getValue();
}
/**
@@ -473,14 +474,16 @@ private Mono createOrUpdateAsync(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param body FarmBeats resource create or update request object.
+ * @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 farmBeats ARM Resource.
+ * @return farmBeats ARM Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public FarmBeatsInner createOrUpdate(String resourceGroupName, String farmBeatsResourceName, FarmBeatsInner body) {
- return createOrUpdateAsync(resourceGroupName, farmBeatsResourceName, body).block();
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, FarmBeatsInner body, Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, farmBeatsResourceName, body, context).block();
}
/**
@@ -489,16 +492,14 @@ public FarmBeatsInner createOrUpdate(String resourceGroupName, String farmBeatsR
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param body FarmBeats resource create or update request object.
- * @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 farmBeats ARM Resource along with {@link Response}.
+ * @return farmBeats ARM Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateWithResponse(
- String resourceGroupName, String farmBeatsResourceName, FarmBeatsInner body, Context context) {
- return createOrUpdateWithResponseAsync(resourceGroupName, farmBeatsResourceName, body, context).block();
+ public FarmBeatsInner createOrUpdate(String resourceGroupName, String farmBeatsResourceName, FarmBeatsInner body) {
+ return createOrUpdateWithResponse(resourceGroupName, farmBeatsResourceName, body, Context.NONE).getValue();
}
/**
@@ -884,13 +885,15 @@ private Mono deleteAsync(String resourceGroupName, String farmBeatsResourc
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
+ * @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 {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String farmBeatsResourceName) {
- deleteAsync(resourceGroupName, farmBeatsResourceName).block();
+ public Response deleteWithResponse(String resourceGroupName, String farmBeatsResourceName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, farmBeatsResourceName, context).block();
}
/**
@@ -898,15 +901,13 @@ public void delete(String resourceGroupName, String farmBeatsResourceName) {
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
- * @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 {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteWithResponse(String resourceGroupName, String farmBeatsResourceName, Context context) {
- return deleteWithResponseAsync(resourceGroupName, farmBeatsResourceName, context).block();
+ public void delete(String resourceGroupName, String farmBeatsResourceName) {
+ deleteWithResponse(resourceGroupName, farmBeatsResourceName, Context.NONE);
}
/**
@@ -1436,15 +1437,18 @@ private Mono getOperationResultAsync(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param operationResultsId The operation results id.
+ * @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 operationResults for a FarmBeats resource.
+ * @return operationResults for a FarmBeats resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ArmAsyncOperationInner getOperationResult(
- String resourceGroupName, String farmBeatsResourceName, String operationResultsId) {
- return getOperationResultAsync(resourceGroupName, farmBeatsResourceName, operationResultsId).block();
+ public Response getOperationResultWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String operationResultsId, Context context) {
+ return getOperationResultWithResponseAsync(
+ resourceGroupName, farmBeatsResourceName, operationResultsId, context)
+ .block();
}
/**
@@ -1453,18 +1457,17 @@ public ArmAsyncOperationInner getOperationResult(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param operationResultsId The operation results id.
- * @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 operationResults for a FarmBeats resource along with {@link Response}.
+ * @return operationResults for a FarmBeats resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getOperationResultWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String operationResultsId, Context context) {
- return getOperationResultWithResponseAsync(
- resourceGroupName, farmBeatsResourceName, operationResultsId, context)
- .block();
+ public ArmAsyncOperationInner getOperationResult(
+ String resourceGroupName, String farmBeatsResourceName, String operationResultsId) {
+ return getOperationResultWithResponse(
+ resourceGroupName, farmBeatsResourceName, operationResultsId, Context.NONE)
+ .getValue();
}
/**
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsModelsImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsModelsImpl.java
index 1738557827c26..d861526c03629 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsModelsImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsModelsImpl.java
@@ -29,15 +29,6 @@ public FarmBeatsModelsImpl(
this.serviceManager = serviceManager;
}
- public FarmBeats getByResourceGroup(String resourceGroupName, String farmBeatsResourceName) {
- FarmBeatsInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, farmBeatsResourceName);
- if (inner != null) {
- return new FarmBeatsImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getByResourceGroupWithResponse(
String resourceGroupName, String farmBeatsResourceName, Context context) {
Response inner =
@@ -53,14 +44,24 @@ public Response getByResourceGroupWithResponse(
}
}
- public void deleteByResourceGroup(String resourceGroupName, String farmBeatsResourceName) {
- this.serviceClient().delete(resourceGroupName, farmBeatsResourceName);
+ public FarmBeats getByResourceGroup(String resourceGroupName, String farmBeatsResourceName) {
+ FarmBeatsInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, farmBeatsResourceName);
+ if (inner != null) {
+ return new FarmBeatsImpl(inner, this.manager());
+ } else {
+ return null;
+ }
}
- public Response deleteWithResponse(String resourceGroupName, String farmBeatsResourceName, Context context) {
+ public Response deleteByResourceGroupWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, Context context) {
return this.serviceClient().deleteWithResponse(resourceGroupName, farmBeatsResourceName, context);
}
+ public void deleteByResourceGroup(String resourceGroupName, String farmBeatsResourceName) {
+ this.serviceClient().delete(resourceGroupName, farmBeatsResourceName);
+ }
+
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
return Utils.mapPage(inner, inner1 -> new FarmBeatsImpl(inner1, this.manager()));
@@ -83,17 +84,6 @@ public PagedIterable listByResourceGroup(
return Utils.mapPage(inner, inner1 -> new FarmBeatsImpl(inner1, this.manager()));
}
- public ArmAsyncOperation getOperationResult(
- String resourceGroupName, String farmBeatsResourceName, String operationResultsId) {
- ArmAsyncOperationInner inner =
- this.serviceClient().getOperationResult(resourceGroupName, farmBeatsResourceName, operationResultsId);
- if (inner != null) {
- return new ArmAsyncOperationImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getOperationResultWithResponse(
String resourceGroupName, String farmBeatsResourceName, String operationResultsId, Context context) {
Response inner =
@@ -111,6 +101,17 @@ public Response getOperationResultWithResponse(
}
}
+ public ArmAsyncOperation getOperationResult(
+ String resourceGroupName, String farmBeatsResourceName, String operationResultsId) {
+ ArmAsyncOperationInner inner =
+ this.serviceClient().getOperationResult(resourceGroupName, farmBeatsResourceName, operationResultsId);
+ if (inner != null) {
+ return new ArmAsyncOperationImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public FarmBeats getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
@@ -165,7 +166,7 @@ public void deleteById(String id) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'farmBeats'.", id)));
}
- this.deleteWithResponse(resourceGroupName, farmBeatsResourceName, Context.NONE);
+ this.deleteByResourceGroupWithResponse(resourceGroupName, farmBeatsResourceName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
@@ -184,7 +185,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'farmBeats'.", id)));
}
- return this.deleteWithResponse(resourceGroupName, farmBeatsResourceName, context);
+ return this.deleteByResourceGroupWithResponse(resourceGroupName, farmBeatsResourceName, context);
}
private FarmBeatsModelsClient serviceClient() {
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsPropertiesImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsPropertiesImpl.java
index 3d556cf051ee1..8188553269daa 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsPropertiesImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/FarmBeatsPropertiesImpl.java
@@ -11,6 +11,7 @@
import com.azure.resourcemanager.agrifood.models.ProvisioningState;
import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
import com.azure.resourcemanager.agrifood.models.SensorIntegration;
+import java.net.URL;
public final class FarmBeatsPropertiesImpl implements FarmBeatsProperties {
private FarmBeatsPropertiesInner innerObject;
@@ -23,7 +24,7 @@ public final class FarmBeatsPropertiesImpl implements FarmBeatsProperties {
this.serviceManager = serviceManager;
}
- public String instanceUri() {
+ public URL instanceUri() {
return this.innerModel().instanceUri();
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/LocationsClientImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/LocationsClientImpl.java
index f4e64389a9216..bc9ab237e79c5 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/LocationsClientImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/LocationsClientImpl.java
@@ -25,6 +25,7 @@
import com.azure.resourcemanager.agrifood.fluent.LocationsClient;
import com.azure.resourcemanager.agrifood.fluent.models.CheckNameAvailabilityResponseInner;
import com.azure.resourcemanager.agrifood.models.CheckNameAvailabilityRequest;
+import java.util.UUID;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in LocationsClient. */
@@ -52,14 +53,14 @@ public final class LocationsClientImpl implements LocationsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "AgriFoodManagementCl")
- private interface LocationsService {
+ public interface LocationsService {
@Headers({"Content-Type: application/json"})
@Post("/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/checkNameAvailability")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> checkNameAvailability(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@QueryParam("api-version") String apiVersion,
@BodyParam("application/json") CheckNameAvailabilityRequest body,
@HeaderParam("Accept") String accept,
@@ -170,29 +171,29 @@ private Mono checkNameAvailabilityAsync(Chec
* Checks the name availability of the resource with requested resource name.
*
* @param body NameAvailabilityRequest object.
+ * @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 check availability result.
+ * @return the check availability result along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body) {
- return checkNameAvailabilityAsync(body).block();
+ public Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityRequest body, Context context) {
+ return checkNameAvailabilityWithResponseAsync(body, context).block();
}
/**
* Checks the name availability of the resource with requested resource name.
*
* @param body NameAvailabilityRequest object.
- * @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 check availability result along with {@link Response}.
+ * @return the check availability result.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response checkNameAvailabilityWithResponse(
- CheckNameAvailabilityRequest body, Context context) {
- return checkNameAvailabilityWithResponseAsync(body, context).block();
+ public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body) {
+ return checkNameAvailabilityWithResponse(body, Context.NONE).getValue();
}
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/LocationsImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/LocationsImpl.java
index 938d5ee985c16..a98060a81bf3a 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/LocationsImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/LocationsImpl.java
@@ -27,15 +27,6 @@ public LocationsImpl(
this.serviceManager = serviceManager;
}
- public CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body) {
- CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(body);
- if (inner != null) {
- return new CheckNameAvailabilityResponseImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response checkNameAvailabilityWithResponse(
CheckNameAvailabilityRequest body, Context context) {
Response inner =
@@ -51,6 +42,15 @@ public Response checkNameAvailabilityWithResponse
}
}
+ public CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body) {
+ CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(body);
+ if (inner != null) {
+ return new CheckNameAvailabilityResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private LocationsClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/OperationsClientImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/OperationsClientImpl.java
index 5acab33093476..6d2134e57b641 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/OperationsClientImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/OperationsClientImpl.java
@@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "AgriFoodManagementCl")
- private interface OperationsService {
+ public interface OperationsService {
@Headers({"Content-Type: application/json"})
@Get("/providers/Microsoft.AgFoodPlatform/operations")
@ExpectedResponses({200})
@@ -104,7 +104,7 @@ private Mono> listSinglePageAsync() {
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
- res.getValue().nextLink(),
+ res.getValue().nextLink().toString(),
null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -138,7 +138,7 @@ private Mono> listSinglePageAsync(Context context)
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
- res.getValue().nextLink(),
+ res.getValue().nextLink().toString(),
null));
}
@@ -231,7 +231,7 @@ private Mono> listNextSinglePageAsync(String nextL
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
- res.getValue().nextLink(),
+ res.getValue().nextLink().toString(),
null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -270,7 +270,7 @@ private Mono> listNextSinglePageAsync(String nextL
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
- res.getValue().nextLink(),
+ res.getValue().nextLink().toString(),
null));
}
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionImpl.java
index eedee8dc8aa57..0c612823da7f3 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionImpl.java
@@ -11,6 +11,8 @@
import com.azure.resourcemanager.agrifood.models.PrivateEndpointConnection;
import com.azure.resourcemanager.agrifood.models.PrivateEndpointConnectionProvisioningState;
import com.azure.resourcemanager.agrifood.models.PrivateLinkServiceConnectionState;
+import java.util.Collections;
+import java.util.List;
public final class PrivateEndpointConnectionImpl
implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update {
@@ -34,6 +36,15 @@ public SystemData systemData() {
return this.innerModel().systemData();
}
+ public List groupIds() {
+ List inner = this.innerModel().groupIds();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public PrivateEndpoint privateEndpoint() {
return this.innerModel().privateEndpoint();
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionsClientImpl.java
index bbd4afde86ede..981924384480c 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionsClientImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -35,6 +35,7 @@
import com.azure.resourcemanager.agrifood.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.agrifood.models.PrivateEndpointConnectionListResult;
import java.nio.ByteBuffer;
+import java.util.UUID;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -65,7 +66,7 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi
*/
@Host("{$host}")
@ServiceInterface(name = "AgriFoodManagementCl")
- private interface PrivateEndpointConnectionsService {
+ public interface PrivateEndpointConnectionsService {
@Headers({"Content-Type: application/json"})
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform"
@@ -74,7 +75,7 @@ private interface PrivateEndpointConnectionsService {
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> createOrUpdate(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
@@ -91,7 +92,7 @@ Mono> createOrUpdate(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
@@ -107,7 +108,7 @@ Mono> get(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
@@ -123,7 +124,7 @@ Mono>> delete(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByResource(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@QueryParam("api-version") String apiVersion,
@@ -141,7 +142,7 @@ Mono> listByResource(
* @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 Private Endpoint Connection resource along with {@link Response} on successful completion of {@link
+ * @return the private endpoint connection resource along with {@link Response} on successful completion of {@link
* Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -210,7 +211,7 @@ private Mono> createOrUpdateWithRespons
* @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 Private Endpoint Connection resource along with {@link Response} on successful completion of {@link
+ * @return the private endpoint connection resource along with {@link Response} on successful completion of {@link
* Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -276,7 +277,7 @@ private Mono> createOrUpdateWithRespons
* @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 Private Endpoint Connection resource on successful completion of {@link Mono}.
+ * @return the private endpoint connection resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -296,18 +297,21 @@ private Mono createOrUpdateAsync(
* @param farmBeatsResourceName FarmBeats resource name.
* @param privateEndpointConnectionName Private endpoint connection name.
* @param body Request object.
+ * @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 Private Endpoint Connection resource.
+ * @return the private endpoint connection resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PrivateEndpointConnectionInner createOrUpdate(
+ public Response createOrUpdateWithResponse(
String resourceGroupName,
String farmBeatsResourceName,
String privateEndpointConnectionName,
- PrivateEndpointConnectionInner body) {
- return createOrUpdateAsync(resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName, body)
+ PrivateEndpointConnectionInner body,
+ Context context) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName, body, context)
.block();
}
@@ -318,22 +322,20 @@ public PrivateEndpointConnectionInner createOrUpdate(
* @param farmBeatsResourceName FarmBeats resource name.
* @param privateEndpointConnectionName Private endpoint connection name.
* @param body Request object.
- * @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 Private Endpoint Connection resource along with {@link Response}.
+ * @return the private endpoint connection resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateWithResponse(
+ public PrivateEndpointConnectionInner createOrUpdate(
String resourceGroupName,
String farmBeatsResourceName,
String privateEndpointConnectionName,
- PrivateEndpointConnectionInner body,
- Context context) {
- return createOrUpdateWithResponseAsync(
- resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName, body, context)
- .block();
+ PrivateEndpointConnectionInner body) {
+ return createOrUpdateWithResponse(
+ resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName, body, Context.NONE)
+ .getValue();
}
/**
@@ -472,15 +474,17 @@ private Mono getAsync(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param privateEndpointConnectionName Private endpoint connection name.
+ * @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 private endpoint connection object.
+ * @return private endpoint connection object along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PrivateEndpointConnectionInner get(
- String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName) {
- return getAsync(resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName).block();
+ public Response getWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName, Context context) {
+ return getWithResponseAsync(resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName, context)
+ .block();
}
/**
@@ -489,17 +493,16 @@ public PrivateEndpointConnectionInner get(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param privateEndpointConnectionName Private endpoint connection name.
- * @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 private endpoint connection object along with {@link Response}.
+ * @return private endpoint connection object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName, Context context) {
- return getWithResponseAsync(resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName, context)
- .block();
+ public PrivateEndpointConnectionInner get(
+ String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName) {
+ return getWithResponse(resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName, Context.NONE)
+ .getValue();
}
/**
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionsImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionsImpl.java
index 7b7ed9ae0bbd4..f96e3a384dce8 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionsImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateEndpointConnectionsImpl.java
@@ -28,17 +28,6 @@ public PrivateEndpointConnectionsImpl(
this.serviceManager = serviceManager;
}
- public PrivateEndpointConnection get(
- String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName) {
- PrivateEndpointConnectionInner inner =
- this.serviceClient().get(resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName);
- if (inner != null) {
- return new PrivateEndpointConnectionImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(
String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName, Context context) {
Response inner =
@@ -56,6 +45,17 @@ public Response getWithResponse(
}
}
+ public PrivateEndpointConnection get(
+ String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionInner inner =
+ this.serviceClient().get(resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName);
+ if (inner != null) {
+ return new PrivateEndpointConnectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void delete(String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName) {
this.serviceClient().delete(resourceGroupName, farmBeatsResourceName, privateEndpointConnectionName);
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateLinkResourcesClientImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateLinkResourcesClientImpl.java
index dc72e8ac22783..2d13c99c22051 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateLinkResourcesClientImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateLinkResourcesClientImpl.java
@@ -28,6 +28,7 @@
import com.azure.resourcemanager.agrifood.fluent.PrivateLinkResourcesClient;
import com.azure.resourcemanager.agrifood.fluent.models.PrivateLinkResourceInner;
import com.azure.resourcemanager.agrifood.models.PrivateLinkResourceListResult;
+import java.util.UUID;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
@@ -56,7 +57,7 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource
*/
@Host("{$host}")
@ServiceInterface(name = "AgriFoodManagementCl")
- private interface PrivateLinkResourcesService {
+ public interface PrivateLinkResourcesService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform"
@@ -65,7 +66,7 @@ private interface PrivateLinkResourcesService {
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByResource(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@QueryParam("api-version") String apiVersion,
@@ -80,7 +81,7 @@ Mono> listByResource(
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("subscriptionId") UUID subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("farmBeatsResourceName") String farmBeatsResourceName,
@PathParam("subResourceName") String subResourceName,
@@ -391,15 +392,16 @@ private Mono getAsync(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param subResourceName Sub resource name.
+ * @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 private link resource object.
+ * @return private link resource object along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PrivateLinkResourceInner get(
- String resourceGroupName, String farmBeatsResourceName, String subResourceName) {
- return getAsync(resourceGroupName, farmBeatsResourceName, subResourceName).block();
+ public Response getWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String subResourceName, Context context) {
+ return getWithResponseAsync(resourceGroupName, farmBeatsResourceName, subResourceName, context).block();
}
/**
@@ -408,15 +410,14 @@ public PrivateLinkResourceInner get(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param subResourceName Sub resource name.
- * @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 private link resource object along with {@link Response}.
+ * @return private link resource object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String subResourceName, Context context) {
- return getWithResponseAsync(resourceGroupName, farmBeatsResourceName, subResourceName, context).block();
+ public PrivateLinkResourceInner get(
+ String resourceGroupName, String farmBeatsResourceName, String subResourceName) {
+ return getWithResponse(resourceGroupName, farmBeatsResourceName, subResourceName, Context.NONE).getValue();
}
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateLinkResourcesImpl.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateLinkResourcesImpl.java
index 69255b42fd273..ba003473e0af8 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateLinkResourcesImpl.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/implementation/PrivateLinkResourcesImpl.java
@@ -40,16 +40,6 @@ public PagedIterable listByResource(
return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
}
- public PrivateLinkResource get(String resourceGroupName, String farmBeatsResourceName, String subResourceName) {
- PrivateLinkResourceInner inner =
- this.serviceClient().get(resourceGroupName, farmBeatsResourceName, subResourceName);
- if (inner != null) {
- return new PrivateLinkResourceImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(
String resourceGroupName, String farmBeatsResourceName, String subResourceName, Context context) {
Response inner =
@@ -65,6 +55,16 @@ public Response getWithResponse(
}
}
+ public PrivateLinkResource get(String resourceGroupName, String farmBeatsResourceName, String subResourceName) {
+ PrivateLinkResourceInner inner =
+ this.serviceClient().get(resourceGroupName, farmBeatsResourceName, subResourceName);
+ if (inner != null) {
+ return new PrivateLinkResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private PrivateLinkResourcesClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/ApiProperties.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/ApiProperties.java
new file mode 100644
index 0000000000000..3c3e2d5277d87
--- /dev/null
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/ApiProperties.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.agrifood.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Api properties. */
+@Fluent
+public final class ApiProperties {
+ /*
+ * Interval in minutes for which the weather data for the api needs to be refreshed.
+ */
+ @JsonProperty(value = "apiFreshnessWindowInMinutes")
+ private Integer apiFreshnessWindowInMinutes;
+
+ /** Creates an instance of ApiProperties class. */
+ public ApiProperties() {
+ }
+
+ /**
+ * Get the apiFreshnessWindowInMinutes property: Interval in minutes for which the weather data for the api needs to
+ * be refreshed.
+ *
+ * @return the apiFreshnessWindowInMinutes value.
+ */
+ public Integer apiFreshnessWindowInMinutes() {
+ return this.apiFreshnessWindowInMinutes;
+ }
+
+ /**
+ * Set the apiFreshnessWindowInMinutes property: Interval in minutes for which the weather data for the api needs to
+ * be refreshed.
+ *
+ * @param apiFreshnessWindowInMinutes the apiFreshnessWindowInMinutes value to set.
+ * @return the ApiProperties object itself.
+ */
+ public ApiProperties withApiFreshnessWindowInMinutes(Integer apiFreshnessWindowInMinutes) {
+ this.apiFreshnessWindowInMinutes = apiFreshnessWindowInMinutes;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/CheckNameAvailabilityRequest.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/CheckNameAvailabilityRequest.java
index bb5b3eb5406bd..96b4e80750fed 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/CheckNameAvailabilityRequest.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/CheckNameAvailabilityRequest.java
@@ -22,6 +22,10 @@ public final class CheckNameAvailabilityRequest {
@JsonProperty(value = "type")
private String type;
+ /** Creates an instance of CheckNameAvailabilityRequest class. */
+ public CheckNameAvailabilityRequest() {
+ }
+
/**
* Get the name property: The name of the resource for which availability needs to be checked.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/DetailedInformation.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/DetailedInformation.java
index 0b7f4a321f964..992a2d84e75b7 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/DetailedInformation.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/DetailedInformation.java
@@ -41,6 +41,10 @@ public final class DetailedInformation {
@JsonProperty(value = "apiInputParameters")
private List apiInputParameters;
+ /** Creates an instance of DetailedInformation class. */
+ public DetailedInformation() {
+ }
+
/**
* Get the apiName property: ApiName available for the farmBeatsExtension.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Extension.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Extension.java
index 84099704176e9..f41987e474d13 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Extension.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Extension.java
@@ -4,7 +4,10 @@
package com.azure.resourcemanager.agrifood.models;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
import com.azure.resourcemanager.agrifood.fluent.models.ExtensionInner;
+import java.util.Map;
/** An immutable client-side representation of Extension. */
public interface Extension {
@@ -36,6 +39,13 @@ public interface Extension {
*/
String etag();
+ /**
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
/**
* Gets the extensionId property: Extension Id.
*
@@ -71,10 +81,148 @@ public interface Extension {
*/
String extensionApiDocsLink();
+ /**
+ * Gets the additionalApiProperties property: Additional api properties.
+ *
+ * @return the additionalApiProperties value.
+ */
+ Map additionalApiProperties();
+
+ /**
+ * Gets the name of the resource group.
+ *
+ * @return the name of the resource group.
+ */
+ String resourceGroupName();
+
/**
* Gets the inner com.azure.resourcemanager.agrifood.fluent.models.ExtensionInner object.
*
* @return the inner object.
*/
ExtensionInner innerModel();
+
+ /** The entirety of the Extension definition. */
+ interface Definition
+ extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
+ }
+ /** The Extension definition stages. */
+ interface DefinitionStages {
+ /** The first stage of the Extension definition. */
+ interface Blank extends WithParentResource {
+ }
+ /** The stage of the Extension definition allowing to specify parent resource. */
+ interface WithParentResource {
+ /**
+ * Specifies resourceGroupName, farmBeatsResourceName.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param farmBeatsResourceName FarmBeats resource name.
+ * @return the next definition stage.
+ */
+ WithCreate withExistingFarmBeat(String resourceGroupName, String farmBeatsResourceName);
+ }
+ /**
+ * The stage of the Extension definition which contains all the minimum required properties for the resource to
+ * be created, but also allows for any other optional properties to be specified.
+ */
+ interface WithCreate
+ extends DefinitionStages.WithExtensionVersion, DefinitionStages.WithAdditionalApiProperties {
+ /**
+ * Executes the create request.
+ *
+ * @return the created resource.
+ */
+ Extension create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ Extension create(Context context);
+ }
+ /** The stage of the Extension definition allowing to specify extensionVersion. */
+ interface WithExtensionVersion {
+ /**
+ * Specifies the extensionVersion property: Extension Version..
+ *
+ * @param extensionVersion Extension Version.
+ * @return the next definition stage.
+ */
+ WithCreate withExtensionVersion(String extensionVersion);
+ }
+ /** The stage of the Extension definition allowing to specify additionalApiProperties. */
+ interface WithAdditionalApiProperties {
+ /**
+ * Specifies the additionalApiProperties property: Additional Api Properties..
+ *
+ * @param additionalApiProperties Additional Api Properties.
+ * @return the next definition stage.
+ */
+ WithCreate withAdditionalApiProperties(Map additionalApiProperties);
+ }
+ }
+ /**
+ * Begins update for the Extension resource.
+ *
+ * @return the stage of resource update.
+ */
+ Extension.Update update();
+
+ /** The template for Extension update. */
+ interface Update extends UpdateStages.WithExtensionVersion, UpdateStages.WithAdditionalApiProperties {
+ /**
+ * Executes the update request.
+ *
+ * @return the updated resource.
+ */
+ Extension apply();
+
+ /**
+ * Executes the update request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the updated resource.
+ */
+ Extension apply(Context context);
+ }
+ /** The Extension update stages. */
+ interface UpdateStages {
+ /** The stage of the Extension update allowing to specify extensionVersion. */
+ interface WithExtensionVersion {
+ /**
+ * Specifies the extensionVersion property: Extension Version..
+ *
+ * @param extensionVersion Extension Version.
+ * @return the next definition stage.
+ */
+ Update withExtensionVersion(String extensionVersion);
+ }
+ /** The stage of the Extension update allowing to specify additionalApiProperties. */
+ interface WithAdditionalApiProperties {
+ /**
+ * Specifies the additionalApiProperties property: Additional Api Properties..
+ *
+ * @param additionalApiProperties Additional Api Properties.
+ * @return the next definition stage.
+ */
+ Update withAdditionalApiProperties(Map additionalApiProperties);
+ }
+ }
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @return the refreshed resource.
+ */
+ Extension refresh();
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @param context The context to associate with this operation.
+ * @return the refreshed resource.
+ */
+ Extension refresh(Context context);
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/ExtensionInstallationRequest.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/ExtensionInstallationRequest.java
new file mode 100644
index 0000000000000..79f9118493986
--- /dev/null
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/ExtensionInstallationRequest.java
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.agrifood.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Extension Installation Request Body. */
+@Fluent
+public final class ExtensionInstallationRequest {
+ /*
+ * Extension Version.
+ */
+ @JsonProperty(value = "extensionVersion")
+ private String extensionVersion;
+
+ /*
+ * Additional Api Properties.
+ */
+ @JsonProperty(value = "additionalApiProperties")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map additionalApiProperties;
+
+ /** Creates an instance of ExtensionInstallationRequest class. */
+ public ExtensionInstallationRequest() {
+ }
+
+ /**
+ * Get the extensionVersion property: Extension Version.
+ *
+ * @return the extensionVersion value.
+ */
+ public String extensionVersion() {
+ return this.extensionVersion;
+ }
+
+ /**
+ * Set the extensionVersion property: Extension Version.
+ *
+ * @param extensionVersion the extensionVersion value to set.
+ * @return the ExtensionInstallationRequest object itself.
+ */
+ public ExtensionInstallationRequest withExtensionVersion(String extensionVersion) {
+ this.extensionVersion = extensionVersion;
+ return this;
+ }
+
+ /**
+ * Get the additionalApiProperties property: Additional Api Properties.
+ *
+ * @return the additionalApiProperties value.
+ */
+ public Map additionalApiProperties() {
+ return this.additionalApiProperties;
+ }
+
+ /**
+ * Set the additionalApiProperties property: Additional Api Properties.
+ *
+ * @param additionalApiProperties the additionalApiProperties value to set.
+ * @return the ExtensionInstallationRequest object itself.
+ */
+ public ExtensionInstallationRequest withAdditionalApiProperties(
+ Map additionalApiProperties) {
+ this.additionalApiProperties = additionalApiProperties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (additionalApiProperties() != null) {
+ additionalApiProperties()
+ .values()
+ .forEach(
+ e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
+ }
+}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/ExtensionListResponse.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/ExtensionListResponse.java
index 61521c0e1c941..1f04caa8a1ce0 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/ExtensionListResponse.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/ExtensionListResponse.java
@@ -24,6 +24,10 @@ public final class ExtensionListResponse {
@JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
+ /** Creates an instance of ExtensionListResponse class. */
+ public ExtensionListResponse() {
+ }
+
/**
* Get the value property: List of requested objects.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Extensions.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Extensions.java
index 80baa3fcd8240..ecf3475c46cbb 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Extensions.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Extensions.java
@@ -12,149 +12,146 @@
/** Resource collection API of Extensions. */
public interface Extensions {
/**
- * Install extension.
+ * Get installed extension details by extension id.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
+ * @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 extension resource.
+ * @return installed extension details by extension id along with {@link Response}.
*/
- Extension create(String resourceGroupName, String farmBeatsResourceName, String extensionId);
+ Response getWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context);
/**
- * Install extension.
+ * Get installed extension details by extension id.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
- * @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 extension resource along with {@link Response}.
+ * @return installed extension details by extension id.
*/
- Response createWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context);
+ Extension get(String resourceGroupName, String farmBeatsResourceName, String extensionId);
/**
- * Get installed extension details by extension id.
+ * Uninstall extension.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
+ * @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 installed extension details by extension id.
+ * @return the {@link Response}.
*/
- Extension get(String resourceGroupName, String farmBeatsResourceName, String extensionId);
+ Response deleteWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context);
/**
- * Get installed extension details by extension id.
+ * Uninstall extension.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param extensionId Id of extension resource.
- * @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 installed extension details by extension id along with {@link Response}.
*/
- Response getWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context);
+ void delete(String resourceGroupName, String farmBeatsResourceName, String extensionId);
/**
- * Upgrade to latest extension.
+ * Get installed extensions details.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
* @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 extension resource.
+ * @return installed extensions details as paginated response with {@link PagedIterable}.
*/
- Extension update(String resourceGroupName, String farmBeatsResourceName, String extensionId);
+ PagedIterable listByFarmBeats(String resourceGroupName, String farmBeatsResourceName);
/**
- * Upgrade to latest extension.
+ * Get installed extensions details.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
+ * @param extensionIds Installed extension ids.
+ * @param extensionCategories Installed extension categories.
+ * @param maxPageSize Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.
+ * @param skipToken Skip token for getting next set of results.
* @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 extension resource along with {@link Response}.
+ * @return installed extensions details as paginated response with {@link PagedIterable}.
*/
- Response updateWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context);
+ PagedIterable listByFarmBeats(
+ String resourceGroupName,
+ String farmBeatsResourceName,
+ List extensionIds,
+ List extensionCategories,
+ Integer maxPageSize,
+ String skipToken,
+ Context context);
/**
- * Uninstall extension.
+ * Get installed extension details by extension id.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
+ * @param id the resource ID.
* @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 installed extension details by extension id along with {@link Response}.
*/
- void delete(String resourceGroupName, String farmBeatsResourceName, String extensionId);
+ Extension getById(String id);
/**
- * Uninstall extension.
+ * Get installed extension details by extension id.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionId Id of extension resource.
+ * @param id the resource ID.
* @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 {@link Response}.
+ * @return installed extension details by extension id along with {@link Response}.
*/
- Response deleteWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String extensionId, Context context);
+ Response getByIdWithResponse(String id, Context context);
/**
- * Get installed extensions details.
+ * Uninstall extension.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
+ * @param id the resource ID.
* @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 installed extensions details as paginated response with {@link PagedIterable}.
*/
- PagedIterable listByFarmBeats(String resourceGroupName, String farmBeatsResourceName);
+ void deleteById(String id);
/**
- * Get installed extensions details.
+ * Uninstall extension.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param farmBeatsResourceName FarmBeats resource name.
- * @param extensionIds Installed extension ids.
- * @param extensionCategories Installed extension categories.
- * @param maxPageSize Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.
- * @param skipToken Skip token for getting next set of results.
+ * @param id the resource ID.
* @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 installed extensions details as paginated response with {@link PagedIterable}.
+ * @return the {@link Response}.
*/
- PagedIterable listByFarmBeats(
- String resourceGroupName,
- String farmBeatsResourceName,
- List extensionIds,
- List extensionCategories,
- Integer maxPageSize,
- String skipToken,
- Context context);
+ Response deleteByIdWithResponse(String id, Context context);
+
+ /**
+ * Begins definition for a new Extension resource.
+ *
+ * @param name resource name.
+ * @return the first stage of the new Extension definition.
+ */
+ Extension.DefinitionStages.Blank define(String name);
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeats.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeats.java
index bca08be768aef..583ee30dda865 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeats.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeats.java
@@ -5,8 +5,10 @@
package com.azure.resourcemanager.agrifood.models;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.agrifood.fluent.models.FarmBeatsInner;
+import java.net.URL;
import java.util.Map;
/** An immutable client-side representation of FarmBeats. */
@@ -53,12 +55,19 @@ public interface FarmBeats {
*/
Identity identity();
+ /**
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
/**
* Gets the instanceUri property: Uri of the FarmBeats instance.
*
* @return the instanceUri value.
*/
- String instanceUri();
+ URL instanceUri();
/**
* Gets the provisioningState property: FarmBeats instance provisioning state.
@@ -82,7 +91,7 @@ public interface FarmBeats {
PublicNetworkAccess publicNetworkAccess();
/**
- * Gets the privateEndpointConnections property: The Private Endpoint Connection resource.
+ * Gets the privateEndpointConnections property: The private endpoint connection resource.
*
* @return the privateEndpointConnections value.
*/
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsExtensionListResponse.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsExtensionListResponse.java
index 2ae2018caf178..d71e0cecfd34b 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsExtensionListResponse.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsExtensionListResponse.java
@@ -24,6 +24,10 @@ public final class FarmBeatsExtensionListResponse {
@JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
+ /** Creates an instance of FarmBeatsExtensionListResponse class. */
+ public FarmBeatsExtensionListResponse() {
+ }
+
/**
* Get the value property: List of requested objects.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsExtensions.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsExtensions.java
index c1ba7c36c75a7..f99e65fa83652 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsExtensions.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsExtensions.java
@@ -46,22 +46,22 @@ PagedIterable list(
* Get farmBeats extension.
*
* @param farmBeatsExtensionId farmBeatsExtensionId to be queried.
+ * @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 farmBeats extension.
+ * @return farmBeats extension along with {@link Response}.
*/
- FarmBeatsExtension get(String farmBeatsExtensionId);
+ Response getWithResponse(String farmBeatsExtensionId, Context context);
/**
* Get farmBeats extension.
*
* @param farmBeatsExtensionId farmBeatsExtensionId to be queried.
- * @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 farmBeats extension along with {@link Response}.
+ * @return farmBeats extension.
*/
- Response getWithResponse(String farmBeatsExtensionId, Context context);
+ FarmBeatsExtension get(String farmBeatsExtensionId);
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsListResponse.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsListResponse.java
index ef77cee6349de..378bb37dbdd56 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsListResponse.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsListResponse.java
@@ -24,6 +24,10 @@ public final class FarmBeatsListResponse {
@JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
+ /** Creates an instance of FarmBeatsListResponse class. */
+ public FarmBeatsListResponse() {
+ }
+
/**
* Get the value property: List of requested objects.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsModels.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsModels.java
index 1fc27e9d80c4d..73c9492e8e70e 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsModels.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsModels.java
@@ -15,50 +15,51 @@ public interface FarmBeatsModels {
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
+ * @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 farmBeats resource.
+ * @return farmBeats resource along with {@link Response}.
*/
- FarmBeats getByResourceGroup(String resourceGroupName, String farmBeatsResourceName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, Context context);
/**
* Get FarmBeats resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
- * @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 farmBeats resource along with {@link Response}.
+ * @return farmBeats resource.
*/
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String farmBeatsResourceName, Context context);
+ FarmBeats getByResourceGroup(String resourceGroupName, String farmBeatsResourceName);
/**
* Delete a FarmBeats resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
+ * @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 {@link Response}.
*/
- void deleteByResourceGroup(String resourceGroupName, String farmBeatsResourceName);
+ Response deleteByResourceGroupWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, Context context);
/**
* Delete a FarmBeats resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
- * @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 {@link Response}.
*/
- Response deleteWithResponse(String resourceGroupName, String farmBeatsResourceName, Context context);
+ void deleteByResourceGroup(String resourceGroupName, String farmBeatsResourceName);
/**
* Lists the FarmBeats instances for a subscription.
@@ -118,13 +119,14 @@ PagedIterable listByResourceGroup(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param operationResultsId The operation results id.
+ * @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 operationResults for a FarmBeats resource.
+ * @return operationResults for a FarmBeats resource along with {@link Response}.
*/
- ArmAsyncOperation getOperationResult(
- String resourceGroupName, String farmBeatsResourceName, String operationResultsId);
+ Response getOperationResultWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String operationResultsId, Context context);
/**
* Get operationResults for a FarmBeats resource.
@@ -132,14 +134,13 @@ ArmAsyncOperation getOperationResult(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param operationResultsId The operation results id.
- * @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 operationResults for a FarmBeats resource along with {@link Response}.
+ * @return operationResults for a FarmBeats resource.
*/
- Response getOperationResultWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String operationResultsId, Context context);
+ ArmAsyncOperation getOperationResult(
+ String resourceGroupName, String farmBeatsResourceName, String operationResultsId);
/**
* Get FarmBeats resource.
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsProperties.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsProperties.java
index a27ee9ef2c23e..bfeb476499a89 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsProperties.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsProperties.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.agrifood.models;
import com.azure.resourcemanager.agrifood.fluent.models.FarmBeatsPropertiesInner;
+import java.net.URL;
/** An immutable client-side representation of FarmBeatsProperties. */
public interface FarmBeatsProperties {
@@ -13,7 +14,7 @@ public interface FarmBeatsProperties {
*
* @return the instanceUri value.
*/
- String instanceUri();
+ URL instanceUri();
/**
* Gets the provisioningState property: FarmBeats instance provisioning state.
@@ -37,7 +38,7 @@ public interface FarmBeatsProperties {
PublicNetworkAccess publicNetworkAccess();
/**
- * Gets the privateEndpointConnections property: The Private Endpoint Connection resource.
+ * Gets the privateEndpointConnections property: The private endpoint connection resource.
*
* @return the privateEndpointConnections value.
*/
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsUpdateProperties.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsUpdateProperties.java
index 6b0f2b4d95244..3e598f16d67f4 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsUpdateProperties.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsUpdateProperties.java
@@ -22,6 +22,10 @@ public final class FarmBeatsUpdateProperties {
@JsonProperty(value = "publicNetworkAccess")
private PublicNetworkAccess publicNetworkAccess;
+ /** Creates an instance of FarmBeatsUpdateProperties class. */
+ public FarmBeatsUpdateProperties() {
+ }
+
/**
* Get the sensorIntegration property: Sensor integration request model.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsUpdateRequestModel.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsUpdateRequestModel.java
index 46bda32390f0a..8c50137cdf2bf 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsUpdateRequestModel.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/FarmBeatsUpdateRequestModel.java
@@ -37,6 +37,10 @@ public final class FarmBeatsUpdateRequestModel {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of FarmBeatsUpdateRequestModel class. */
+ public FarmBeatsUpdateRequestModel() {
+ }
+
/**
* Get the location property: Geo-location where the resource lives.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Identity.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Identity.java
index 68655c2d2a1d7..3835b9ea64d78 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Identity.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Identity.java
@@ -6,21 +6,22 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.UUID;
/** Identity for the resource. */
@Fluent
public class Identity {
/*
- * The principal ID of resource identity.
+ * The principal ID of resource identity. The value must be an UUID.
*/
@JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
- private String principalId;
+ private UUID principalId;
/*
- * The tenant ID of resource.
+ * The tenant ID of resource. The value must be an UUID.
*/
@JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
- private String tenantId;
+ private UUID tenantId;
/*
* The identity type.
@@ -28,21 +29,25 @@ public class Identity {
@JsonProperty(value = "type")
private ResourceIdentityType type;
+ /** Creates an instance of Identity class. */
+ public Identity() {
+ }
+
/**
- * Get the principalId property: The principal ID of resource identity.
+ * Get the principalId property: The principal ID of resource identity. The value must be an UUID.
*
* @return the principalId value.
*/
- public String principalId() {
+ public UUID principalId() {
return this.principalId;
}
/**
- * Get the tenantId property: The tenant ID of resource.
+ * Get the tenantId property: The tenant ID of resource. The value must be an UUID.
*
* @return the tenantId value.
*/
- public String tenantId() {
+ public UUID tenantId() {
return this.tenantId;
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Locations.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Locations.java
index 4d413ecdbadbc..824c09e843b26 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Locations.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/Locations.java
@@ -13,23 +13,23 @@ public interface Locations {
* Checks the name availability of the resource with requested resource name.
*
* @param body NameAvailabilityRequest object.
+ * @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 check availability result.
+ * @return the check availability result along with {@link Response}.
*/
- CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body);
+ Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityRequest body, Context context);
/**
* Checks the name availability of the resource with requested resource name.
*
* @param body NameAvailabilityRequest object.
- * @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 check availability result along with {@link Response}.
+ * @return the check availability result.
*/
- Response checkNameAvailabilityWithResponse(
- CheckNameAvailabilityRequest body, Context context);
+ CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body);
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/OperationDisplay.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/OperationDisplay.java
index 3799ff35d7a19..f8b3837b3a3bd 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/OperationDisplay.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/OperationDisplay.java
@@ -37,6 +37,10 @@ public final class OperationDisplay {
@JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
private String description;
+ /** Creates an instance of OperationDisplay class. */
+ public OperationDisplay() {
+ }
+
/**
* Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring
* Insights" or "Microsoft Compute".
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/OperationListResult.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/OperationListResult.java
index e5078ee848104..05571bc81144c 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/OperationListResult.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/OperationListResult.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.agrifood.fluent.models.OperationInner;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.net.URL;
import java.util.List;
/**
@@ -25,7 +26,11 @@ public final class OperationListResult {
* 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;
+ private URL nextLink;
+
+ /** Creates an instance of OperationListResult class. */
+ public OperationListResult() {
+ }
/**
* Get the value property: List of operations supported by the resource provider.
@@ -41,7 +46,7 @@ public List value() {
*
* @return the nextLink value.
*/
- public String nextLink() {
+ public URL nextLink() {
return this.nextLink;
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpoint.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpoint.java
index 60d6ca43e365f..59f287bf249c4 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpoint.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpoint.java
@@ -7,17 +7,21 @@
import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The Private Endpoint resource. */
+/** The private endpoint resource. */
@Immutable
public final class PrivateEndpoint {
/*
- * The ARM identifier for Private Endpoint
+ * The ARM identifier for private endpoint.
*/
@JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
private String id;
+ /** Creates an instance of PrivateEndpoint class. */
+ public PrivateEndpoint() {
+ }
+
/**
- * Get the id property: The ARM identifier for Private Endpoint.
+ * Get the id property: The ARM identifier for private endpoint.
*
* @return the id value.
*/
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnection.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnection.java
index 349877bceac9d..4b4958c5d828a 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnection.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnection.java
@@ -7,6 +7,7 @@
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.agrifood.fluent.models.PrivateEndpointConnectionInner;
+import java.util.List;
/** An immutable client-side representation of PrivateEndpointConnection. */
public interface PrivateEndpointConnection {
@@ -39,7 +40,14 @@ public interface PrivateEndpointConnection {
SystemData systemData();
/**
- * Gets the privateEndpoint property: The resource of private end point.
+ * Gets the groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ List groupIds();
+
+ /**
+ * Gets the privateEndpoint property: The private endpoint resource.
*
* @return the privateEndpoint value.
*/
@@ -118,9 +126,9 @@ interface WithCreate
/** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */
interface WithPrivateEndpoint {
/**
- * Specifies the privateEndpoint property: The resource of private end point..
+ * Specifies the privateEndpoint property: The private endpoint resource..
*
- * @param privateEndpoint The resource of private end point.
+ * @param privateEndpoint The private endpoint resource.
* @return the next definition stage.
*/
WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint);
@@ -170,9 +178,9 @@ interface UpdateStages {
/** The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. */
interface WithPrivateEndpoint {
/**
- * Specifies the privateEndpoint property: The resource of private end point..
+ * Specifies the privateEndpoint property: The private endpoint resource..
*
- * @param privateEndpoint The resource of private end point.
+ * @param privateEndpoint The private endpoint resource.
* @return the next definition stage.
*/
Update withPrivateEndpoint(PrivateEndpoint privateEndpoint);
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnectionListResult.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnectionListResult.java
index 9e0e64d792732..636b85fa78cb2 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnectionListResult.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnectionListResult.java
@@ -9,15 +9,19 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** List of private endpoint connection associated with the specified storage account. */
+/** List of private endpoint connections associated with the specified resource. */
@Fluent
public final class PrivateEndpointConnectionListResult {
/*
- * Array of private endpoint connections
+ * Array of private endpoint connections.
*/
@JsonProperty(value = "value")
private List value;
+ /** Creates an instance of PrivateEndpointConnectionListResult class. */
+ public PrivateEndpointConnectionListResult() {
+ }
+
/**
* Get the value property: Array of private endpoint connections.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnections.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnections.java
index 8b34f8e7277c8..0338f642f1353 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnections.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateEndpointConnections.java
@@ -16,13 +16,14 @@ public interface PrivateEndpointConnections {
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param privateEndpointConnectionName Private endpoint connection name.
+ * @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 private endpoint connection object.
+ * @return private endpoint connection object along with {@link Response}.
*/
- PrivateEndpointConnection get(
- String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName);
+ Response getWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName, Context context);
/**
* Get Private endpoint connection object.
@@ -30,14 +31,13 @@ PrivateEndpointConnection get(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param privateEndpointConnectionName Private endpoint connection name.
- * @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 private endpoint connection object along with {@link Response}.
+ * @return private endpoint connection object.
*/
- Response getWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName, Context context);
+ PrivateEndpointConnection get(
+ String resourceGroupName, String farmBeatsResourceName, String privateEndpointConnectionName);
/**
* Delete Private endpoint connection request.
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResource.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResource.java
index 9a1f64a1e21dc..e3728cc718019 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResource.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResource.java
@@ -53,7 +53,7 @@ public interface PrivateLinkResource {
List requiredMembers();
/**
- * Gets the requiredZoneNames property: The private link resource Private link DNS zone name.
+ * Gets the requiredZoneNames property: The private link resource private link DNS zone name.
*
* @return the requiredZoneNames value.
*/
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResourceListResult.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResourceListResult.java
index f11cebc09995b..260721fe1ac18 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResourceListResult.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResourceListResult.java
@@ -18,6 +18,10 @@ public final class PrivateLinkResourceListResult {
@JsonProperty(value = "value")
private List value;
+ /** Creates an instance of PrivateLinkResourceListResult class. */
+ public PrivateLinkResourceListResult() {
+ }
+
/**
* Get the value property: Array of private link resources.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResources.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResources.java
index d4e5ddd6992b8..8dbdfe6bbe9a9 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResources.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkResources.java
@@ -42,12 +42,14 @@ PagedIterable listByResource(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param subResourceName Sub resource name.
+ * @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 private link resource object.
+ * @return private link resource object along with {@link Response}.
*/
- PrivateLinkResource get(String resourceGroupName, String farmBeatsResourceName, String subResourceName);
+ Response getWithResponse(
+ String resourceGroupName, String farmBeatsResourceName, String subResourceName, Context context);
/**
* Get Private link resource object.
@@ -55,12 +57,10 @@ PagedIterable listByResource(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param farmBeatsResourceName FarmBeats resource name.
* @param subResourceName Sub resource name.
- * @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 private link resource object along with {@link Response}.
+ * @return private link resource object.
*/
- Response getWithResponse(
- String resourceGroupName, String farmBeatsResourceName, String subResourceName, Context context);
+ PrivateLinkResource get(String resourceGroupName, String farmBeatsResourceName, String subResourceName);
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkServiceConnectionState.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkServiceConnectionState.java
index 630be23352193..ffc0170bc1aa1 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkServiceConnectionState.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/PrivateLinkServiceConnectionState.java
@@ -28,6 +28,10 @@ public final class PrivateLinkServiceConnectionState {
@JsonProperty(value = "actionsRequired")
private String actionsRequired;
+ /** Creates an instance of PrivateLinkServiceConnectionState class. */
+ public PrivateLinkServiceConnectionState() {
+ }
+
/**
* Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the
* service.
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/SensorIntegration.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/SensorIntegration.java
index b0059797b5b23..3c296af5a101f 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/SensorIntegration.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/SensorIntegration.java
@@ -32,6 +32,10 @@ public final class SensorIntegration {
@JsonProperty(value = "provisioningInfo")
private ManagementError provisioningInfo;
+ /** Creates an instance of SensorIntegration class. */
+ public SensorIntegration() {
+ }
+
/**
* Get the enabled property: Sensor integration enable state. Allowed values are True, None.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/UnitSystemsInfo.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/UnitSystemsInfo.java
index efaff9f971720..bd222bb3e28ca 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/UnitSystemsInfo.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/main/java/com/azure/resourcemanager/agrifood/models/UnitSystemsInfo.java
@@ -24,6 +24,10 @@ public final class UnitSystemsInfo {
@JsonProperty(value = "values", required = true)
private List values;
+ /** Creates an instance of UnitSystemsInfo class. */
+ public UnitSystemsInfo() {
+ }
+
/**
* Get the key property: UnitSystem key sent as part of ProviderInput.
*
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/ExtensionsCreateSamples.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/ExtensionsCreateOrUpdateSamples.java
similarity index 52%
rename from sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/ExtensionsCreateSamples.java
rename to sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/ExtensionsCreateOrUpdateSamples.java
index cd768456023c3..484f47d3c20eb 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/ExtensionsCreateSamples.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/ExtensionsCreateOrUpdateSamples.java
@@ -4,21 +4,21 @@
package com.azure.resourcemanager.agrifood.generated;
-import com.azure.core.util.Context;
-
-/** Samples for Extensions Create. */
-public final class ExtensionsCreateSamples {
+/** Samples for Extensions CreateOrUpdate. */
+public final class ExtensionsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Extensions_Create.json
+ * x-ms-original-file: specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Extensions_CreateOrUpdate.json
*/
/**
- * Sample code: Extensions_Create.
+ * Sample code: Extensions_CreateOrUpdate.
*
* @param manager Entry point to AgriFoodManager.
*/
- public static void extensionsCreate(com.azure.resourcemanager.agrifood.AgriFoodManager manager) {
+ public static void extensionsCreateOrUpdate(com.azure.resourcemanager.agrifood.AgriFoodManager manager) {
manager
.extensions()
- .createWithResponse("examples-rg", "examples-farmbeatsResourceName", "provider.extension", Context.NONE);
+ .define("provider.extension")
+ .withExistingFarmBeat("examples-rg", "examples-farmbeatsResourceName")
+ .create();
}
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/ExtensionsUpdateSamples.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/ExtensionsUpdateSamples.java
deleted file mode 100644
index 2167bec5b4e6c..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/ExtensionsUpdateSamples.java
+++ /dev/null
@@ -1,24 +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.agrifood.generated;
-
-import com.azure.core.util.Context;
-
-/** Samples for Extensions Update. */
-public final class ExtensionsUpdateSamples {
- /*
- * x-ms-original-file: specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Extensions_Update.json
- */
- /**
- * Sample code: Extensions_Update.
- *
- * @param manager Entry point to AgriFoodManager.
- */
- public static void extensionsUpdate(com.azure.resourcemanager.agrifood.AgriFoodManager manager) {
- manager
- .extensions()
- .updateWithResponse("examples-rg", "examples-farmbeatsResourceName", "provider.extension", Context.NONE);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsModelsDeleteSamples.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsModelsDeleteSamples.java
index 6f739980ad40d..2cfeb7594ee1d 100644
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsModelsDeleteSamples.java
+++ b/sdk/agrifood/azure-resourcemanager-agrifood/src/samples/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsModelsDeleteSamples.java
@@ -17,6 +17,8 @@ public final class FarmBeatsModelsDeleteSamples {
* @param manager Entry point to AgriFoodManager.
*/
public static void farmBeatsModelsDelete(com.azure.resourcemanager.agrifood.AgriFoodManager manager) {
- manager.farmBeatsModels().deleteWithResponse("examples-rg", "examples-farmBeatsResourceName", Context.NONE);
+ manager
+ .farmBeatsModels()
+ .deleteByResourceGroupWithResponse("examples-rg", "examples-farmBeatsResourceName", Context.NONE);
}
}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ArmAsyncOperationInnerTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ArmAsyncOperationInnerTests.java
deleted file mode 100644
index 9967610d75f42..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ArmAsyncOperationInnerTests.java
+++ /dev/null
@@ -1,26 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.ArmAsyncOperationInner;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class ArmAsyncOperationInnerTests {
- @Test
- public void testDeserialize() {
- ArmAsyncOperationInner model =
- BinaryData.fromString("{\"status\":\"hb\"}").toObject(ArmAsyncOperationInner.class);
- Assertions.assertEquals("hb", model.status());
- }
-
- @Test
- public void testSerialize() {
- ArmAsyncOperationInner model = new ArmAsyncOperationInner().withStatus("hb");
- model = BinaryData.fromObject(model).toObject(ArmAsyncOperationInner.class);
- Assertions.assertEquals("hb", model.status());
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/CheckNameAvailabilityRequestTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/CheckNameAvailabilityRequestTests.java
deleted file mode 100644
index f7fd54a3a7b1c..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/CheckNameAvailabilityRequestTests.java
+++ /dev/null
@@ -1,31 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.models.CheckNameAvailabilityRequest;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class CheckNameAvailabilityRequestTests {
- @Test
- public void testDeserialize() {
- CheckNameAvailabilityRequest model =
- BinaryData
- .fromString("{\"name\":\"hejjz\",\"type\":\"dudgwdslfhot\"}")
- .toObject(CheckNameAvailabilityRequest.class);
- Assertions.assertEquals("hejjz", model.name());
- Assertions.assertEquals("dudgwdslfhot", model.type());
- }
-
- @Test
- public void testSerialize() {
- CheckNameAvailabilityRequest model =
- new CheckNameAvailabilityRequest().withName("hejjz").withType("dudgwdslfhot");
- model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class);
- Assertions.assertEquals("hejjz", model.name());
- Assertions.assertEquals("dudgwdslfhot", model.type());
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/CheckNameAvailabilityResponseInnerTests.java
deleted file mode 100644
index 9759852d53504..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/CheckNameAvailabilityResponseInnerTests.java
+++ /dev/null
@@ -1,37 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.CheckNameAvailabilityResponseInner;
-import com.azure.resourcemanager.agrifood.models.CheckNameAvailabilityReason;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class CheckNameAvailabilityResponseInnerTests {
- @Test
- public void testDeserialize() {
- CheckNameAvailabilityResponseInner model =
- BinaryData
- .fromString("{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"wlbjnpgacftade\"}")
- .toObject(CheckNameAvailabilityResponseInner.class);
- Assertions.assertEquals(true, model.nameAvailable());
- Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason());
- Assertions.assertEquals("wlbjnpgacftade", model.message());
- }
-
- @Test
- public void testSerialize() {
- CheckNameAvailabilityResponseInner model =
- new CheckNameAvailabilityResponseInner()
- .withNameAvailable(true)
- .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS)
- .withMessage("wlbjnpgacftade");
- model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class);
- Assertions.assertEquals(true, model.nameAvailable());
- Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason());
- Assertions.assertEquals("wlbjnpgacftade", model.message());
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/DetailedInformationTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/DetailedInformationTests.java
deleted file mode 100644
index ce79ba7da4bb8..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/DetailedInformationTests.java
+++ /dev/null
@@ -1,50 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.models.DetailedInformation;
-import com.azure.resourcemanager.agrifood.models.UnitSystemsInfo;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class DetailedInformationTests {
- @Test
- public void testDeserialize() {
- DetailedInformation model =
- BinaryData
- .fromString(
- "{\"apiName\":\"mgxsab\",\"customParameters\":[\"duuji\",\"c\",\"czdzev\",\"dhkrwpdappdsbdk\"],\"platformParameters\":[\"wjfeusnhutjel\",\"mrldhu\"],\"unitsSupported\":{\"key\":\"zzd\",\"values\":[\"qxhocdgeablgphut\",\"cndvkaozwyiftyhx\",\"urokft\"]},\"apiInputParameters\":[\"lniwpwcukjfkgiaw\",\"klryplwck\",\"asy\"]}")
- .toObject(DetailedInformation.class);
- Assertions.assertEquals("mgxsab", model.apiName());
- Assertions.assertEquals("duuji", model.customParameters().get(0));
- Assertions.assertEquals("wjfeusnhutjel", model.platformParameters().get(0));
- Assertions.assertEquals("zzd", model.unitsSupported().key());
- Assertions.assertEquals("qxhocdgeablgphut", model.unitsSupported().values().get(0));
- Assertions.assertEquals("lniwpwcukjfkgiaw", model.apiInputParameters().get(0));
- }
-
- @Test
- public void testSerialize() {
- DetailedInformation model =
- new DetailedInformation()
- .withApiName("mgxsab")
- .withCustomParameters(Arrays.asList("duuji", "c", "czdzev", "dhkrwpdappdsbdk"))
- .withPlatformParameters(Arrays.asList("wjfeusnhutjel", "mrldhu"))
- .withUnitsSupported(
- new UnitSystemsInfo()
- .withKey("zzd")
- .withValues(Arrays.asList("qxhocdgeablgphut", "cndvkaozwyiftyhx", "urokft")))
- .withApiInputParameters(Arrays.asList("lniwpwcukjfkgiaw", "klryplwck", "asy"));
- model = BinaryData.fromObject(model).toObject(DetailedInformation.class);
- Assertions.assertEquals("mgxsab", model.apiName());
- Assertions.assertEquals("duuji", model.customParameters().get(0));
- Assertions.assertEquals("wjfeusnhutjel", model.platformParameters().get(0));
- Assertions.assertEquals("zzd", model.unitsSupported().key());
- Assertions.assertEquals("qxhocdgeablgphut", model.unitsSupported().values().get(0));
- Assertions.assertEquals("lniwpwcukjfkgiaw", model.apiInputParameters().get(0));
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionInnerTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionInnerTests.java
deleted file mode 100644
index 3e67efb873663..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionInnerTests.java
+++ /dev/null
@@ -1,26 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.ExtensionInner;
-import org.junit.jupiter.api.Test;
-
-public final class ExtensionInnerTests {
- @Test
- public void testDeserialize() {
- ExtensionInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"extensionId\":\"hq\",\"extensionCategory\":\"gjxpybczmehmt\",\"installedExtensionVersion\":\"pbsphrupidgs\",\"extensionAuthLink\":\"bejhphoycmsxa\",\"extensionApiDocsLink\":\"hdxbmtqio\"},\"eTag\":\"zehtbmu\",\"id\":\"p\",\"name\":\"wnoi\",\"type\":\"hwlrx\"}")
- .toObject(ExtensionInner.class);
- }
-
- @Test
- public void testSerialize() {
- ExtensionInner model = new ExtensionInner();
- model = BinaryData.fromObject(model).toObject(ExtensionInner.class);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionListResponseTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionListResponseTests.java
deleted file mode 100644
index b6342f9f81b93..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionListResponseTests.java
+++ /dev/null
@@ -1,29 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.ExtensionInner;
-import com.azure.resourcemanager.agrifood.models.ExtensionListResponse;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-
-public final class ExtensionListResponseTests {
- @Test
- public void testDeserialize() {
- ExtensionListResponse model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"extensionId\":\"ifsqesaagdfmg\",\"extensionCategory\":\"lhjxr\",\"installedExtensionVersion\":\"kwm\",\"extensionAuthLink\":\"ktsizntocipaou\",\"extensionApiDocsLink\":\"psqucmpoyf\"},\"eTag\":\"fogknygjofjdde\",\"id\":\"s\",\"name\":\"deupewnwrei\",\"type\":\"jzyflu\"},{\"properties\":{\"extensionId\":\"hmofc\",\"extensionCategory\":\"smy\",\"installedExtensionVersion\":\"kdtmlxhekuk\",\"extensionAuthLink\":\"txukcdmp\",\"extensionApiDocsLink\":\"cryuan\"},\"eTag\":\"uxzdxtay\",\"id\":\"lhmwhfpmrqobm\",\"name\":\"u\",\"type\":\"knryrtihfxtij\"}],\"nextLink\":\"zvgnwzs\"}")
- .toObject(ExtensionListResponse.class);
- }
-
- @Test
- public void testSerialize() {
- ExtensionListResponse model =
- new ExtensionListResponse().withValue(Arrays.asList(new ExtensionInner(), new ExtensionInner()));
- model = BinaryData.fromObject(model).toObject(ExtensionListResponse.class);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionPropertiesTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionPropertiesTests.java
deleted file mode 100644
index 6a30aeda1a9a3..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionPropertiesTests.java
+++ /dev/null
@@ -1,26 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.ExtensionProperties;
-import org.junit.jupiter.api.Test;
-
-public final class ExtensionPropertiesTests {
- @Test
- public void testDeserialize() {
- ExtensionProperties model =
- BinaryData
- .fromString(
- "{\"extensionId\":\"qsoqijgkd\",\"extensionCategory\":\"pazlobcufpdz\",\"installedExtensionVersion\":\"btcqq\",\"extensionAuthLink\":\"qglhq\",\"extensionApiDocsLink\":\"ufo\"}")
- .toObject(ExtensionProperties.class);
- }
-
- @Test
- public void testSerialize() {
- ExtensionProperties model = new ExtensionProperties();
- model = BinaryData.fromObject(model).toObject(ExtensionProperties.class);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionsListByFarmBeatsTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionsListByFarmBeatsTests.java
deleted file mode 100644
index 8ac60c953ff51..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/ExtensionsListByFarmBeatsTests.java
+++ /dev/null
@@ -1,76 +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.agrifood.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.agrifood.AgriFoodManager;
-import com.azure.resourcemanager.agrifood.models.Extension;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExtensionsListByFarmBeatsTests {
- @Test
- public void testListByFarmBeats() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"extensionId\":\"uzycispnqza\",\"extensionCategory\":\"gkbrpyyd\",\"installedExtensionVersion\":\"bnuqqkpik\",\"extensionAuthLink\":\"rgvtqag\",\"extensionApiDocsLink\":\"uynhijg\"},\"eTag\":\"ebf\",\"id\":\"iarbutrcvpna\",\"name\":\"zmhjrunmp\",\"type\":\"ttdbhrbnl\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AgriFoodManager manager =
- AgriFoodManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .extensions()
- .listByFarmBeats(
- "jky",
- "xjvuujqgidokg",
- Arrays.asList("jyoxgvclt", "gsncghkjeszz", "bijhtxfvgxbf"),
- Arrays.asList("xnehmpvec", "godebfqkkrbmpu"),
- 525812320,
- "riwflzlfb",
- Context.NONE);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionInnerTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionInnerTests.java
deleted file mode 100644
index 52c8d42c7364b..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionInnerTests.java
+++ /dev/null
@@ -1,26 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.FarmBeatsExtensionInner;
-import org.junit.jupiter.api.Test;
-
-public final class FarmBeatsExtensionInnerTests {
- @Test
- public void testDeserialize() {
- FarmBeatsExtensionInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"targetResourceType\":\"wfndiodjpsl\",\"farmBeatsExtensionId\":\"jdpvwryo\",\"farmBeatsExtensionName\":\"soacctazakl\",\"farmBeatsExtensionVersion\":\"ahbc\",\"publisherId\":\"ffdfdosygexpa\",\"description\":\"akhmsbzjhcrz\",\"extensionCategory\":\"dphlxaolt\",\"extensionAuthLink\":\"trg\",\"extensionApiDocsLink\":\"bpf\",\"detailedInformation\":[{\"apiName\":\"n\",\"customParameters\":[],\"platformParameters\":[],\"apiInputParameters\":[]}]},\"id\":\"rwzoxxjtfelluwf\",\"name\":\"it\",\"type\":\"np\"}")
- .toObject(FarmBeatsExtensionInner.class);
- }
-
- @Test
- public void testSerialize() {
- FarmBeatsExtensionInner model = new FarmBeatsExtensionInner();
- model = BinaryData.fromObject(model).toObject(FarmBeatsExtensionInner.class);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionListResponseTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionListResponseTests.java
deleted file mode 100644
index 6856230039ac1..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionListResponseTests.java
+++ /dev/null
@@ -1,30 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.FarmBeatsExtensionInner;
-import com.azure.resourcemanager.agrifood.models.FarmBeatsExtensionListResponse;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-
-public final class FarmBeatsExtensionListResponseTests {
- @Test
- public void testDeserialize() {
- FarmBeatsExtensionListResponse model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"targetResourceType\":\"uf\",\"farmBeatsExtensionId\":\"zk\",\"farmBeatsExtensionName\":\"dbihanufhfcbj\",\"farmBeatsExtensionVersion\":\"a\",\"publisherId\":\"th\",\"description\":\"hab\",\"extensionCategory\":\"pikxwczbyscnpqxu\",\"extensionAuthLink\":\"vyq\",\"extensionApiDocsLink\":\"wby\",\"detailedInformation\":[]},\"id\":\"xvd\",\"name\":\"mjgr\",\"type\":\"fwvuk\"},{\"properties\":{\"targetResourceType\":\"udccsnhsjc\",\"farmBeatsExtensionId\":\"ejhkry\",\"farmBeatsExtensionName\":\"napczwlokjy\",\"farmBeatsExtensionVersion\":\"kkvnipjox\",\"publisherId\":\"nchgej\",\"description\":\"odmailzyd\",\"extensionCategory\":\"o\",\"extensionAuthLink\":\"yahux\",\"extensionApiDocsLink\":\"pmqnja\",\"detailedInformation\":[]},\"id\":\"xj\",\"name\":\"prozvcputegjvwmf\",\"type\":\"atscmd\"}],\"nextLink\":\"jhulsuuvmkjo\"}")
- .toObject(FarmBeatsExtensionListResponse.class);
- }
-
- @Test
- public void testSerialize() {
- FarmBeatsExtensionListResponse model =
- new FarmBeatsExtensionListResponse()
- .withValue(Arrays.asList(new FarmBeatsExtensionInner(), new FarmBeatsExtensionInner()));
- model = BinaryData.fromObject(model).toObject(FarmBeatsExtensionListResponse.class);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionPropertiesTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionPropertiesTests.java
deleted file mode 100644
index 36f63f60b3423..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionPropertiesTests.java
+++ /dev/null
@@ -1,26 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.FarmBeatsExtensionProperties;
-import org.junit.jupiter.api.Test;
-
-public final class FarmBeatsExtensionPropertiesTests {
- @Test
- public void testDeserialize() {
- FarmBeatsExtensionProperties model =
- BinaryData
- .fromString(
- "{\"targetResourceType\":\"fpjkjlxofp\",\"farmBeatsExtensionId\":\"hpf\",\"farmBeatsExtensionName\":\"ypininm\",\"farmBeatsExtensionVersion\":\"huyb\",\"publisherId\":\"podepoo\",\"description\":\"nuvamiheogna\",\"extensionCategory\":\"zxtheotusivyevcc\",\"extensionAuthLink\":\"ihnhun\",\"extensionApiDocsLink\":\"wjzrnfygxgisp\",\"detailedInformation\":[{\"apiName\":\"zfkufubljofx\",\"customParameters\":[\"fjaeq\",\"hqjbasvmsmj\",\"ulngsntn\"],\"platformParameters\":[\"kzgcwrwcl\",\"xwrljdouskcqvkoc\",\"cjdkwtnhxbnjbi\"],\"unitsSupported\":{\"key\":\"qrglssainqpjwn\",\"values\":[]},\"apiInputParameters\":[\"jfm\",\"pee\"]}]}")
- .toObject(FarmBeatsExtensionProperties.class);
- }
-
- @Test
- public void testSerialize() {
- FarmBeatsExtensionProperties model = new FarmBeatsExtensionProperties();
- model = BinaryData.fromObject(model).toObject(FarmBeatsExtensionProperties.class);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionsListTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionsListTests.java
deleted file mode 100644
index cda5dc0fed154..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsExtensionsListTests.java
+++ /dev/null
@@ -1,75 +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.agrifood.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.agrifood.AgriFoodManager;
-import com.azure.resourcemanager.agrifood.models.FarmBeatsExtension;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class FarmBeatsExtensionsListTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"targetResourceType\":\"iexzfeyue\",\"farmBeatsExtensionId\":\"ibx\",\"farmBeatsExtensionName\":\"wbhqwal\",\"farmBeatsExtensionVersion\":\"zyoxaepdkzjan\",\"publisherId\":\"xrhdwbavxbniwdjs\",\"description\":\"tsdbpgn\",\"extensionCategory\":\"txhp\",\"extensionAuthLink\":\"bzpfzab\",\"extensionApiDocsLink\":\"cuh\",\"detailedInformation\":[]},\"id\":\"tyq\",\"name\":\"klbb\",\"type\":\"vplwzbhv\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AgriFoodManager manager =
- AgriFoodManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .farmBeatsExtensions()
- .list(
- Arrays.asList("kx", "yskpbhen", "tkcxywnytnrsy", "lqidyby"),
- Arrays.asList("zfcl"),
- Arrays.asList("axdbabph", "wrqlfktsthsuco", "mnyyazt", "bt"),
- Arrays.asList("rq", "uedck"),
- 1525019471,
- Context.NONE);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsInnerTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsInnerTests.java
deleted file mode 100644
index 83f8bb439a845..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsInnerTests.java
+++ /dev/null
@@ -1,60 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.FarmBeatsInner;
-import com.azure.resourcemanager.agrifood.models.Identity;
-import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
-import com.azure.resourcemanager.agrifood.models.ResourceIdentityType;
-import com.azure.resourcemanager.agrifood.models.SensorIntegration;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class FarmBeatsInnerTests {
- @Test
- public void testDeserialize() {
- FarmBeatsInner model =
- BinaryData
- .fromString(
- "{\"identity\":{\"principalId\":\"akeqs\",\"tenantId\":\"yb\",\"type\":\"SystemAssigned\"},\"properties\":{\"instanceUri\":\"qytbciq\",\"provisioningState\":\"Updating\",\"sensorIntegration\":{\"enabled\":\"mmnkzsmodmgl\",\"provisioningState\":\"Deleting\"},\"publicNetworkAccess\":\"Hybrid\",\"privateEndpointConnections\":{\"id\":\"utduqktapspwgcu\",\"name\":\"rtumkdosvq\",\"type\":\"hbmdgbbjfdd\"}},\"location\":\"mbmbexppbh\",\"tags\":{\"algbquxigjyjg\":\"rolfpfp\",\"lnerkujysvleju\":\"jaoyfhrtx\"},\"id\":\"fqawrlyxw\",\"name\":\"kcprbnw\",\"type\":\"xgjvtbv\"}")
- .toObject(FarmBeatsInner.class);
- Assertions.assertEquals("mbmbexppbh", model.location());
- Assertions.assertEquals("rolfpfp", model.tags().get("algbquxigjyjg"));
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type());
- Assertions.assertEquals("mmnkzsmodmgl", model.sensorIntegration().enabled());
- Assertions.assertEquals(PublicNetworkAccess.HYBRID, model.publicNetworkAccess());
- }
-
- @Test
- public void testSerialize() {
- FarmBeatsInner model =
- new FarmBeatsInner()
- .withLocation("mbmbexppbh")
- .withTags(mapOf("algbquxigjyjg", "rolfpfp", "lnerkujysvleju", "jaoyfhrtx"))
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
- .withSensorIntegration(new SensorIntegration().withEnabled("mmnkzsmodmgl"))
- .withPublicNetworkAccess(PublicNetworkAccess.HYBRID);
- model = BinaryData.fromObject(model).toObject(FarmBeatsInner.class);
- Assertions.assertEquals("mbmbexppbh", model.location());
- Assertions.assertEquals("rolfpfp", model.tags().get("algbquxigjyjg"));
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type());
- Assertions.assertEquals("mmnkzsmodmgl", model.sensorIntegration().enabled());
- Assertions.assertEquals(PublicNetworkAccess.HYBRID, model.publicNetworkAccess());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsListResponseTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsListResponseTests.java
deleted file mode 100644
index 0b04a43926a4c..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsListResponseTests.java
+++ /dev/null
@@ -1,78 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.FarmBeatsInner;
-import com.azure.resourcemanager.agrifood.models.FarmBeatsListResponse;
-import com.azure.resourcemanager.agrifood.models.Identity;
-import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
-import com.azure.resourcemanager.agrifood.models.ResourceIdentityType;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class FarmBeatsListResponseTests {
- @Test
- public void testDeserialize() {
- FarmBeatsListResponse model =
- BinaryData
- .fromString(
- "{\"value\":[{\"identity\":{\"principalId\":\"clwhijcoejctbz\",\"tenantId\":\"s\",\"type\":\"SystemAssigned\"},\"properties\":{\"instanceUri\":\"kbfkg\",\"provisioningState\":\"Succeeded\",\"publicNetworkAccess\":\"Enabled\"},\"location\":\"ppofmxaxcfjpgdd\",\"tags\":{\"exhd\":\"jjxhvpmo\"},\"id\":\"xibqeojnx\",\"name\":\"bzv\",\"type\":\"dntwndeicbtw\"},{\"identity\":{\"principalId\":\"aoqvuh\",\"tenantId\":\"cffcyddglmj\",\"type\":\"SystemAssigned\"},\"properties\":{\"instanceUri\":\"wpyeicxmqciwqvh\",\"provisioningState\":\"Updating\",\"publicNetworkAccess\":\"Hybrid\"},\"location\":\"dtopbob\",\"tags\":{\"w\":\"hm\",\"a\":\"a\"},\"id\":\"hrzayvvtpgvdf\",\"name\":\"iotkftutqxl\",\"type\":\"gxlefgugnxkrxd\"},{\"identity\":{\"principalId\":\"dt\",\"tenantId\":\"zrvqdr\",\"type\":\"SystemAssigned\"},\"properties\":{\"instanceUri\":\"big\",\"provisioningState\":\"Failed\",\"publicNetworkAccess\":\"Enabled\"},\"location\":\"wska\",\"tags\":{\"rvynhzgpph\":\"tzlcuiywgqywgn\",\"m\":\"cgyncocpecf\",\"bmqj\":\"coofsxlzev\"},\"id\":\"abcypmivk\",\"name\":\"lzu\",\"type\":\"ccfwnfnbacfion\"},{\"identity\":{\"principalId\":\"x\",\"tenantId\":\"qgtz\",\"type\":\"SystemAssigned\"},\"properties\":{\"instanceUri\":\"bqqwxrj\",\"provisioningState\":\"Deleting\",\"publicNetworkAccess\":\"Hybrid\"},\"location\":\"sub\",\"tags\":{\"ochcbonqvpkvl\":\"jampmngnzscxaqw\",\"ase\":\"xnj\"},\"id\":\"pheoflokeyy\",\"name\":\"enjbdlwtgrhp\",\"type\":\"jp\"}],\"nextLink\":\"masxazjpqyegu\"}")
- .toObject(FarmBeatsListResponse.class);
- Assertions.assertEquals("ppofmxaxcfjpgdd", model.value().get(0).location());
- Assertions.assertEquals("jjxhvpmo", model.value().get(0).tags().get("exhd"));
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type());
- Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).publicNetworkAccess());
- }
-
- @Test
- public void testSerialize() {
- FarmBeatsListResponse model =
- new FarmBeatsListResponse()
- .withValue(
- Arrays
- .asList(
- new FarmBeatsInner()
- .withLocation("ppofmxaxcfjpgdd")
- .withTags(mapOf("exhd", "jjxhvpmo"))
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
- .withPublicNetworkAccess(PublicNetworkAccess.ENABLED),
- new FarmBeatsInner()
- .withLocation("dtopbob")
- .withTags(mapOf("w", "hm", "a", "a"))
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
- .withPublicNetworkAccess(PublicNetworkAccess.HYBRID),
- new FarmBeatsInner()
- .withLocation("wska")
- .withTags(
- mapOf("rvynhzgpph", "tzlcuiywgqywgn", "m", "cgyncocpecf", "bmqj", "coofsxlzev"))
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
- .withPublicNetworkAccess(PublicNetworkAccess.ENABLED),
- new FarmBeatsInner()
- .withLocation("sub")
- .withTags(mapOf("ochcbonqvpkvl", "jampmngnzscxaqw", "ase", "xnj"))
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
- .withPublicNetworkAccess(PublicNetworkAccess.HYBRID)));
- model = BinaryData.fromObject(model).toObject(FarmBeatsListResponse.class);
- Assertions.assertEquals("ppofmxaxcfjpgdd", model.value().get(0).location());
- Assertions.assertEquals("jjxhvpmo", model.value().get(0).tags().get("exhd"));
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type());
- Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).publicNetworkAccess());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsModelsListByResourceGroupTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsModelsListByResourceGroupTests.java
deleted file mode 100644
index c1efc056924ed..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsModelsListByResourceGroupTests.java
+++ /dev/null
@@ -1,75 +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.agrifood.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.agrifood.AgriFoodManager;
-import com.azure.resourcemanager.agrifood.models.FarmBeats;
-import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
-import com.azure.resourcemanager.agrifood.models.ResourceIdentityType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class FarmBeatsModelsListByResourceGroupTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"identity\":{\"principalId\":\"jfcn\",\"tenantId\":\"k\",\"type\":\"SystemAssigned\"},\"properties\":{\"instanceUri\":\"bttk\",\"provisioningState\":\"Creating\",\"sensorIntegration\":{\"enabled\":\"nv\",\"provisioningState\":\"Creating\"},\"publicNetworkAccess\":\"Hybrid\",\"privateEndpointConnections\":{\"id\":\"lfplp\",\"name\":\"oxuscrpabgyepsbj\",\"type\":\"azqugxywpmueefj\"}},\"location\":\"wfqkquj\",\"tags\":{\"xtccmg\":\"uyonobglaoc\",\"wfudwpzntxhdzhl\":\"udxytlmoyrx\",\"hckfrlhrx\":\"qj\",\"ca\":\"bkyvp\"},\"id\":\"uzbpzkafku\",\"name\":\"b\",\"type\":\"rnwb\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AgriFoodManager manager =
- AgriFoodManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.farmBeatsModels().listByResourceGroup("rupqsxvnmicy", 560100496, "ceoveilovno", Context.NONE);
-
- Assertions.assertEquals("wfqkquj", response.iterator().next().location());
- Assertions.assertEquals("uyonobglaoc", response.iterator().next().tags().get("xtccmg"));
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type());
- Assertions.assertEquals("nv", response.iterator().next().sensorIntegration().enabled());
- Assertions.assertEquals(PublicNetworkAccess.HYBRID, response.iterator().next().publicNetworkAccess());
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsModelsListTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsModelsListTests.java
deleted file mode 100644
index 0de2ce7a41cb9..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsModelsListTests.java
+++ /dev/null
@@ -1,74 +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.agrifood.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.agrifood.AgriFoodManager;
-import com.azure.resourcemanager.agrifood.models.FarmBeats;
-import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
-import com.azure.resourcemanager.agrifood.models.ResourceIdentityType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class FarmBeatsModelsListTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"identity\":{\"principalId\":\"svmkfssxquk\",\"tenantId\":\"plgmgsxnk\",\"type\":\"SystemAssigned\"},\"properties\":{\"instanceUri\":\"slpvlop\",\"provisioningState\":\"Failed\",\"sensorIntegration\":{\"enabled\":\"hxpkd\",\"provisioningState\":\"Updating\"},\"publicNetworkAccess\":\"Hybrid\",\"privateEndpointConnections\":{\"id\":\"a\",\"name\":\"m\",\"type\":\"yqupedeojnabckh\"}},\"location\":\"mtxpsiebtfh\",\"tags\":{\"qmhjjdhtld\":\"sapskr\"},\"id\":\"kyzxuutk\",\"name\":\"cwscwsvlx\",\"type\":\"togt\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AgriFoodManager manager =
- AgriFoodManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.farmBeatsModels().list(1239569697, "u", Context.NONE);
-
- Assertions.assertEquals("mtxpsiebtfh", response.iterator().next().location());
- Assertions.assertEquals("sapskr", response.iterator().next().tags().get("qmhjjdhtld"));
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type());
- Assertions.assertEquals("hxpkd", response.iterator().next().sensorIntegration().enabled());
- Assertions.assertEquals(PublicNetworkAccess.HYBRID, response.iterator().next().publicNetworkAccess());
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsPropertiesInnerTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsPropertiesInnerTests.java
deleted file mode 100644
index bd735b393032f..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsPropertiesInnerTests.java
+++ /dev/null
@@ -1,36 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.FarmBeatsPropertiesInner;
-import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
-import com.azure.resourcemanager.agrifood.models.SensorIntegration;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class FarmBeatsPropertiesInnerTests {
- @Test
- public void testDeserialize() {
- FarmBeatsPropertiesInner model =
- BinaryData
- .fromString(
- "{\"instanceUri\":\"nguitnwuizgazxu\",\"provisioningState\":\"Creating\",\"sensorIntegration\":{\"enabled\":\"kyfi\",\"provisioningState\":\"Updating\"},\"publicNetworkAccess\":\"Hybrid\",\"privateEndpointConnections\":{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"htymw\",\"name\":\"sdkf\",\"type\":\"hwxmnteiwa\"}}")
- .toObject(FarmBeatsPropertiesInner.class);
- Assertions.assertEquals("kyfi", model.sensorIntegration().enabled());
- Assertions.assertEquals(PublicNetworkAccess.HYBRID, model.publicNetworkAccess());
- }
-
- @Test
- public void testSerialize() {
- FarmBeatsPropertiesInner model =
- new FarmBeatsPropertiesInner()
- .withSensorIntegration(new SensorIntegration().withEnabled("kyfi"))
- .withPublicNetworkAccess(PublicNetworkAccess.HYBRID);
- model = BinaryData.fromObject(model).toObject(FarmBeatsPropertiesInner.class);
- Assertions.assertEquals("kyfi", model.sensorIntegration().enabled());
- Assertions.assertEquals(PublicNetworkAccess.HYBRID, model.publicNetworkAccess());
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsUpdatePropertiesTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsUpdatePropertiesTests.java
deleted file mode 100644
index ac5b31a3b0c52..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsUpdatePropertiesTests.java
+++ /dev/null
@@ -1,36 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.models.FarmBeatsUpdateProperties;
-import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
-import com.azure.resourcemanager.agrifood.models.SensorIntegration;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class FarmBeatsUpdatePropertiesTests {
- @Test
- public void testDeserialize() {
- FarmBeatsUpdateProperties model =
- BinaryData
- .fromString(
- "{\"sensorIntegration\":{\"enabled\":\"gmaajrm\",\"provisioningState\":\"Succeeded\"},\"publicNetworkAccess\":\"Hybrid\"}")
- .toObject(FarmBeatsUpdateProperties.class);
- Assertions.assertEquals("gmaajrm", model.sensorIntegration().enabled());
- Assertions.assertEquals(PublicNetworkAccess.HYBRID, model.publicNetworkAccess());
- }
-
- @Test
- public void testSerialize() {
- FarmBeatsUpdateProperties model =
- new FarmBeatsUpdateProperties()
- .withSensorIntegration(new SensorIntegration().withEnabled("gmaajrm"))
- .withPublicNetworkAccess(PublicNetworkAccess.HYBRID);
- model = BinaryData.fromObject(model).toObject(FarmBeatsUpdateProperties.class);
- Assertions.assertEquals("gmaajrm", model.sensorIntegration().enabled());
- Assertions.assertEquals(PublicNetworkAccess.HYBRID, model.publicNetworkAccess());
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsUpdateRequestModelTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsUpdateRequestModelTests.java
deleted file mode 100644
index 5a9b758ffd5b8..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/FarmBeatsUpdateRequestModelTests.java
+++ /dev/null
@@ -1,63 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.models.FarmBeatsUpdateProperties;
-import com.azure.resourcemanager.agrifood.models.FarmBeatsUpdateRequestModel;
-import com.azure.resourcemanager.agrifood.models.Identity;
-import com.azure.resourcemanager.agrifood.models.PublicNetworkAccess;
-import com.azure.resourcemanager.agrifood.models.ResourceIdentityType;
-import com.azure.resourcemanager.agrifood.models.SensorIntegration;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class FarmBeatsUpdateRequestModelTests {
- @Test
- public void testDeserialize() {
- FarmBeatsUpdateRequestModel model =
- BinaryData
- .fromString(
- "{\"location\":\"ysh\",\"identity\":{\"principalId\":\"afbljjgpbtoqcjmk\",\"tenantId\":\"a\",\"type\":\"SystemAssigned\"},\"properties\":{\"sensorIntegration\":{\"enabled\":\"qajzyulpkudjkr\",\"provisioningState\":\"Creating\"},\"publicNetworkAccess\":\"Hybrid\"},\"tags\":{\"xzlocxscp\":\"pgzgq\",\"j\":\"ierhhbcsglummaj\",\"jionpimexgstxgc\":\"odxobnbdxkqpxok\"}}")
- .toObject(FarmBeatsUpdateRequestModel.class);
- Assertions.assertEquals("ysh", model.location());
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type());
- Assertions.assertEquals("qajzyulpkudjkr", model.properties().sensorIntegration().enabled());
- Assertions.assertEquals(PublicNetworkAccess.HYBRID, model.properties().publicNetworkAccess());
- Assertions.assertEquals("pgzgq", model.tags().get("xzlocxscp"));
- }
-
- @Test
- public void testSerialize() {
- FarmBeatsUpdateRequestModel model =
- new FarmBeatsUpdateRequestModel()
- .withLocation("ysh")
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
- .withProperties(
- new FarmBeatsUpdateProperties()
- .withSensorIntegration(new SensorIntegration().withEnabled("qajzyulpkudjkr"))
- .withPublicNetworkAccess(PublicNetworkAccess.HYBRID))
- .withTags(mapOf("xzlocxscp", "pgzgq", "j", "ierhhbcsglummaj", "jionpimexgstxgc", "odxobnbdxkqpxok"));
- model = BinaryData.fromObject(model).toObject(FarmBeatsUpdateRequestModel.class);
- Assertions.assertEquals("ysh", model.location());
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type());
- Assertions.assertEquals("qajzyulpkudjkr", model.properties().sensorIntegration().enabled());
- Assertions.assertEquals(PublicNetworkAccess.HYBRID, model.properties().publicNetworkAccess());
- Assertions.assertEquals("pgzgq", model.tags().get("xzlocxscp"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/IdentityTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/IdentityTests.java
deleted file mode 100644
index 716bc4dab21c8..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/IdentityTests.java
+++ /dev/null
@@ -1,29 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.models.Identity;
-import com.azure.resourcemanager.agrifood.models.ResourceIdentityType;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class IdentityTests {
- @Test
- public void testDeserialize() {
- Identity model =
- BinaryData
- .fromString("{\"principalId\":\"sszdnru\",\"tenantId\":\"guhmuouqfpr\",\"type\":\"SystemAssigned\"}")
- .toObject(Identity.class);
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type());
- }
-
- @Test
- public void testSerialize() {
- Identity model = new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED);
- model = BinaryData.fromObject(model).toObject(Identity.class);
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type());
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationDisplayTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationDisplayTests.java
deleted file mode 100644
index 0f5c29c23e29d..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationDisplayTests.java
+++ /dev/null
@@ -1,26 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.models.OperationDisplay;
-import org.junit.jupiter.api.Test;
-
-public final class OperationDisplayTests {
- @Test
- public void testDeserialize() {
- OperationDisplay model =
- BinaryData
- .fromString(
- "{\"provider\":\"b\",\"resource\":\"czvyifq\",\"operation\":\"kdvjsll\",\"description\":\"vvdfwatkpnpul\"}")
- .toObject(OperationDisplay.class);
- }
-
- @Test
- public void testSerialize() {
- OperationDisplay model = new OperationDisplay();
- model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationInnerTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationInnerTests.java
deleted file mode 100644
index 6dae95ad567db..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationInnerTests.java
+++ /dev/null
@@ -1,27 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.OperationInner;
-import com.azure.resourcemanager.agrifood.models.OperationDisplay;
-import org.junit.jupiter.api.Test;
-
-public final class OperationInnerTests {
- @Test
- public void testDeserialize() {
- OperationInner model =
- BinaryData
- .fromString(
- "{\"name\":\"xbezyiuokktwh\",\"isDataAction\":false,\"display\":{\"provider\":\"ywqsmbsurexim\",\"resource\":\"yocf\",\"operation\":\"ksymd\",\"description\":\"stkiiuxhqyud\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}")
- .toObject(OperationInner.class);
- }
-
- @Test
- public void testSerialize() {
- OperationInner model = new OperationInner().withDisplay(new OperationDisplay());
- model = BinaryData.fromObject(model).toObject(OperationInner.class);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationListResultTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationListResultTests.java
deleted file mode 100644
index f8d1b3e231ca0..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationListResultTests.java
+++ /dev/null
@@ -1,26 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.models.OperationListResult;
-import org.junit.jupiter.api.Test;
-
-public final class OperationListResultTests {
- @Test
- public void testDeserialize() {
- OperationListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"tyfsoppusuesn\",\"isDataAction\":false,\"display\":{\"provider\":\"bavo\",\"resource\":\"zdmohctbqvu\",\"operation\":\"xdn\",\"description\":\"vo\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"gwdkcglhsl\",\"isDataAction\":true,\"display\":{\"provider\":\"ggd\",\"resource\":\"ixhbkuofqweykhm\",\"operation\":\"evfyexfwhybcib\",\"description\":\"vdcsitynn\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"tehfiqscjeypvh\",\"isDataAction\":true,\"display\":{\"provider\":\"q\",\"resource\":\"jrefovgmkqsle\",\"operation\":\"vxyqjpkcattpngjc\",\"description\":\"czsqpjhvm\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"sounqecanoaeu\",\"isDataAction\":false,\"display\":{\"provider\":\"ltrpmopj\",\"resource\":\"matuok\",\"operation\":\"fu\",\"description\":\"aodsfcpkv\"},\"origin\":\"user\",\"actionType\":\"Internal\"}],\"nextLink\":\"zmyzydagf\"}")
- .toObject(OperationListResult.class);
- }
-
- @Test
- public void testSerialize() {
- OperationListResult model = new OperationListResult();
- model = BinaryData.fromObject(model).toObject(OperationListResult.class);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationsListTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationsListTests.java
deleted file mode 100644
index d08f1b52bd321..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/OperationsListTests.java
+++ /dev/null
@@ -1,65 +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.agrifood.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.agrifood.AgriFoodManager;
-import com.azure.resourcemanager.agrifood.models.Operation;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationsListTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"name\":\"hhseyv\",\"isDataAction\":true,\"display\":{\"provider\":\"slhs\",\"resource\":\"deemao\",\"operation\":\"xagkvtmelmqkrh\",\"description\":\"vljua\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AgriFoodManager manager =
- AgriFoodManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.operations().list(Context.NONE);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionInnerTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionInnerTests.java
deleted file mode 100644
index efa7d8b2e32d3..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionInnerTests.java
+++ /dev/null
@@ -1,47 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.PrivateEndpointConnectionInner;
-import com.azure.resourcemanager.agrifood.models.PrivateEndpoint;
-import com.azure.resourcemanager.agrifood.models.PrivateEndpointServiceConnectionStatus;
-import com.azure.resourcemanager.agrifood.models.PrivateLinkServiceConnectionState;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class PrivateEndpointConnectionInnerTests {
- @Test
- public void testDeserialize() {
- PrivateEndpointConnectionInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"privateEndpoint\":{\"id\":\"zidnsezcxtbzsgfy\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ewmdw\",\"actionsRequired\":\"eiachboosflnr\"},\"provisioningState\":\"Creating\"},\"id\":\"pteehzzv\",\"name\":\"pyqr\",\"type\":\"mzinpvswjdk\"}")
- .toObject(PrivateEndpointConnectionInner.class);
- Assertions
- .assertEquals(
- PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("ewmdw", model.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("eiachboosflnr", model.privateLinkServiceConnectionState().actionsRequired());
- }
-
- @Test
- public void testSerialize() {
- PrivateEndpointConnectionInner model =
- new PrivateEndpointConnectionInner()
- .withPrivateEndpoint(new PrivateEndpoint())
- .withPrivateLinkServiceConnectionState(
- new PrivateLinkServiceConnectionState()
- .withStatus(PrivateEndpointServiceConnectionStatus.PENDING)
- .withDescription("ewmdw")
- .withActionsRequired("eiachboosflnr"));
- model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class);
- Assertions
- .assertEquals(
- PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("ewmdw", model.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("eiachboosflnr", model.privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionListResultTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionListResultTests.java
deleted file mode 100644
index 9437c1217018c..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionListResultTests.java
+++ /dev/null
@@ -1,35 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.PrivateEndpointConnectionInner;
-import com.azure.resourcemanager.agrifood.models.PrivateEndpointConnectionListResult;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-
-public final class PrivateEndpointConnectionListResultTests {
- @Test
- public void testDeserialize() {
- PrivateEndpointConnectionListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"ruwiqzbqjvsov\",\"name\":\"yokacspkw\",\"type\":\"hzdobpxjmflbvvnc\"},{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"wwzjuqkhrsajiwku\",\"name\":\"foskghsauuimj\",\"type\":\"vxieduugidyj\"},{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"osvexcsonpclhoc\",\"name\":\"hslkevleggzf\",\"type\":\"u\"}]}")
- .toObject(PrivateEndpointConnectionListResult.class);
- }
-
- @Test
- public void testSerialize() {
- PrivateEndpointConnectionListResult model =
- new PrivateEndpointConnectionListResult()
- .withValue(
- Arrays
- .asList(
- new PrivateEndpointConnectionInner(),
- new PrivateEndpointConnectionInner(),
- new PrivateEndpointConnectionInner()));
- model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionPropertiesTests.java
deleted file mode 100644
index 4f3c5c97898af..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionPropertiesTests.java
+++ /dev/null
@@ -1,47 +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.agrifood.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.agrifood.fluent.models.PrivateEndpointConnectionProperties;
-import com.azure.resourcemanager.agrifood.models.PrivateEndpoint;
-import com.azure.resourcemanager.agrifood.models.PrivateEndpointServiceConnectionStatus;
-import com.azure.resourcemanager.agrifood.models.PrivateLinkServiceConnectionState;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class PrivateEndpointConnectionPropertiesTests {
- @Test
- public void testDeserialize() {
- PrivateEndpointConnectionProperties model =
- BinaryData
- .fromString(
- "{\"privateEndpoint\":{\"id\":\"oodqxhcrm\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"t\",\"actionsRequired\":\"whdsoifiyip\"},\"provisioningState\":\"Creating\"}")
- .toObject(PrivateEndpointConnectionProperties.class);
- Assertions
- .assertEquals(
- PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("t", model.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("whdsoifiyip", model.privateLinkServiceConnectionState().actionsRequired());
- }
-
- @Test
- public void testSerialize() {
- PrivateEndpointConnectionProperties model =
- new PrivateEndpointConnectionProperties()
- .withPrivateEndpoint(new PrivateEndpoint())
- .withPrivateLinkServiceConnectionState(
- new PrivateLinkServiceConnectionState()
- .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
- .withDescription("t")
- .withActionsRequired("whdsoifiyip"));
- model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class);
- Assertions
- .assertEquals(
- PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("t", model.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("whdsoifiyip", model.privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionsDeleteTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionsDeleteTests.java
deleted file mode 100644
index 323517e57702c..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionsDeleteTests.java
+++ /dev/null
@@ -1,62 +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.agrifood.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.agrifood.AgriFoodManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class PrivateEndpointConnectionsDeleteTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AgriFoodManager manager =
- AgriFoodManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.privateEndpointConnections().delete("c", "hmdua", "aex", Context.NONE);
- }
-}
diff --git a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionsListByResourceTests.java b/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionsListByResourceTests.java
deleted file mode 100644
index d289a37dac473..0000000000000
--- a/sdk/agrifood/azure-resourcemanager-agrifood/src/test/java/com/azure/resourcemanager/agrifood/generated/PrivateEndpointConnectionsListByResourceTests.java
+++ /dev/null
@@ -1,79 +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.agrifood.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.agrifood.AgriFoodManager;
-import com.azure.resourcemanager.agrifood.models.PrivateEndpointConnection;
-import com.azure.resourcemanager.agrifood.models.PrivateEndpointServiceConnectionStatus;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class PrivateEndpointConnectionsListByResourceTests {
- @Test
- public void testListByResource() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"sgwbnbbeld\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"baliourqhakauha\",\"actionsRequired\":\"sfwxosowzxc\"},\"provisioningState\":\"Succeeded\"},\"id\":\"jooxdjebw\",\"name\":\"ucww\",\"type\":\"vo\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AgriFoodManager manager =
- AgriFoodManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable