Skip to content

Commit

Permalink
CodeGen from PR 23839 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
add network when updating server (Azure#23839)

* add network when updating server

* fix linter
  • Loading branch information
SDKAuto committed May 9, 2023
1 parent 47c6278 commit 467679d
Show file tree
Hide file tree
Showing 175 changed files with 3,921 additions and 4,265 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2023-05-09)

- Azure Resource Manager MySql client library for Java. This package contains Microsoft Azure SDK for MySql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2022-09-30-preview. 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager MySql client library for Java.

This package contains Microsoft Azure SDK for MySql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2021-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for MySql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2022-09-30-preview. 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-mysqlflexibleserver</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for MySql Management</name>
<description>This package contains Microsoft Azure SDK for MySql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2021-12-01-preview.</description>
<description>This package contains Microsoft Azure SDK for MySql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2022-09-30-preview.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.MySqlManagementClient;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.AzureADAdministratorsImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.BackupAndExportsImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.BackupsImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.CheckNameAvailabilitiesImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.CheckNameAvailabilityWithoutLocationsImpl;
Expand All @@ -40,6 +41,7 @@
import com.azure.resourcemanager.mysqlflexibleserver.implementation.ReplicasImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.ServersImpl;
import com.azure.resourcemanager.mysqlflexibleserver.models.AzureADAdministrators;
import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExports;
import com.azure.resourcemanager.mysqlflexibleserver.models.Backups;
import com.azure.resourcemanager.mysqlflexibleserver.models.CheckNameAvailabilities;
import com.azure.resourcemanager.mysqlflexibleserver.models.CheckNameAvailabilityWithoutLocations;
Expand All @@ -66,8 +68,12 @@
* configurations with new business model.
*/
public final class MySqlManager {
private AzureADAdministrators azureADAdministrators;

private Backups backups;

private BackupAndExports backupAndExports;

private Configurations configurations;

private Databases databases;
Expand All @@ -92,8 +98,6 @@ public final class MySqlManager {

private Operations operations;

private AzureADAdministrators azureADAdministrators;

private final MySqlManagementClient clientObject;

private MySqlManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Expand Down Expand Up @@ -259,7 +263,7 @@ public MySqlManager authenticate(TokenCredential credential, AzureProfile profil
.append("-")
.append("com.azure.resourcemanager.mysqlflexibleserver")
.append("/")
.append("1.0.0-beta.3");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -316,6 +320,18 @@ public MySqlManager authenticate(TokenCredential credential, AzureProfile profil
}
}

/**
* Gets the resource collection API of AzureADAdministrators. It manages AzureADAdministrator.
*
* @return Resource collection API of AzureADAdministrators.
*/
public AzureADAdministrators azureADAdministrators() {
if (this.azureADAdministrators == null) {
this.azureADAdministrators = new AzureADAdministratorsImpl(clientObject.getAzureADAdministrators(), this);
}
return azureADAdministrators;
}

/**
* Gets the resource collection API of Backups.
*
Expand All @@ -329,7 +345,19 @@ public Backups backups() {
}

/**
* Gets the resource collection API of Configurations.
* Gets the resource collection API of BackupAndExports.
*
* @return Resource collection API of BackupAndExports.
*/
public BackupAndExports backupAndExports() {
if (this.backupAndExports == null) {
this.backupAndExports = new BackupAndExportsImpl(clientObject.getBackupAndExports(), this);
}
return backupAndExports;
}

/**
* Gets the resource collection API of Configurations. It manages Configuration.
*
* @return Resource collection API of Configurations.
*/
Expand Down Expand Up @@ -478,18 +506,6 @@ public Operations operations() {
return operations;
}

/**
* Gets the resource collection API of AzureADAdministrators. It manages AzureADAdministrator.
*
* @return Resource collection API of AzureADAdministrators.
*/
public AzureADAdministrators azureADAdministrators() {
if (this.azureADAdministrators == null) {
this.azureADAdministrators = new AzureADAdministratorsImpl(clientObject.getAzureADAdministrators(), this);
}
return azureADAdministrators;
}

/**
* @return Wrapped service client MySqlManagementClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.mysqlflexibleserver.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.BackupAndExportResponseInner;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ValidateBackupResponseInner;
import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportRequest;

/** An instance of this class provides access to all the operations defined in BackupAndExportsClient. */
public interface BackupAndExportsClient {
/**
* Exports the backup of the given server by creating a backup if not existing.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param parameters The required parameters for creating and exporting backup of the given server.
* @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 SyncPoller} for polling of represents BackupAndExport API Response.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<BackupAndExportResponseInner>, BackupAndExportResponseInner> beginCreate(
String resourceGroupName, String serverName, BackupAndExportRequest parameters);

/**
* Exports the backup of the given server by creating a backup if not existing.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param parameters The required parameters for creating and exporting backup of the given server.
* @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 SyncPoller} for polling of represents BackupAndExport API Response.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<BackupAndExportResponseInner>, BackupAndExportResponseInner> beginCreate(
String resourceGroupName, String serverName, BackupAndExportRequest parameters, Context context);

/**
* Exports the backup of the given server by creating a backup if not existing.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param parameters The required parameters for creating and exporting backup of the given server.
* @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 represents BackupAndExport API Response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
BackupAndExportResponseInner create(String resourceGroupName, String serverName, BackupAndExportRequest parameters);

/**
* Exports the backup of the given server by creating a backup if not existing.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param parameters The required parameters for creating and exporting backup of the given server.
* @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 represents BackupAndExport API Response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
BackupAndExportResponseInner create(
String resourceGroupName, String serverName, BackupAndExportRequest parameters, Context context);

/**
* Validates if backup can be performed for given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @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 represents ValidateBackup API Response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ValidateBackupResponseInner> validateBackupWithResponse(
String resourceGroupName, String serverName, Context context);

/**
* Validates if backup can be performed for given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @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 represents ValidateBackup API Response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ValidateBackupResponseInner validateBackup(String resourceGroupName, String serverName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,80 @@

/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */
public interface ConfigurationsClient {
/**
* Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param configurationName The name of the server configuration.
* @param parameters The required parameters for updating a server configuration.
* @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 SyncPoller} for polling of represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ConfigurationInner>, ConfigurationInner> beginCreateOrUpdate(
String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);

/**
* Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param configurationName The name of the server configuration.
* @param parameters The required parameters for updating a server configuration.
* @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 SyncPoller} for polling of represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ConfigurationInner>, ConfigurationInner> beginCreateOrUpdate(
String resourceGroupName,
String serverName,
String configurationName,
ConfigurationInner parameters,
Context context);

/**
* Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param configurationName The name of the server configuration.
* @param parameters The required parameters for updating a server configuration.
* @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 represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ConfigurationInner createOrUpdate(
String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);

/**
* Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param configurationName The name of the server configuration.
* @param parameters The required parameters for updating a server configuration.
* @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 represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ConfigurationInner createOrUpdate(
String resourceGroupName,
String serverName,
String configurationName,
ConfigurationInner parameters,
Context context);

/**
* Updates a configuration of a server.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ public interface MySqlManagementClient {
*/
String getEndpoint();

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

/**
* Gets The HTTP pipeline to send requests through.
*
Expand All @@ -44,13 +37,27 @@ public interface MySqlManagementClient {
*/
Duration getDefaultPollInterval();

/**
* Gets the AzureADAdministratorsClient object to access its operations.
*
* @return the AzureADAdministratorsClient object.
*/
AzureADAdministratorsClient getAzureADAdministrators();

/**
* Gets the BackupsClient object to access its operations.
*
* @return the BackupsClient object.
*/
BackupsClient getBackups();

/**
* Gets the BackupAndExportsClient object to access its operations.
*
* @return the BackupAndExportsClient object.
*/
BackupAndExportsClient getBackupAndExports();

/**
* Gets the ConfigurationsClient object to access its operations.
*
Expand Down Expand Up @@ -134,11 +141,4 @@ public interface MySqlManagementClient {
* @return the OperationsClient object.
*/
OperationsClient getOperations();

/**
* Gets the AzureADAdministratorsClient object to access its operations.
*
* @return the AzureADAdministratorsClient object.
*/
AzureADAdministratorsClient getAzureADAdministrators();
}
Loading

0 comments on commit 467679d

Please sign in to comment.