Skip to content

Commit

Permalink
feat: Automated regeneration of SQLAdmin client (#12694)
Browse files Browse the repository at this point in the history
Auto-created at 2024-12-12 13:17:00 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Dec 12, 2024
1 parent f04db1d commit b72688c
Show file tree
Hide file tree
Showing 20 changed files with 140 additions and 18 deletions.
2 changes: 1 addition & 1 deletion clients/sql_admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_sql_admin, "~> 0.69"}]
[{:google_api_sql_admin, "~> 0.70"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ defmodule GoogleApi.SQLAdmin.V1.Api.Instances do
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:failover` (*type:* `boolean()`) - Set to true to invoke a replica failover to the designated DR replica. As part of replica failover, the promote operation attempts to add the original primary instance as a replica of the promoted DR replica when the original primary instance comes back online. If set to false or not specified, then the original primary instance becomes an independent Cloud SQL primary instance. Only applicable to MySQL.
* `:failover` (*type:* `boolean()`) - Set to true to invoke a replica failover to the DR replica. As part of replica failover, the promote operation attempts to add the original primary instance as a replica of the promoted DR replica when the original primary instance comes back online. If set to false or not specified, then the original primary instance becomes an independent Cloud SQL primary instance.
* `opts` (*type:* `keyword()`) - Call options
## Returns
Expand Down Expand Up @@ -1838,7 +1838,7 @@ defmodule GoogleApi.SQLAdmin.V1.Api.Instances do
end

@doc """
Switches over from the primary instance to the designated DR replica instance.
Switches over from the primary instance to the DR replica instance.
## Parameters
Expand All @@ -1857,7 +1857,7 @@ defmodule GoogleApi.SQLAdmin.V1.Api.Instances do
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:dbTimeout` (*type:* `String.t`) - 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.
* `:dbTimeout` (*type:* `String.t`) - Optional. (MySQL and PostgreSQL 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.
* `opts` (*type:* `keyword()`) - Call options
## Returns
Expand Down
2 changes: 1 addition & 1 deletion clients/sql_admin/lib/google_api/sql_admin/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.SQLAdmin.V1 do
API client metadata for GoogleApi.SQLAdmin.V1.
"""

@discovery_revision "20241108"
@discovery_revision "20241204"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.ConnectSettings do
## Attributes
* `backendType` (*type:* `String.t`, *default:* `nil`) - `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.
* `customSubjectAlternativeNames` (*type:* `list(String.t)`, *default:* `nil`) - Custom subject alternative names for the server certificate.
* `databaseVersion` (*type:* `String.t`, *default:* `nil`) - The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`.
* `dnsName` (*type:* `String.t`, *default:* `nil`) - The dns name of the instance.
* `ipAddresses` (*type:* `list(GoogleApi.SQLAdmin.V1.Model.IpMapping.t)`, *default:* `nil`) - The assigned IP addresses for the instance.
Expand All @@ -36,6 +37,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.ConnectSettings do

@type t :: %__MODULE__{
:backendType => String.t() | nil,
:customSubjectAlternativeNames => list(String.t()) | nil,
:databaseVersion => String.t() | nil,
:dnsName => String.t() | nil,
:ipAddresses => list(GoogleApi.SQLAdmin.V1.Model.IpMapping.t()) | nil,
Expand All @@ -47,6 +49,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.ConnectSettings do
}

field(:backendType)
field(:customSubjectAlternativeNames, type: :list)
field(:databaseVersion)
field(:dnsName)
field(:ipAddresses, as: GoogleApi.SQLAdmin.V1.Model.IpMapping, type: :list)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.DatabaseInstance do
* `serviceAccountEmailAddress` (*type:* `String.t`, *default:* `nil`) - The service account email address assigned to the instance.\\This property is read-only.
* `project` (*type:* `String.t`, *default:* `nil`) - The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
* `secondaryGceZone` (*type:* `String.t`, *default:* `nil`) - The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone.
* `tags` (*type:* `map()`, *default:* `nil`) - Optional. Input only. Immutable. Tag keys and tag values that are bound to this instance. You must represent each item in the map as: `"" : ""`. For example, a single resource can have the following tags: ``` "123/environment": "production", "123/costCenter": "marketing", ``` For more information on tag creation and management, see https://cloud.google.com/resource-manager/docs/tags/tags-overview.
* `onPremisesConfiguration` (*type:* `GoogleApi.SQLAdmin.V1.Model.OnPremisesConfiguration.t`, *default:* `nil`) - Configuration specific to on-premises instances.
* `settings` (*type:* `GoogleApi.SQLAdmin.V1.Model.Settings.t`, *default:* `nil`) - The user settings.
* `databaseInstalledVersion` (*type:* `String.t`, *default:* `nil`) - Output only. Stores the current database version running on the instance including minor version such as `MYSQL_8_0_18`.
Expand All @@ -60,7 +61,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.DatabaseInstance do
* `failoverReplica` (*type:* `GoogleApi.SQLAdmin.V1.Model.DatabaseInstanceFailoverReplica.t`, *default:* `nil`) - The name and status of the failover replica.
* `scheduledMaintenance` (*type:* `GoogleApi.SQLAdmin.V1.Model.SqlScheduledMaintenance.t`, *default:* `nil`) - The start time of any upcoming scheduled maintenance for this instance.
* `outOfDiskReport` (*type:* `GoogleApi.SQLAdmin.V1.Model.SqlOutOfDiskReport.t`, *default:* `nil`) - This field represents the report generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job
* `replicationCluster` (*type:* `GoogleApi.SQLAdmin.V1.Model.ReplicationCluster.t`, *default:* `nil`) - Optional. A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Only applicable to MySQL.
* `replicationCluster` (*type:* `GoogleApi.SQLAdmin.V1.Model.ReplicationCluster.t`, *default:* `nil`) - Optional. A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL.
* `maxDiskSize` (*type:* `String.t`, *default:* `nil`) - The maximum disk size of the instance in bytes.
* `etag` (*type:* `String.t`, *default:* `nil`) - This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.
* `replicaConfiguration` (*type:* `GoogleApi.SQLAdmin.V1.Model.ReplicaConfiguration.t`, *default:* `nil`) - Configuration specific to failover replicas and read replicas.
Expand Down Expand Up @@ -100,6 +101,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.DatabaseInstance do
:serviceAccountEmailAddress => String.t() | nil,
:project => String.t() | nil,
:secondaryGceZone => String.t() | nil,
:tags => map() | nil,
:onPremisesConfiguration =>
GoogleApi.SQLAdmin.V1.Model.OnPremisesConfiguration.t() | nil,
:settings => GoogleApi.SQLAdmin.V1.Model.Settings.t() | nil,
Expand Down Expand Up @@ -156,6 +158,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.DatabaseInstance do
field(:serviceAccountEmailAddress)
field(:project)
field(:secondaryGceZone)
field(:tags, type: :map)
field(:onPremisesConfiguration, as: GoogleApi.SQLAdmin.V1.Model.OnPremisesConfiguration)
field(:settings, as: GoogleApi.SQLAdmin.V1.Model.Settings)
field(:databaseInstalledVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ defmodule GoogleApi.SQLAdmin.V1.Model.IpConfiguration do
* `allocatedIpRange` (*type:* `String.t`, *default:* `nil`) - 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 range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`
* `authorizedNetworks` (*type:* `list(GoogleApi.SQLAdmin.V1.Model.AclEntry.t)`, *default:* `nil`) - The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).
* `customSubjectAlternativeNames` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.
* `enablePrivatePathForGoogleCloudServices` (*type:* `boolean()`, *default:* `nil`) - Controls connectivity to private IP instances from Google services, such as BigQuery.
* `ipv4Enabled` (*type:* `boolean()`, *default:* `nil`) - Whether the instance is assigned a public IP address or not.
* `privateNetwork` (*type:* `String.t`, *default:* `nil`) - The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set.
* `pscConfig` (*type:* `GoogleApi.SQLAdmin.V1.Model.PscConfig.t`, *default:* `nil`) - PSC settings for this instance.
* `requireSsl` (*type:* `boolean()`, *default:* `nil`) - Use `ssl_mode` instead. Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then 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, then use the `ssl_mode` flag instead of the `require_ssl` flag.
* `serverCaMode` (*type:* `String.t`, *default:* `nil`) - Specify what type of CA is used for the server certificate.
* `serverCaPool` (*type:* `String.t`, *default:* `nil`) - Optional. The resource name of the server CA pool for an instance with `CUSTOMER_MANAGED_CAS_CA` as the `server_ca_mode`. Format: projects//locations//caPools/
* `sslMode` (*type:* `String.t`, *default:* `nil`) - Specify how SSL/TLS is enforced in database connections. If you must use the `require_ssl` flag for backward compatibility, then only the following value pairs are valid: For PostgreSQL and MySQL: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` For SQL Server: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` The value of `ssl_mode` has priority over the value of `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL connections, while `require_ssl=false` means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect `ssl_mode` and accepts only SSL connections.
"""

Expand All @@ -37,23 +39,27 @@ defmodule GoogleApi.SQLAdmin.V1.Model.IpConfiguration do
@type t :: %__MODULE__{
:allocatedIpRange => String.t() | nil,
:authorizedNetworks => list(GoogleApi.SQLAdmin.V1.Model.AclEntry.t()) | nil,
:customSubjectAlternativeNames => list(String.t()) | nil,
:enablePrivatePathForGoogleCloudServices => boolean() | nil,
:ipv4Enabled => boolean() | nil,
:privateNetwork => String.t() | nil,
:pscConfig => GoogleApi.SQLAdmin.V1.Model.PscConfig.t() | nil,
:requireSsl => boolean() | nil,
:serverCaMode => String.t() | nil,
:serverCaPool => String.t() | nil,
:sslMode => String.t() | nil
}

field(:allocatedIpRange)
field(:authorizedNetworks, as: GoogleApi.SQLAdmin.V1.Model.AclEntry, type: :list)
field(:customSubjectAlternativeNames, type: :list)
field(:enablePrivatePathForGoogleCloudServices)
field(:ipv4Enabled)
field(:privateNetwork)
field(:pscConfig, as: GoogleApi.SQLAdmin.V1.Model.PscConfig)
field(:requireSsl)
field(:serverCaMode)
field(:serverCaPool)
field(:sslMode)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.Operation do
* `selfLink` (*type:* `String.t`, *default:* `nil`) - The URI of this resource.
* `startTime` (*type:* `DateTime.t`, *default:* `nil`) - The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
* `status` (*type:* `String.t`, *default:* `nil`) - The status of an operation.
* `subOperationType` (*type:* `GoogleApi.SQLAdmin.V1.Model.SqlSubOperationType.t`, *default:* `nil`) - Optional. The sub operation based on the operation type.
* `targetId` (*type:* `String.t`, *default:* `nil`) - Name of the database instance related to this operation.
* `targetLink` (*type:* `String.t`, *default:* `nil`) -
* `targetProject` (*type:* `String.t`, *default:* `nil`) - The project ID of the target instance related to this operation.
Expand All @@ -59,6 +60,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.Operation do
:selfLink => String.t() | nil,
:startTime => DateTime.t() | nil,
:status => String.t() | nil,
:subOperationType => GoogleApi.SQLAdmin.V1.Model.SqlSubOperationType.t() | nil,
:targetId => String.t() | nil,
:targetLink => String.t() | nil,
:targetProject => String.t() | nil,
Expand All @@ -79,6 +81,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.Operation do
field(:selfLink)
field(:startTime, as: DateTime)
field(:status)
field(:subOperationType, as: GoogleApi.SQLAdmin.V1.Model.SqlSubOperationType)
field(:targetId)
field(:targetLink)
field(:targetProject)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule GoogleApi.SQLAdmin.V1.Model.OperationMetadata do
## Attributes
* `apiVersion` (*type:* `String.t`, *default:* `nil`) - Output only. API version used to start the operation.
* `cancelRequested` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
* `cancelRequested` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have google.longrunning.Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation was created.
* `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation finished running.
* `statusDetail` (*type:* `String.t`, *default:* `nil`) - Output only. Human-readable status of the operation, if any.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

defmodule GoogleApi.SQLAdmin.V1.Model.ReplicationCluster do
@moduledoc """
A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Only applicable to MySQL.
A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL.
## Attributes
* `drReplica` (*type:* `boolean()`, *default:* `nil`) - Output only. Read-only field that indicates whether the replica is a DR replica. This field is not set if the instance is a primary instance.
* `failoverDrReplicaName` (*type:* `String.t`, *default:* `nil`) - Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Set this field to a replica name to designate a DR replica for a primary instance. Remove the replica name to remove the DR replica designation.
* `psaWriteEndpoint` (*type:* `String.t`, *default:* `nil`) - Output only. If set, it indicates this instance has a private service access (PSA) dns endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, the dns should be pointing to this instance. After Switchover or Replica failover, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance does not yet have a replica, or had a DR replica that was deleted.
* `psaWriteEndpoint` (*type:* `String.t`, *default:* `nil`) - Output only. If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.
"""

use GoogleApi.Gax.ModelBase
Expand Down
Loading

0 comments on commit b72688c

Please sign in to comment.