Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.mysql.v2017_12_01_preview;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.ServerAdministratorResourceInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
import java.util.UUID;

/**
* Type representing ServerAdministratorResource.
*/
public interface ServerAdministratorResource extends HasInner<ServerAdministratorResourceInner>, HasManager<DBforMySQLManager> {
/**
* @return the administratorType value.
*/
String administratorType();

/**
* @return the id value.
*/
String id();

/**
* @return the login value.
*/
String login();

/**
* @return the name value.
*/
String name();

/**
* @return the sid value.
*/
UUID sid();

/**
* @return the tenantId value.
*/
UUID tenantId();

/**
* @return the type value.
*/
String type();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.mysql.v2017_12_01_preview;

import rx.Observable;
import rx.Completable;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.ServerAdministratorResourceInner;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.ServerAdministratorsInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing ServerAdministrators.
*/
public interface ServerAdministrators extends HasInner<ServerAdministratorsInner> {
/**
* Gets information about a AAD server administrator.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ServerAdministratorResource> getAsync(String resourceGroupName, String serverName);

/**
* Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @param properties The required parameters for creating or updating an AAD server administrator.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ServerAdministratorResource> createOrUpdateAsync(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties);

/**
* Deletes AAD Administrator.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ServerAdministratorResource> deleteAsync(String resourceGroupName, String serverName);

/**
* Returns a list of server Administrators.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ServerAdministratorResource> listByServerAsync(String resourceGroupName, String serverName);

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.Databases;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.Configurations;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.LogFiles;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerAdministrators;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.LocationBasedPerformanceTiers;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.CheckNameAvailabilitys;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerSecurityAlertPolicies;
Expand All @@ -41,6 +42,7 @@ public final class DBforMySQLManager extends ManagerCore<DBforMySQLManager, MySQ
private Databases databases;
private Configurations configurations;
private LogFiles logFiles;
private ServerAdministrators serverAdministrators;
private LocationBasedPerformanceTiers locationBasedPerformanceTiers;
private CheckNameAvailabilitys checkNameAvailabilitys;
private ServerSecurityAlertPolicies serverSecurityAlertPolicies;
Expand Down Expand Up @@ -162,6 +164,16 @@ public LogFiles logFiles() {
return this.logFiles;
}

/**
* @return Entry point to manage ServerAdministrators.
*/
public ServerAdministrators serverAdministrators() {
if (this.serverAdministrators == null) {
this.serverAdministrators = new ServerAdministratorsImpl(this);
}
return this.serverAdministrators;
}

/**
* @return Entry point to manage LocationBasedPerformanceTiers.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,19 @@ public LogFilesInner logFiles() {
return this.logFiles;
}

/**
* The ServerAdministratorsInner object to access its operations.
*/
private ServerAdministratorsInner serverAdministrators;

/**
* Gets the ServerAdministratorsInner object to access its operations.
* @return the ServerAdministratorsInner object.
*/
public ServerAdministratorsInner serverAdministrators() {
return this.serverAdministrators;
}

/**
* The LocationBasedPerformanceTiersInner object to access its operations.
*/
Expand Down Expand Up @@ -317,6 +330,7 @@ protected void initialize() {
this.databases = new DatabasesInner(restClient().retrofit(), this);
this.configurations = new ConfigurationsInner(restClient().retrofit(), this);
this.logFiles = new LogFilesInner(restClient().retrofit(), this);
this.serverAdministrators = new ServerAdministratorsInner(restClient().retrofit(), this);
this.locationBasedPerformanceTiers = new LocationBasedPerformanceTiersInner(restClient().retrofit(), this);
this.checkNameAvailabilitys = new CheckNameAvailabilitysInner(restClient().retrofit(), this);
this.serverSecurityAlertPolicies = new ServerSecurityAlertPoliciesInner(restClient().retrofit(), this);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation;

import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerAdministratorResource;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import rx.Observable;
import java.util.UUID;

class ServerAdministratorResourceImpl extends WrapperImpl<ServerAdministratorResourceInner> implements ServerAdministratorResource {
private final DBforMySQLManager manager;

ServerAdministratorResourceImpl(ServerAdministratorResourceInner inner, DBforMySQLManager manager) {
super(inner);
this.manager = manager;
}

@Override
public DBforMySQLManager manager() {
return this.manager;
}



@Override
public String administratorType() {
return this.inner().administratorType();
}

@Override
public String id() {
return this.inner().id();
}

@Override
public String login() {
return this.inner().login();
}

@Override
public String name() {
return this.inner().name();
}

@Override
public UUID sid() {
return this.inner().sid();
}

@Override
public UUID tenantId() {
return this.inner().tenantId();
}

@Override
public String type() {
return this.inner().type();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation;

import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.ProxyResource;

/**
* Represents a and external administrator to be created.
*/
@JsonFlatten
public class ServerAdministratorResourceInner extends ProxyResource {
/**
* The type of administrator.
*/
@JsonProperty(value = "properties.administratorType", required = true)
private String administratorType;

/**
* The server administrator login value.
*/
@JsonProperty(value = "properties.login", required = true)
private String login;

/**
* The server administrator Sid (Secure ID).
*/
@JsonProperty(value = "properties.sid", required = true)
private UUID sid;

/**
* The server Active Directory Administrator tenant id.
*/
@JsonProperty(value = "properties.tenantId", required = true)
private UUID tenantId;

/**
* Creates an instance of ServerAdministratorResourceInner class.
* @param login the server administrator login value.
* @param sid the server administrator Sid (Secure ID).
* @param tenantId the server Active Directory Administrator tenant id.
*/
public ServerAdministratorResourceInner() {
administratorType = "ActiveDirectory";
}

/**
* Get the type of administrator.
*
* @return the administratorType value
*/
public String administratorType() {
return this.administratorType;
}

/**
* Set the type of administrator.
*
* @param administratorType the administratorType value to set
* @return the ServerAdministratorResourceInner object itself.
*/
public ServerAdministratorResourceInner withAdministratorType(String administratorType) {
this.administratorType = administratorType;
return this;
}

/**
* Get the server administrator login value.
*
* @return the login value
*/
public String login() {
return this.login;
}

/**
* Set the server administrator login value.
*
* @param login the login value to set
* @return the ServerAdministratorResourceInner object itself.
*/
public ServerAdministratorResourceInner withLogin(String login) {
this.login = login;
return this;
}

/**
* Get the server administrator Sid (Secure ID).
*
* @return the sid value
*/
public UUID sid() {
return this.sid;
}

/**
* Set the server administrator Sid (Secure ID).
*
* @param sid the sid value to set
* @return the ServerAdministratorResourceInner object itself.
*/
public ServerAdministratorResourceInner withSid(UUID sid) {
this.sid = sid;
return this;
}

/**
* Get the server Active Directory Administrator tenant id.
*
* @return the tenantId value
*/
public UUID tenantId() {
return this.tenantId;
}

/**
* Set the server Active Directory Administrator tenant id.
*
* @param tenantId the tenantId value to set
* @return the ServerAdministratorResourceInner object itself.
*/
public ServerAdministratorResourceInner withTenantId(UUID tenantId) {
this.tenantId = tenantId;
return this;
}

}
Loading