Skip to content

Commit

Permalink
chore: regenerate sqladmin client (#18308)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-code-bot authored Oct 6, 2023
1 parent 9058f52 commit de3693b
Show file tree
Hide file tree
Showing 9 changed files with 356 additions and 23 deletions.
4 changes: 2 additions & 2 deletions clients/google-api-services-sqladmin/v1/2.0.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-sqladmin</artifactId>
<version>v1-rev20230831-2.0.0</version>
<version>v1-rev20231004-2.0.0</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-sqladmin:v1-rev20230831-2.0.0'
implementation 'com.google.apis:google-api-services-sqladmin:v1-rev20231004-2.0.0'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4106,6 +4106,32 @@ public PromoteReplica setInstance(java.lang.String instance) {
return this;
}

/**
* Set to true if the promote operation should attempt to re-add the original primary as a
* replica when it comes back online. Otherwise, if this value is false or not set, the
* original primary will be a standalone instance.
*/
@com.google.api.client.util.Key
private java.lang.Boolean failover;

/** Set to true if the promote operation should attempt to re-add the original primary as a replica
when it comes back online. Otherwise, if this value is false or not set, the original primary will
be a standalone instance.
*/
public java.lang.Boolean getFailover() {
return failover;
}

/**
* Set to true if the promote operation should attempt to re-add the original primary as a
* replica when it comes back online. Otherwise, if this value is false or not set, the
* original primary will be a standalone instance.
*/
public PromoteReplica setFailover(java.lang.Boolean failover) {
this.failover = failover;
return this;
}

@Override
public PromoteReplica set(String parameterName, Object value) {
return (PromoteReplica) super.set(parameterName, value);
Expand Down Expand Up @@ -5066,6 +5092,166 @@ public StopReplica set(String parameterName, Object value) {
return (StopReplica) super.set(parameterName, value);
}
}
/**
* Switches over from the primary instance to the replica instance.
*
* Create a request for the method "instances.switchover".
*
* This request holds the parameters needed by the sqladmin server. After setting any optional
* parameters, call the {@link Switchover#execute()} method to invoke the remote operation.
*
* @param project ID of the project that contains the replica.
* @param instance Cloud SQL read replica instance name.
* @return the request
*/
public Switchover switchover(java.lang.String project, java.lang.String instance) throws java.io.IOException {
Switchover result = new Switchover(project, instance);
initialize(result);
return result;
}

public class Switchover extends SQLAdminRequest<com.google.api.services.sqladmin.model.Operation> {

private static final String REST_PATH = "v1/projects/{project}/instances/{instance}/switchover";

/**
* Switches over from the primary instance to the replica instance.
*
* Create a request for the method "instances.switchover".
*
* This request holds the parameters needed by the the sqladmin server. After setting any
* optional parameters, call the {@link Switchover#execute()} method to invoke the remote
* operation. <p> {@link
* Switchover#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param project ID of the project that contains the replica.
* @param instance Cloud SQL read replica instance name.
* @since 1.13
*/
protected Switchover(java.lang.String project, java.lang.String instance) {
super(SQLAdmin.this, "POST", REST_PATH, null, com.google.api.services.sqladmin.model.Operation.class);
this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified.");
this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified.");
}

@Override
public Switchover set$Xgafv(java.lang.String $Xgafv) {
return (Switchover) super.set$Xgafv($Xgafv);
}

@Override
public Switchover setAccessToken(java.lang.String accessToken) {
return (Switchover) super.setAccessToken(accessToken);
}

@Override
public Switchover setAlt(java.lang.String alt) {
return (Switchover) super.setAlt(alt);
}

@Override
public Switchover setCallback(java.lang.String callback) {
return (Switchover) super.setCallback(callback);
}

@Override
public Switchover setFields(java.lang.String fields) {
return (Switchover) super.setFields(fields);
}

@Override
public Switchover setKey(java.lang.String key) {
return (Switchover) super.setKey(key);
}

@Override
public Switchover setOauthToken(java.lang.String oauthToken) {
return (Switchover) super.setOauthToken(oauthToken);
}

@Override
public Switchover setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Switchover) super.setPrettyPrint(prettyPrint);
}

@Override
public Switchover setQuotaUser(java.lang.String quotaUser) {
return (Switchover) super.setQuotaUser(quotaUser);
}

@Override
public Switchover setUploadType(java.lang.String uploadType) {
return (Switchover) super.setUploadType(uploadType);
}

@Override
public Switchover setUploadProtocol(java.lang.String uploadProtocol) {
return (Switchover) super.setUploadProtocol(uploadProtocol);
}

/** ID of the project that contains the replica. */
@com.google.api.client.util.Key
private java.lang.String project;

/** ID of the project that contains the replica.
*/
public java.lang.String getProject() {
return project;
}

/** ID of the project that contains the replica. */
public Switchover setProject(java.lang.String project) {
this.project = project;
return this;
}

/** Cloud SQL read replica instance name. */
@com.google.api.client.util.Key
private java.lang.String instance;

/** Cloud SQL read replica instance name.
*/
public java.lang.String getInstance() {
return instance;
}

/** Cloud SQL read replica instance name. */
public Switchover setInstance(java.lang.String instance) {
this.instance = instance;
return this;
}

/**
* Optional. (MySQL only) Cloud SQL instance operations timeout, which is a sum of all
* database operations. Default value is 10 minutes and can be modified to a maximum value of
* 24 hours.
*/
@com.google.api.client.util.Key
private String dbTimeout;

/** Optional. (MySQL only) Cloud SQL instance operations timeout, which is a sum of all database
operations. Default value is 10 minutes and can be modified to a maximum value of 24 hours.
*/
public String getDbTimeout() {
return dbTimeout;
}

/**
* Optional. (MySQL only) Cloud SQL instance operations timeout, which is a sum of all
* database operations. Default value is 10 minutes and can be modified to a maximum value of
* 24 hours.
*/
public Switchover setDbTimeout(String dbTimeout) {
this.dbTimeout = dbTimeout;
return this;
}

@Override
public Switchover set(String parameterName, Object value) {
return (Switchover) super.set(parameterName, value);
}
}
/**
* Truncate MySQL general and slow query log tables MySQL only.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public final class DatabaseInstance extends com.google.api.client.json.GenericJs
private SqlOutOfDiskReport outOfDiskReport;

/**
* Output only. The dns name of the primary instance in a replication group.
* Output only. DEPRECATED: please use write_endpoint instead.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
Expand Down Expand Up @@ -323,6 +323,13 @@ public final class DatabaseInstance extends com.google.api.client.json.GenericJs
@com.google.api.client.util.Key
private java.util.List<java.lang.String> suspensionReason;

/**
* Output only. The dns name of the primary instance in a replication group.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String writeEndpoint;

/**
* Output only. List all maintenance versions applicable on the instance
* @return value or {@code null} for none
Expand Down Expand Up @@ -743,15 +750,15 @@ public DatabaseInstance setOutOfDiskReport(SqlOutOfDiskReport outOfDiskReport) {
}

/**
* Output only. The dns name of the primary instance in a replication group.
* Output only. DEPRECATED: please use write_endpoint instead.
* @return value or {@code null} for none
*/
public java.lang.String getPrimaryDnsName() {
return primaryDnsName;
}

/**
* Output only. The dns name of the primary instance in a replication group.
* Output only. DEPRECATED: please use write_endpoint instead.
* @param primaryDnsName primaryDnsName or {@code null} for none
*/
public DatabaseInstance setPrimaryDnsName(java.lang.String primaryDnsName) {
Expand Down Expand Up @@ -1028,6 +1035,23 @@ public DatabaseInstance setSuspensionReason(java.util.List<java.lang.String> sus
return this;
}

/**
* Output only. The dns name of the primary instance in a replication group.
* @return value or {@code null} for none
*/
public java.lang.String getWriteEndpoint() {
return writeEndpoint;
}

/**
* Output only. The dns name of the primary instance in a replication group.
* @param writeEndpoint writeEndpoint or {@code null} for none
*/
public DatabaseInstance setWriteEndpoint(java.lang.String writeEndpoint) {
this.writeEndpoint = writeEndpoint;
return this;
}

@Override
public DatabaseInstance set(String fieldName, Object value) {
return (DatabaseInstance) super.set(fieldName, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,35 @@ public final class IpConfiguration extends com.google.api.client.json.GenericJso
private PscConfig pscConfig;

/**
* Whether SSL connections over IP are enforced or not.
* LINT.IfChange(require_ssl_deprecate) Whether SSL/TLS connections over IP are enforced or not.
* If set to false, allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections,
* the client certificate will not be verified. If set to true, only allow connections encrypted
* with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without
* enforcing the requirement for valid client certificates, use the `ssl_mode` flag instead of the
* legacy `require_ssl` flag. LINT.ThenChange(//depot/google3/java/com/google/storage/speckle/boss
* /admin/actions/InstanceUpdateAction.java:update_api_temp_fix)
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean requireSsl;

/**
* Specify how SSL/TLS will be enforced in database connections. This flag is only supported for
* PostgreSQL. Use the legacy `require_ssl` flag for enforcing SSL/TLS in MySQL and SQL Server.
* But, for PostgreSQL, it is recommended to use the `ssl_mode` flag instead of the legacy
* `require_ssl` flag. To avoid the conflict between those flags in PostgreSQL, only the following
* value pairs are valid: ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED, require_ssl=false;
* ssl_mode=ENCRYPTED_ONLY, require_ssl=false; ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED,
* require_ssl=true; Note that the value of `ssl_mode` gets priority over the value of the legacy
* `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY, require_ssl=false`, the
* `ssl_mode=ENCRYPTED_ONLY` means "only accepts SSL connection", while the `require_ssl=false`
* means "both non-SSL and SSL connections are allowed". The database will respect `ssl_mode` in
* this case and only accept SSL connections.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String sslMode;

/**
* The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-
* managed-services-default". If set, the instance ip will be created in the allocated range. The
Expand Down Expand Up @@ -208,22 +231,71 @@ public IpConfiguration setPscConfig(PscConfig pscConfig) {
}

/**
* Whether SSL connections over IP are enforced or not.
* LINT.IfChange(require_ssl_deprecate) Whether SSL/TLS connections over IP are enforced or not.
* If set to false, allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections,
* the client certificate will not be verified. If set to true, only allow connections encrypted
* with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without
* enforcing the requirement for valid client certificates, use the `ssl_mode` flag instead of the
* legacy `require_ssl` flag. LINT.ThenChange(//depot/google3/java/com/google/storage/speckle/boss
* /admin/actions/InstanceUpdateAction.java:update_api_temp_fix)
* @return value or {@code null} for none
*/
public java.lang.Boolean getRequireSsl() {
return requireSsl;
}

/**
* Whether SSL connections over IP are enforced or not.
* LINT.IfChange(require_ssl_deprecate) Whether SSL/TLS connections over IP are enforced or not.
* If set to false, allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections,
* the client certificate will not be verified. If set to true, only allow connections encrypted
* with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without
* enforcing the requirement for valid client certificates, use the `ssl_mode` flag instead of the
* legacy `require_ssl` flag. LINT.ThenChange(//depot/google3/java/com/google/storage/speckle/boss
* /admin/actions/InstanceUpdateAction.java:update_api_temp_fix)
* @param requireSsl requireSsl or {@code null} for none
*/
public IpConfiguration setRequireSsl(java.lang.Boolean requireSsl) {
this.requireSsl = requireSsl;
return this;
}

/**
* Specify how SSL/TLS will be enforced in database connections. This flag is only supported for
* PostgreSQL. Use the legacy `require_ssl` flag for enforcing SSL/TLS in MySQL and SQL Server.
* But, for PostgreSQL, it is recommended to use the `ssl_mode` flag instead of the legacy
* `require_ssl` flag. To avoid the conflict between those flags in PostgreSQL, only the following
* value pairs are valid: ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED, require_ssl=false;
* ssl_mode=ENCRYPTED_ONLY, require_ssl=false; ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED,
* require_ssl=true; Note that the value of `ssl_mode` gets priority over the value of the legacy
* `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY, require_ssl=false`, the
* `ssl_mode=ENCRYPTED_ONLY` means "only accepts SSL connection", while the `require_ssl=false`
* means "both non-SSL and SSL connections are allowed". The database will respect `ssl_mode` in
* this case and only accept SSL connections.
* @return value or {@code null} for none
*/
public java.lang.String getSslMode() {
return sslMode;
}

/**
* Specify how SSL/TLS will be enforced in database connections. This flag is only supported for
* PostgreSQL. Use the legacy `require_ssl` flag for enforcing SSL/TLS in MySQL and SQL Server.
* But, for PostgreSQL, it is recommended to use the `ssl_mode` flag instead of the legacy
* `require_ssl` flag. To avoid the conflict between those flags in PostgreSQL, only the following
* value pairs are valid: ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED, require_ssl=false;
* ssl_mode=ENCRYPTED_ONLY, require_ssl=false; ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED,
* require_ssl=true; Note that the value of `ssl_mode` gets priority over the value of the legacy
* `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY, require_ssl=false`, the
* `ssl_mode=ENCRYPTED_ONLY` means "only accepts SSL connection", while the `require_ssl=false`
* means "both non-SSL and SSL connections are allowed". The database will respect `ssl_mode` in
* this case and only accept SSL connections.
* @param sslMode sslMode or {@code null} for none
*/
public IpConfiguration setSslMode(java.lang.String sslMode) {
this.sslMode = sslMode;
return this;
}

@Override
public IpConfiguration set(String fieldName, Object value) {
return (IpConfiguration) super.set(fieldName, value);
Expand Down
Loading

0 comments on commit de3693b

Please sign in to comment.