Skip to content

Commit

Permalink
CodeGen from PR 27231 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 71fecce55180a23d719a26e565cf591aea9daa9d into e8231e95a900521c54c2214b344bd4f80adc4225
  • Loading branch information
SDKAuto committed Jan 3, 2024
1 parent b984d70 commit ae2397d
Show file tree
Hide file tree
Showing 77 changed files with 1,228 additions and 2,012 deletions.
4 changes: 3 additions & 1 deletion sdk/nginx/azure-resourcemanager-nginx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2024-01-03)

- Azure Resource Manager Nginx client library for Java. This package contains Microsoft Azure SDK for Nginx Management SDK. Package tag package-2023-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

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

Azure Resource Manager Nginx client library for Java.

This package contains Microsoft Azure SDK for Nginx Management SDK. Package tag package-2023-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for Nginx Management SDK. Package tag package-2023-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-nginx</artifactId>
<version>1.0.0</version>
<version>1.1.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
54 changes: 39 additions & 15 deletions sdk/nginx/azure-resourcemanager-nginx/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

## Configurations

- [Analysis](#configurations_analysis)
- [CreateOrUpdate](#configurations_createorupdate)
- [Delete](#configurations_delete)
- [Get](#configurations_get)
Expand All @@ -35,7 +36,7 @@
*/
public final class CertificatesCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Certificates_CreateOrUpdate.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Certificates_CreateOrUpdate.json
*/
/**
* Sample code: Certificates_CreateOrUpdate.
Expand All @@ -56,7 +57,7 @@ public final class CertificatesCreateOrUpdateSamples {
*/
public final class CertificatesDeleteSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Certificates_Delete.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Certificates_Delete.json
*/
/**
* Sample code: Certificates_Delete.
Expand All @@ -77,7 +78,7 @@ public final class CertificatesDeleteSamples {
*/
public final class CertificatesGetSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Certificates_Get.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Certificates_Get.json
*/
/**
* Sample code: Certificates_Get.
Expand All @@ -98,7 +99,7 @@ public final class CertificatesGetSamples {
*/
public final class CertificatesListSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Certificates_List.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Certificates_List.json
*/
/**
* Sample code: Certificates_List.
Expand All @@ -111,6 +112,29 @@ public final class CertificatesListSamples {
}
```

### Configurations_Analysis

```java
import com.azure.resourcemanager.nginx.models.AnalysisCreate;

/**
* Samples for Configurations Analysis.
*/
public final class ConfigurationsAnalysisSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Configurations_Analysis.json
*/
/**
* Sample code: Configurations_Analysis.
*
* @param manager Entry point to NginxManager.
*/
public static void configurationsAnalysis(com.azure.resourcemanager.nginx.NginxManager manager) {
manager.configurations().analysisWithResponse("myResourceGroup", "myDeployment", "default", null, com.azure.core.util.Context.NONE);
}
}
```

### Configurations_CreateOrUpdate

```java
Expand All @@ -119,7 +143,7 @@ public final class CertificatesListSamples {
*/
public final class ConfigurationsCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Configurations_CreateOrUpdate.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Configurations_CreateOrUpdate.json
*/
/**
* Sample code: Configurations_CreateOrUpdate.
Expand All @@ -140,7 +164,7 @@ public final class ConfigurationsCreateOrUpdateSamples {
*/
public final class ConfigurationsDeleteSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Configurations_Delete.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Configurations_Delete.json
*/
/**
* Sample code: Configurations_Delete.
Expand All @@ -161,7 +185,7 @@ public final class ConfigurationsDeleteSamples {
*/
public final class ConfigurationsGetSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Configurations_Get.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Configurations_Get.json
*/
/**
* Sample code: Configurations_Get.
Expand All @@ -182,7 +206,7 @@ public final class ConfigurationsGetSamples {
*/
public final class ConfigurationsListSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Configurations_List.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Configurations_List.json
*/
/**
* Sample code: Configurations_List.
Expand All @@ -203,7 +227,7 @@ public final class ConfigurationsListSamples {
*/
public final class DeploymentsCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_Create.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Deployments_Create.json
*/
/**
* Sample code: Deployments_Create.
Expand All @@ -224,7 +248,7 @@ public final class DeploymentsCreateOrUpdateSamples {
*/
public final class DeploymentsDeleteSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_Delete.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Deployments_Delete.json
*/
/**
* Sample code: Deployments_Delete.
Expand All @@ -245,7 +269,7 @@ public final class DeploymentsDeleteSamples {
*/
public final class DeploymentsGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_Get.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Deployments_Get.json
*/
/**
* Sample code: Deployments_Get.
Expand All @@ -266,7 +290,7 @@ public final class DeploymentsGetByResourceGroupSamples {
*/
public final class DeploymentsListSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_List.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Deployments_List.json
*/
/**
* Sample code: Deployments_List.
Expand All @@ -287,7 +311,7 @@ public final class DeploymentsListSamples {
*/
public final class DeploymentsListByResourceGroupSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_ListByResourceGroup.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Deployments_ListByResourceGroup.json
*/
/**
* Sample code: Deployments_ListByResourceGroup.
Expand All @@ -310,7 +334,7 @@ import com.azure.resourcemanager.nginx.models.NginxDeployment;
*/
public final class DeploymentsUpdateSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_Update.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Deployments_Update.json
*/
/**
* Sample code: Deployments_Update.
Expand All @@ -332,7 +356,7 @@ public final class DeploymentsUpdateSamples {
*/
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Operations_List.json
* x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-09-01/examples/Operations_List.json
*/
/**
* Sample code: Operations_List.
Expand Down
3 changes: 2 additions & 1 deletion sdk/nginx/azure-resourcemanager-nginx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

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

<licenses>
Expand All @@ -45,6 +45,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public NginxManager authenticate(TokenCredential credential, AzureProfile profil

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.nginx").append("/")
.append("1.0.0");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.nginx.fluent.models.AnalysisResultInner;
import com.azure.resourcemanager.nginx.fluent.models.NginxConfigurationInner;
import com.azure.resourcemanager.nginx.models.AnalysisCreate;

/**
* An instance of this class provides access to all the operations defined in ConfigurationsClient.
Expand Down Expand Up @@ -205,4 +207,37 @@ SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String deploymentName, String configurationName, Context context);

/**
* Analyze an NGINX configuration without applying it to the NGINXaaS deployment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @param body The NGINX configuration to analyze.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response body for an analysis request along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<AnalysisResultInner> analysisWithResponse(String resourceGroupName, String deploymentName,
String configurationName, AnalysisCreate body, Context context);

/**
* Analyze an NGINX configuration without applying it to the NGINXaaS deployment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response body for an analysis request.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
AnalysisResultInner analysis(String resourceGroupName, String deploymentName, String configurationName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
public interface OperationsClient {
/**
* List all operations provided by Nginx.NginxPlus for the 2023-04-01 api version.
* List all operations provided by Nginx.NginxPlus for the 2023-09-01 api version.
*
* @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.
Expand All @@ -26,7 +26,7 @@ public interface OperationsClient {
PagedIterable<OperationResultInner> list();

/**
* List all operations provided by Nginx.NginxPlus for the 2023-04-01 api version.
* List all operations provided by Nginx.NginxPlus for the 2023-09-01 api version.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.nginx.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.nginx.models.AnalysisResultData;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The response body for an analysis request. Contains the status of the analysis and any errors.
*/
@Fluent
public final class AnalysisResultInner {
/*
* The status of the analysis.
*/
@JsonProperty(value = "status", required = true)
private String status;

/*
* The data property.
*/
@JsonProperty(value = "data")
private AnalysisResultData data;

/**
* Creates an instance of AnalysisResultInner class.
*/
public AnalysisResultInner() {
}

/**
* Get the status property: The status of the analysis.
*
* @return the status value.
*/
public String status() {
return this.status;
}

/**
* Set the status property: The status of the analysis.
*
* @param status the status value to set.
* @return the AnalysisResultInner object itself.
*/
public AnalysisResultInner withStatus(String status) {
this.status = status;
return this;
}

/**
* Get the data property: The data property.
*
* @return the data value.
*/
public AnalysisResultData data() {
return this.data;
}

/**
* Set the data property: The data property.
*
* @param data the data value to set.
* @return the AnalysisResultInner object itself.
*/
public AnalysisResultInner withData(AnalysisResultData data) {
this.data = data;
return this;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (status() == null) {
throw LOGGER.logExceptionAsError(
new IllegalArgumentException("Missing required property status in model AnalysisResultInner"));
}
if (data() != null) {
data().validate();
}
}

private static final ClientLogger LOGGER = new ClientLogger(AnalysisResultInner.class);
}
Loading

0 comments on commit ae2397d

Please sign in to comment.