Skip to content

Commit

Permalink
Generated from 360d32ab4a5ddd5fbbc1f1f979d403217e6fdbce (#2707)
Browse files Browse the repository at this point in the history
typo: mysql/resource-manager/Microsoft.DBforMySQL

- allowd -> allowed
- relica -> replica
- Trim trailing spaces
  • Loading branch information
AutorestCI authored Dec 4, 2018
1 parent 645d4be commit 1b52790
Show file tree
Hide file tree
Showing 13 changed files with 680 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* 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;

import rx.Observable;
import com.microsoft.azure.management.mysql.v2017_12_01.implementation.ReplicasInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing Replicas.
*/
public interface Replicas extends HasInner<ReplicasInner> {
/**
* List all the replicas for a given server.
*
* @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<ServerServer> listByServerAsync(String resourceGroupName, String serverName);

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ public interface Server extends HasInner<ServerInner>, Resource, GroupableResour
*/
String fullyQualifiedDomainName();

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

/**
* @return the replicaCapacity value.
*/
Integer replicaCapacity();

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

/**
* @return the sku value.
*/
Expand Down Expand Up @@ -118,7 +133,7 @@ interface WithCreate extends Creatable<Server>, Resource.DefinitionWithTags<With
/**
* The template for a Server update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<Server>, Resource.UpdateWithTags<Update>, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithSku, UpdateStages.WithSslEnforcement, UpdateStages.WithStorageProfile, UpdateStages.WithVersion {
interface Update extends Appliable<Server>, Resource.UpdateWithTags<Update>, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithReplicationRole, UpdateStages.WithSku, UpdateStages.WithSslEnforcement, UpdateStages.WithStorageProfile, UpdateStages.WithVersion {
}

/**
Expand All @@ -135,6 +150,16 @@ interface WithAdministratorLoginPassword {
Update withAdministratorLoginPassword(String administratorLoginPassword);
}

/**
* The stage of the server {0} allowing to specify ReplicationRole.
*/
interface WithReplicationRole {
/**
* Specifies replicationRole.
*/
Update withReplicationRole(String replicationRole);
}

/**
* The stage of the server {0} allowing to specify Sku.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
@JsonSubTypes({
@JsonSubTypes.Type(name = "Default", value = ServerPropertiesForDefaultCreate.class),
@JsonSubTypes.Type(name = "PointInTimeRestore", value = ServerPropertiesForRestore.class),
@JsonSubTypes.Type(name = "GeoRestore", value = ServerPropertiesForGeoRestore.class)
@JsonSubTypes.Type(name = "GeoRestore", value = ServerPropertiesForGeoRestore.class),
@JsonSubTypes.Type(name = "Replica", value = ServerPropertiesForReplica.class)
})
public class ServerPropertiesForCreate {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* 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;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
* The properties to create a new replica.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode")
@JsonTypeName("Replica")
public class ServerPropertiesForReplica extends ServerPropertiesForCreate {
/**
* The master server id to create replica from.
*/
@JsonProperty(value = "sourceServerId", required = true)
private String sourceServerId;

/**
* Get the master server id to create replica from.
*
* @return the sourceServerId value
*/
public String sourceServerId() {
return this.sourceServerId;
}

/**
* Set the master server id to create replica from.
*
* @param sourceServerId the sourceServerId value to set
* @return the ServerPropertiesForReplica object itself.
*/
public ServerPropertiesForReplica withSourceServerId(String sourceServerId) {
this.sourceServerId = sourceServerId;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/**
* 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;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.mysql.v2017_12_01.implementation.ServerInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.mysql.v2017_12_01.implementation.DBforMySQLManager;
import org.joda.time.DateTime;
import java.util.Map;

/**
* Type representing ServerServer.
*/
public interface ServerServer extends HasInner<ServerInner>, HasManager<DBforMySQLManager> {
/**
* @return the administratorLogin value.
*/
String administratorLogin();

/**
* @return the earliestRestoreDate value.
*/
DateTime earliestRestoreDate();

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

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

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

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

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

/**
* @return the replicaCapacity value.
*/
Integer replicaCapacity();

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

/**
* @return the sku value.
*/
Sku sku();

/**
* @return the sslEnforcement value.
*/
SslEnforcementEnum sslEnforcement();

/**
* @return the storageProfile value.
*/
StorageProfile storageProfile();

/**
* @return the tags value.
*/
Map<String, String> tags();

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

/**
* @return the userVisibleState value.
*/
ServerState userVisibleState();

/**
* @return the version value.
*/
ServerVersion version();

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import com.microsoft.rest.serializer.JsonFlatten;

/**
* Parameters allowd to update for a server.
* Parameters allowed to update for a server.
*/
@JsonFlatten
public class ServerUpdateParameters {
Expand Down Expand Up @@ -48,6 +48,12 @@ public class ServerUpdateParameters {
@JsonProperty(value = "properties.sslEnforcement")
private SslEnforcementEnum sslEnforcement;

/**
* The replication role of the server.
*/
@JsonProperty(value = "properties.replicationRole")
private String replicationRole;

/**
* Application-specific metadata in the form of key-value pairs.
*/
Expand Down Expand Up @@ -154,6 +160,26 @@ public ServerUpdateParameters withSslEnforcement(SslEnforcementEnum sslEnforceme
return this;
}

/**
* Get the replication role of the server.
*
* @return the replicationRole value
*/
public String replicationRole() {
return this.replicationRole;
}

/**
* Set the replication role of the server.
*
* @param replicationRole the replicationRole value to set
* @return the ServerUpdateParameters object itself.
*/
public ServerUpdateParameters withReplicationRole(String replicationRole) {
this.replicationRole = replicationRole;
return this;
}

/**
* Get application-specific metadata in the form of key-value pairs.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.microsoft.azure.serializer.AzureJacksonAdapter;
import com.microsoft.rest.RestClient;
import com.microsoft.azure.management.mysql.v2017_12_01.Servers;
import com.microsoft.azure.management.mysql.v2017_12_01.Replicas;
import com.microsoft.azure.management.mysql.v2017_12_01.FirewallRules;
import com.microsoft.azure.management.mysql.v2017_12_01.VirtualNetworkRules;
import com.microsoft.azure.management.mysql.v2017_12_01.Databases;
Expand All @@ -34,6 +35,7 @@
*/
public final class DBforMySQLManager extends ManagerCore<DBforMySQLManager, MySQLManagementClientImpl> {
private Servers servers;
private Replicas replicas;
private FirewallRules firewallRules;
private VirtualNetworkRules virtualNetworkRules;
private Databases databases;
Expand Down Expand Up @@ -100,6 +102,16 @@ public Servers servers() {
return this.servers;
}

/**
* @return Entry point to manage Replicas.
*/
public Replicas replicas() {
if (this.replicas == null) {
this.replicas = new ReplicasImpl(this);
}
return this.replicas;
}

/**
* @return Entry point to manage FirewallRules.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,19 @@ public ServersInner servers() {
return this.servers;
}

/**
* The ReplicasInner object to access its operations.
*/
private ReplicasInner replicas;

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

/**
* The FirewallRulesInner object to access its operations.
*/
Expand Down Expand Up @@ -298,6 +311,7 @@ protected void initialize() {
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.servers = new ServersInner(restClient().retrofit(), this);
this.replicas = new ReplicasInner(restClient().retrofit(), this);
this.firewallRules = new FirewallRulesInner(restClient().retrofit(), this);
this.virtualNetworkRules = new VirtualNetworkRulesInner(restClient().retrofit(), this);
this.databases = new DatabasesInner(restClient().retrofit(), this);
Expand Down
Loading

0 comments on commit 1b52790

Please sign in to comment.