Skip to content

Commit

Permalink
CodeGen from PR 25875 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 53f028513f1c9bcbaad825aedcdcf04b40a833fe into 77594f11d143384288cb83f5d54f9bb92bc3ff8d
  • Loading branch information
SDKAuto committed Sep 20, 2023
1 parent 88aa872 commit ff322db
Show file tree
Hide file tree
Showing 181 changed files with 2,183 additions and 4,730 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.5 (Unreleased)
## 1.0.0-beta.1 (2023-09-20)

- 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-2023-06-01-preview-new. 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-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).
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-2023-06-01-preview-new. 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.4</version>
<version>1.0.0-beta.5</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -74,6 +74,15 @@ See [API design][design] for general introduction on design and key concepts on

## Examples

```java
server = mysqlManager.servers()
.define(serverName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.withAdministratorLogin(adminName)
.withAdministratorLoginPassword(adminPwd)
.create();
```
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/SAMPLE.md)


Expand Down Expand Up @@ -103,3 +112,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[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/

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fmysqlflexibleserver%2Fazure-resourcemanager-mysqlflexibleserver%2FREADME.png)

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-2022-09-30-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-2023-06-01-preview-new.</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 @@ -40,6 +40,7 @@
import com.azure.resourcemanager.mysqlflexibleserver.implementation.OperationsImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.ReplicasImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.ServersImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.ServersMigrationsImpl;
import com.azure.resourcemanager.mysqlflexibleserver.models.AzureADAdministrators;
import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExports;
import com.azure.resourcemanager.mysqlflexibleserver.models.Backups;
Expand All @@ -55,6 +56,7 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.Operations;
import com.azure.resourcemanager.mysqlflexibleserver.models.Replicas;
import com.azure.resourcemanager.mysqlflexibleserver.models.Servers;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServersMigrations;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
Expand Down Expand Up @@ -84,6 +86,8 @@ public final class MySqlManager {

private Replicas replicas;

private ServersMigrations serversMigrations;

private LogFiles logFiles;

private LocationBasedCapabilities locationBasedCapabilities;
Expand Down Expand Up @@ -263,7 +267,7 @@ public MySqlManager authenticate(TokenCredential credential, AzureProfile profil
.append("-")
.append("com.azure.resourcemanager.mysqlflexibleserver")
.append("/")
.append("1.0.0-beta.4");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -416,6 +420,18 @@ public Replicas replicas() {
return replicas;
}

/**
* Gets the resource collection API of ServersMigrations.
*
* @return Resource collection API of ServersMigrations.
*/
public ServersMigrations serversMigrations() {
if (this.serversMigrations == null) {
this.serversMigrations = new ServersMigrationsImpl(clientObject.getServersMigrations(), this);
}
return serversMigrations;
}

/**
* Gets the resource collection API of LogFiles.
*
Expand Down Expand Up @@ -507,8 +523,10 @@ public Operations operations() {
}

/**
* @return Wrapped service client MySqlManagementClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
* Gets wrapped service client MySqlManagementClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
*
* @return Wrapped service client MySqlManagementClient.
*/
public MySqlManagementClient serviceClient() {
return this.clientObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** The interface for MySqlManagementClient class. */
public interface MySqlManagementClient {
/**
* Gets The ID of the target subscription.
* Gets The ID of the target subscription. The value must be an UUID.
*
* @return the subscriptionId value.
*/
Expand Down Expand Up @@ -93,6 +93,13 @@ public interface MySqlManagementClient {
*/
ReplicasClient getReplicas();

/**
* Gets the ServersMigrationsClient object to access its operations.
*
* @return the ServersMigrationsClient object.
*/
ServersMigrationsClient getServersMigrations();

/**
* Gets the LogFilesClient object to access its operations.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// 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.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerInner;

/** An instance of this class provides access to all the operations defined in ServersMigrationsClient. */
public interface ServersMigrationsClient {
/**
* Cutover migration for MySQL import, it will switch source elastic server DNS to flexible 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 the {@link SyncPoller} for polling of represents a server.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ServerInner>, ServerInner> beginCutoverMigration(String resourceGroupName, String serverName);

/**
* Cutover migration for MySQL import, it will switch source elastic server DNS to flexible 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 the {@link SyncPoller} for polling of represents a server.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ServerInner>, ServerInner> beginCutoverMigration(
String resourceGroupName, String serverName, Context context);

/**
* Cutover migration for MySQL import, it will switch source elastic server DNS to flexible 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 a server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ServerInner cutoverMigration(String resourceGroupName, String serverName);

/**
* Cutover migration for MySQL import, it will switch source elastic server DNS to flexible 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 a server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ServerInner cutoverMigration(String resourceGroupName, String serverName, Context context);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class AzureADAdministratorInner extends ProxyResource {
private AdministratorProperties innerProperties;

/*
* The system metadata relating to this resource.
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
Expand All @@ -39,7 +39,7 @@ private AdministratorProperties innerProperties() {
}

/**
* Get the systemData property: The system metadata relating to this resource.
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.management.exception.ManagementError;
import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatus;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down Expand Up @@ -45,9 +46,13 @@ public final class BackupAndExportResponseInner extends ProxyResource {
private BackupAndExportResponseProperties innerProperties;

/*
* Error Response
*
* The BackupAndExport operation error response.
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;

/*
* The error object.
*/
@JsonProperty(value = "error")
private ManagementError error;
Expand Down Expand Up @@ -146,9 +151,16 @@ private BackupAndExportResponseProperties innerProperties() {
}

/**
* Get the error property: Error Response
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* <p>The BackupAndExport operation error response.
* @return the systemData value.
*/
public SystemData systemData() {
return this.systemData;
}

/**
* Get the error property: The error object.
*
* @return the error value.
*/
Expand All @@ -157,9 +169,7 @@ public ManagementError error() {
}

/**
* Set the error property: Error Response
*
* <p>The BackupAndExport operation error response.
* Set the error property: The error object.
*
* @param error the error value to set.
* @return the BackupAndExportResponseInner object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public final class ConfigurationInner extends ProxyResource {
private ConfigurationProperties innerProperties;

/*
* The system metadata relating to this resource.
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
Expand All @@ -42,7 +42,7 @@ private ConfigurationProperties innerProperties() {
}

/**
* Get the systemData property: The system metadata relating to this resource.
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public final class DatabaseInner extends ProxyResource {
private DatabaseProperties innerProperties;

/*
* The system metadata relating to this resource.
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
Expand All @@ -38,7 +38,7 @@ private DatabaseProperties innerProperties() {
}

/**
* Get the systemData property: The system metadata relating to this resource.
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class FirewallRuleInner extends ProxyResource {
private FirewallRuleProperties innerProperties = new FirewallRuleProperties();

/*
* The system metadata relating to this resource.
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
Expand All @@ -39,7 +39,7 @@ private FirewallRuleProperties innerProperties() {
}

/**
* Get the systemData property: The system metadata relating to this resource.
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class LogFileInner extends ProxyResource {
private LogFileProperties innerProperties;

/*
* The system metadata relating to this resource.
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
Expand All @@ -39,7 +39,7 @@ private LogFileProperties innerProperties() {
}

/**
* Get the systemData property: The system metadata relating to this resource.
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
Expand Down
Loading

0 comments on commit ff322db

Please sign in to comment.