From ff866722245eb94f7ce331637957e6ef5753547f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 21 Apr 2024 13:11:31 +0000 Subject: [PATCH] feat: Automated regeneration of AlloyDB client --- clients/alloy_db/README.md | 2 +- .../lib/google_api/alloy_db/v1/metadata.ex | 2 +- .../google_api/alloy_db/v1/model/cluster.ex | 7 +++ .../google_api/alloy_db/v1/model/instance.ex | 3 ++ .../v1/model/maintenance_update_policy.ex | 46 ++++++++++++++++ .../alloy_db/v1/model/maintenance_window.ex | 49 +++++++++++++++++ .../alloy_db/v1/model/psc_config.ex | 46 ++++++++++++++++ .../alloy_db/v1/model/psc_instance_config.ex | 52 +++++++++++++++++++ clients/alloy_db/mix.exs | 2 +- 9 files changed, 206 insertions(+), 3 deletions(-) create mode 100644 clients/alloy_db/lib/google_api/alloy_db/v1/model/maintenance_update_policy.ex create mode 100644 clients/alloy_db/lib/google_api/alloy_db/v1/model/maintenance_window.ex create mode 100644 clients/alloy_db/lib/google_api/alloy_db/v1/model/psc_config.ex create mode 100644 clients/alloy_db/lib/google_api/alloy_db/v1/model/psc_instance_config.ex diff --git a/clients/alloy_db/README.md b/clients/alloy_db/README.md index 9576d93912..78f2c0c2f4 100644 --- a/clients/alloy_db/README.md +++ b/clients/alloy_db/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_alloy_db, "~> 0.4"}] + [{:google_api_alloy_db, "~> 0.5"}] end ``` diff --git a/clients/alloy_db/lib/google_api/alloy_db/v1/metadata.ex b/clients/alloy_db/lib/google_api/alloy_db/v1/metadata.ex index f7e40559c1..6c82b4cd0e 100644 --- a/clients/alloy_db/lib/google_api/alloy_db/v1/metadata.ex +++ b/clients/alloy_db/lib/google_api/alloy_db/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.AlloyDB.V1 do API client metadata for GoogleApi.AlloyDB.V1. """ - @discovery_revision "20240315" + @discovery_revision "20240410" def discovery_revision(), do: @discovery_revision end diff --git a/clients/alloy_db/lib/google_api/alloy_db/v1/model/cluster.ex b/clients/alloy_db/lib/google_api/alloy_db/v1/model/cluster.ex index 30a9fb8a4e..da18780abd 100644 --- a/clients/alloy_db/lib/google_api/alloy_db/v1/model/cluster.ex +++ b/clients/alloy_db/lib/google_api/alloy_db/v1/model/cluster.ex @@ -36,11 +36,13 @@ defmodule GoogleApi.AlloyDB.V1.Model.Cluster do * `etag` (*type:* `String.t`, *default:* `nil`) - For Resource freshness validation (https://google.aip.dev/154) * `initialUser` (*type:* `GoogleApi.AlloyDB.V1.Model.UserPassword.t`, *default:* `nil`) - Input only. Initial user to setup during cluster creation. Required. If used in `RestoreCluster` this is ignored. * `labels` (*type:* `map()`, *default:* `nil`) - Labels as key value pairs + * `maintenanceUpdatePolicy` (*type:* `GoogleApi.AlloyDB.V1.Model.MaintenanceUpdatePolicy.t`, *default:* `nil`) - Optional. The maintenance update policy determines when to allow or deny updates. * `migrationSource` (*type:* `GoogleApi.AlloyDB.V1.Model.MigrationSource.t`, *default:* `nil`) - Output only. Cluster created via DMS migration. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region} * `network` (*type:* `String.t`, *default:* `nil`) - Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: `projects/{project}/global/networks/{network_id}`. This is required to create a cluster. Deprecated, use network_config.network instead. * `networkConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.NetworkConfig.t`, *default:* `nil`) - * `primaryConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.PrimaryConfig.t`, *default:* `nil`) - Output only. Cross Region replication config specific to PRIMARY cluster. + * `pscConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.PscConfig.t`, *default:* `nil`) - Optional. The configuration for Private Service Connect (PSC) for the cluster. * `reconciling` (*type:* `boolean()`, *default:* `nil`) - Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Cluster does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance. * `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use. * `secondaryConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.SecondaryConfig.t`, *default:* `nil`) - Cross Region replication config specific to SECONDARY cluster. @@ -68,11 +70,14 @@ defmodule GoogleApi.AlloyDB.V1.Model.Cluster do :etag => String.t() | nil, :initialUser => GoogleApi.AlloyDB.V1.Model.UserPassword.t() | nil, :labels => map() | nil, + :maintenanceUpdatePolicy => + GoogleApi.AlloyDB.V1.Model.MaintenanceUpdatePolicy.t() | nil, :migrationSource => GoogleApi.AlloyDB.V1.Model.MigrationSource.t() | nil, :name => String.t() | nil, :network => String.t() | nil, :networkConfig => GoogleApi.AlloyDB.V1.Model.NetworkConfig.t() | nil, :primaryConfig => GoogleApi.AlloyDB.V1.Model.PrimaryConfig.t() | nil, + :pscConfig => GoogleApi.AlloyDB.V1.Model.PscConfig.t() | nil, :reconciling => boolean() | nil, :satisfiesPzs => boolean() | nil, :secondaryConfig => GoogleApi.AlloyDB.V1.Model.SecondaryConfig.t() | nil, @@ -97,11 +102,13 @@ defmodule GoogleApi.AlloyDB.V1.Model.Cluster do field(:etag) field(:initialUser, as: GoogleApi.AlloyDB.V1.Model.UserPassword) field(:labels, type: :map) + field(:maintenanceUpdatePolicy, as: GoogleApi.AlloyDB.V1.Model.MaintenanceUpdatePolicy) field(:migrationSource, as: GoogleApi.AlloyDB.V1.Model.MigrationSource) field(:name) field(:network) field(:networkConfig, as: GoogleApi.AlloyDB.V1.Model.NetworkConfig) field(:primaryConfig, as: GoogleApi.AlloyDB.V1.Model.PrimaryConfig) + field(:pscConfig, as: GoogleApi.AlloyDB.V1.Model.PscConfig) field(:reconciling) field(:satisfiesPzs) field(:secondaryConfig, as: GoogleApi.AlloyDB.V1.Model.SecondaryConfig) diff --git a/clients/alloy_db/lib/google_api/alloy_db/v1/model/instance.ex b/clients/alloy_db/lib/google_api/alloy_db/v1/model/instance.ex index 51a43627fa..78589b7820 100644 --- a/clients/alloy_db/lib/google_api/alloy_db/v1/model/instance.ex +++ b/clients/alloy_db/lib/google_api/alloy_db/v1/model/instance.ex @@ -37,6 +37,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.Instance do * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id} * `networkConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.InstanceNetworkConfig.t`, *default:* `nil`) - Optional. Instance level network configuration. * `nodes` (*type:* `list(GoogleApi.AlloyDB.V1.Model.Node.t)`, *default:* `nil`) - Output only. List of available read-only VMs in this instance, including the standby for a PRIMARY instance. + * `pscInstanceConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.PscInstanceConfig.t`, *default:* `nil`) - Optional. The configuration for Private Service Connect (PSC) for the instance. * `publicIpAddress` (*type:* `String.t`, *default:* `nil`) - Output only. The public IP addresses for the Instance. This is available ONLY when enable_public_ip is set. This is the connection endpoint for an end-user application. * `queryInsightsConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.QueryInsightsInstanceConfig.t`, *default:* `nil`) - Configuration for query insights. * `readPoolConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.ReadPoolConfig.t`, *default:* `nil`) - Read pool instance configuration. This is required if the value of instanceType is READ_POOL. @@ -67,6 +68,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.Instance do :name => String.t() | nil, :networkConfig => GoogleApi.AlloyDB.V1.Model.InstanceNetworkConfig.t() | nil, :nodes => list(GoogleApi.AlloyDB.V1.Model.Node.t()) | nil, + :pscInstanceConfig => GoogleApi.AlloyDB.V1.Model.PscInstanceConfig.t() | nil, :publicIpAddress => String.t() | nil, :queryInsightsConfig => GoogleApi.AlloyDB.V1.Model.QueryInsightsInstanceConfig.t() | nil, @@ -95,6 +97,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.Instance do field(:name) field(:networkConfig, as: GoogleApi.AlloyDB.V1.Model.InstanceNetworkConfig) field(:nodes, as: GoogleApi.AlloyDB.V1.Model.Node, type: :list) + field(:pscInstanceConfig, as: GoogleApi.AlloyDB.V1.Model.PscInstanceConfig) field(:publicIpAddress) field(:queryInsightsConfig, as: GoogleApi.AlloyDB.V1.Model.QueryInsightsInstanceConfig) field(:readPoolConfig, as: GoogleApi.AlloyDB.V1.Model.ReadPoolConfig) diff --git a/clients/alloy_db/lib/google_api/alloy_db/v1/model/maintenance_update_policy.ex b/clients/alloy_db/lib/google_api/alloy_db/v1/model/maintenance_update_policy.ex new file mode 100644 index 0000000000..cb43b938dd --- /dev/null +++ b/clients/alloy_db/lib/google_api/alloy_db/v1/model/maintenance_update_policy.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AlloyDB.V1.Model.MaintenanceUpdatePolicy do + @moduledoc """ + MaintenanceUpdatePolicy defines the policy for system updates. + + ## Attributes + + * `maintenanceWindows` (*type:* `list(GoogleApi.AlloyDB.V1.Model.MaintenanceWindow.t)`, *default:* `nil`) - Preferred windows to perform maintenance. Currently limited to 1. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :maintenanceWindows => list(GoogleApi.AlloyDB.V1.Model.MaintenanceWindow.t()) | nil + } + + field(:maintenanceWindows, as: GoogleApi.AlloyDB.V1.Model.MaintenanceWindow, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.MaintenanceUpdatePolicy do + def decode(value, options) do + GoogleApi.AlloyDB.V1.Model.MaintenanceUpdatePolicy.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.MaintenanceUpdatePolicy do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/alloy_db/lib/google_api/alloy_db/v1/model/maintenance_window.ex b/clients/alloy_db/lib/google_api/alloy_db/v1/model/maintenance_window.ex new file mode 100644 index 0000000000..7695caf1a1 --- /dev/null +++ b/clients/alloy_db/lib/google_api/alloy_db/v1/model/maintenance_window.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AlloyDB.V1.Model.MaintenanceWindow do + @moduledoc """ + MaintenanceWindow specifies a preferred day and time for maintenance. + + ## Attributes + + * `day` (*type:* `String.t`, *default:* `nil`) - Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, etc. + * `startTime` (*type:* `GoogleApi.AlloyDB.V1.Model.GoogleTypeTimeOfDay.t`, *default:* `nil`) - Preferred time to start the maintenance operation on the specified day. Maintenance will start within 1 hour of this time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :day => String.t() | nil, + :startTime => GoogleApi.AlloyDB.V1.Model.GoogleTypeTimeOfDay.t() | nil + } + + field(:day) + field(:startTime, as: GoogleApi.AlloyDB.V1.Model.GoogleTypeTimeOfDay) +end + +defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.MaintenanceWindow do + def decode(value, options) do + GoogleApi.AlloyDB.V1.Model.MaintenanceWindow.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.MaintenanceWindow do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/alloy_db/lib/google_api/alloy_db/v1/model/psc_config.ex b/clients/alloy_db/lib/google_api/alloy_db/v1/model/psc_config.ex new file mode 100644 index 0000000000..670861d22d --- /dev/null +++ b/clients/alloy_db/lib/google_api/alloy_db/v1/model/psc_config.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AlloyDB.V1.Model.PscConfig do + @moduledoc """ + PscConfig contains PSC related configuration at a cluster level. + + ## Attributes + + * `pscEnabled` (*type:* `boolean()`, *default:* `nil`) - Optional. Create an instance that allows connections from Private Service Connect endpoints to the instance. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :pscEnabled => boolean() | nil + } + + field(:pscEnabled) +end + +defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.PscConfig do + def decode(value, options) do + GoogleApi.AlloyDB.V1.Model.PscConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.PscConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/alloy_db/lib/google_api/alloy_db/v1/model/psc_instance_config.ex b/clients/alloy_db/lib/google_api/alloy_db/v1/model/psc_instance_config.ex new file mode 100644 index 0000000000..da55c79775 --- /dev/null +++ b/clients/alloy_db/lib/google_api/alloy_db/v1/model/psc_instance_config.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AlloyDB.V1.Model.PscInstanceConfig do + @moduledoc """ + PscInstanceConfig contains PSC related configuration at an instance level. + + ## Attributes + + * `allowedConsumerProjects` (*type:* `list(String.t)`, *default:* `nil`) - Optional. List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance. + * `pscDnsName` (*type:* `String.t`, *default:* `nil`) - Output only. The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog + * `serviceAttachmentLink` (*type:* `String.t`, *default:* `nil`) - Output only. The service attachment created when Private Service Connect (PSC) is enabled for the instance. The name of the resource will be in the format of `projects//regions//serviceAttachments/` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :allowedConsumerProjects => list(String.t()) | nil, + :pscDnsName => String.t() | nil, + :serviceAttachmentLink => String.t() | nil + } + + field(:allowedConsumerProjects, type: :list) + field(:pscDnsName) + field(:serviceAttachmentLink) +end + +defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.PscInstanceConfig do + def decode(value, options) do + GoogleApi.AlloyDB.V1.Model.PscInstanceConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.PscInstanceConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/alloy_db/mix.exs b/clients/alloy_db/mix.exs index 4efe0df1ef..1350a5d70a 100644 --- a/clients/alloy_db/mix.exs +++ b/clients/alloy_db/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.AlloyDB.Mixfile do use Mix.Project - @version "0.4.0" + @version "0.5.0" def project() do [