Skip to content

Commit 2d4eaa6

Browse files
feat: Automated regeneration of Compute client (googleapis#12784)
Auto-created at 2025-01-08 13:14:09 +0000 using the toys pull request generator.
1 parent 9659530 commit 2d4eaa6

16 files changed

+436
-11
lines changed

clients/compute/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_compute, "~> 0.70"}]
14+
[{:google_api_compute, "~> 0.71"}]
1515
end
1616
```
1717

clients/compute/lib/google_api/compute/v1/api/network_firewall_policies.ex

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,94 @@ defmodule GoogleApi.Compute.V1.Api.NetworkFirewallPolicies do
194194
|> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}])
195195
end
196196

197+
@doc """
198+
Retrieves an aggregated list of network firewall policies, listing network firewall policies from all applicable scopes (global and regional) and grouping the results per scope. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
199+
200+
## Parameters
201+
202+
* `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server
203+
* `project` (*type:* `String.t`) - Project ID for this request.
204+
* `optional_params` (*type:* `keyword()`) - Optional parameters
205+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
206+
* `:access_token` (*type:* `String.t`) - OAuth access token.
207+
* `:alt` (*type:* `String.t`) - Data format for response.
208+
* `:callback` (*type:* `String.t`) - JSONP
209+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
210+
* `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
211+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
212+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
213+
* `: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.
214+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
215+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
216+
* `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`.
217+
* `:filter` (*type:* `String.t`) - A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.
218+
* `:includeAllScopes` (*type:* `boolean()`) - Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
219+
* `:maxResults` (*type:* `integer()`) - The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
220+
* `:orderBy` (*type:* `String.t`) - Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
221+
* `:pageToken` (*type:* `String.t`) - Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
222+
* `:returnPartialSuccess` (*type:* `boolean()`) - Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
223+
* `:serviceProjectNumber` (*type:* `String.t`) - The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api.
224+
* `opts` (*type:* `keyword()`) - Call options
225+
226+
## Returns
227+
228+
* `{:ok, %GoogleApi.Compute.V1.Model.NetworkFirewallPolicyAggregatedList{}}` on success
229+
* `{:error, info}` on failure
230+
"""
231+
@spec compute_network_firewall_policies_aggregated_list(
232+
Tesla.Env.client(),
233+
String.t(),
234+
keyword(),
235+
keyword()
236+
) ::
237+
{:ok, GoogleApi.Compute.V1.Model.NetworkFirewallPolicyAggregatedList.t()}
238+
| {:ok, Tesla.Env.t()}
239+
| {:ok, list()}
240+
| {:error, any()}
241+
def compute_network_firewall_policies_aggregated_list(
242+
connection,
243+
project,
244+
optional_params \\ [],
245+
opts \\ []
246+
) do
247+
optional_params_config = %{
248+
:"$.xgafv" => :query,
249+
:access_token => :query,
250+
:alt => :query,
251+
:callback => :query,
252+
:fields => :query,
253+
:key => :query,
254+
:oauth_token => :query,
255+
:prettyPrint => :query,
256+
:quotaUser => :query,
257+
:uploadType => :query,
258+
:upload_protocol => :query,
259+
:userIp => :query,
260+
:filter => :query,
261+
:includeAllScopes => :query,
262+
:maxResults => :query,
263+
:orderBy => :query,
264+
:pageToken => :query,
265+
:returnPartialSuccess => :query,
266+
:serviceProjectNumber => :query
267+
}
268+
269+
request =
270+
Request.new()
271+
|> Request.method(:get)
272+
|> Request.url("/projects/{project}/aggregated/firewallPolicies", %{
273+
"project" => URI.encode(project, &URI.char_unreserved?/1)
274+
})
275+
|> Request.add_optional_params(optional_params_config, optional_params)
276+
|> Request.library_version(@library_version)
277+
278+
connection
279+
|> Connection.execute(request)
280+
|> Response.decode(
281+
opts ++ [struct: %GoogleApi.Compute.V1.Model.NetworkFirewallPolicyAggregatedList{}]
282+
)
283+
end
284+
197285
@doc """
198286
Copies rules to the specified firewall policy.
199287

clients/compute/lib/google_api/compute/v1/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.Compute.V1 do
2020
API client metadata for GoogleApi.Compute.V1.
2121
"""
2222

23-
@discovery_revision "20241201"
23+
@discovery_revision "20241231"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/compute/lib/google_api/compute/v1/model/access_config.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ defmodule GoogleApi.Compute.V1.Model.AccessConfig do
2828
* `natIP` (*type:* `String.t`, *default:* `nil`) - Applies to accessConfigs (IPv4) only. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
2929
* `networkTier` (*type:* `String.t`, *default:* `nil`) - This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
3030
* `publicPtrDomainName` (*type:* `String.t`, *default:* `nil`) - The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be created for first IP in associated external IPv6 range.
31-
* `securityPolicy` (*type:* `String.t`, *default:* `nil`) - [Output Only] The resource URL for the security policy associated with this access config.
31+
* `securityPolicy` (*type:* `String.t`, *default:* `nil`) - The resource URL for the security policy associated with this access config.
3232
* `setPublicPtr` (*type:* `boolean()`, *default:* `nil`) - Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated.
3333
* `type` (*type:* `String.t`, *default:* `nil`) - The type of configuration. In accessConfigs (IPv4), the default and only option is ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and only option is DIRECT_IPV6.
3434
"""

clients/compute/lib/google_api/compute/v1/model/attached_disk_initialize_params.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ defmodule GoogleApi.Compute.V1.Model.AttachedDiskInitializeParams do
3737
* `resourcePolicies` (*type:* `list(String.t)`, *default:* `nil`) - Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
3838
* `sourceImage` (*type:* `String.t`, *default:* `nil`) - The source image to create this disk. When creating a new instance boot disk, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a custom image that you created, specify the image name in the following format: global/images/my-custom-image You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-image-family If the source image is deleted later, this field will not be set.
3939
* `sourceImageEncryptionKey` (*type:* `GoogleApi.Compute.V1.Model.CustomerEncryptionKey.t`, *default:* `nil`) - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. InstanceTemplate and InstancePropertiesPatch do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
40-
* `sourceSnapshot` (*type:* `String.t`, *default:* `nil`) - The source snapshot to create this disk. When creating a new instance boot disk, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required. To create a disk with a snapshot that you created, specify the snapshot name in the following format: global/snapshots/my-backup If the source snapshot is deleted later, this field will not be set.
40+
* `sourceSnapshot` (*type:* `String.t`, *default:* `nil`) - The source snapshot to create this disk. When creating a new instance boot disk, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required. To create a disk with a snapshot that you created, specify the snapshot name in the following format: global/snapshots/my-backup If the source snapshot is deleted later, this field will not be set. Note: You cannot create VMs in bulk using a snapshot as the source. Use an image instead when you create VMs using the bulk insert method.
4141
* `sourceSnapshotEncryptionKey` (*type:* `GoogleApi.Compute.V1.Model.CustomerEncryptionKey.t`, *default:* `nil`) - The customer-supplied encryption key of the source snapshot.
4242
* `storagePool` (*type:* `String.t`, *default:* `nil`) - The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool
4343
"""

clients/compute/lib/google_api/compute/v1/model/error_info.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule GoogleApi.Compute.V1.Model.ErrorInfo do
2222
## Attributes
2323
2424
* `domain` (*type:* `String.t`, *default:* `nil`) - The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
25-
* `metadatas` (*type:* `map()`, *default:* `nil`) - Additional structured details about this error. Keys must match /a-z+/ but should ideally be lowerCamelCase. Also they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request.
25+
* `metadatas` (*type:* `map()`, *default:* `nil`) - Additional structured details about this error. Keys must match a regular expression of `a-z+` but should ideally be lowerCamelCase. Also, they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than `{"instanceLimit": "100/request"}`, should be returned as, `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of instances that can be created in a single (batch) request.
2626
* `reason` (*type:* `String.t`, *default:* `nil`) - The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
2727
"""
2828

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Compute.V1.Model.FirewallPoliciesScopedList do
19+
@moduledoc """
20+
21+
22+
## Attributes
23+
24+
* `firewallPolicies` (*type:* `list(GoogleApi.Compute.V1.Model.FirewallPolicy.t)`, *default:* `nil`) - A list of firewall policies contained in this scope.
25+
* `warning` (*type:* `GoogleApi.Compute.V1.Model.FirewallPoliciesScopedListWarning.t`, *default:* `nil`) - Informational warning which replaces the list of firewall policies when the list is empty.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:firewallPolicies => list(GoogleApi.Compute.V1.Model.FirewallPolicy.t()) | nil,
32+
:warning => GoogleApi.Compute.V1.Model.FirewallPoliciesScopedListWarning.t() | nil
33+
}
34+
35+
field(:firewallPolicies, as: GoogleApi.Compute.V1.Model.FirewallPolicy, type: :list)
36+
field(:warning, as: GoogleApi.Compute.V1.Model.FirewallPoliciesScopedListWarning)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.FirewallPoliciesScopedList do
40+
def decode(value, options) do
41+
GoogleApi.Compute.V1.Model.FirewallPoliciesScopedList.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.FirewallPoliciesScopedList do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end

0 commit comments

Comments
 (0)