Skip to content

Commit ec88807

Browse files
feat: Automated regeneration of Compute client (googleapis#12401)
Auto-created at 2024-10-24 13:17:39 +0000 using the toys pull request generator.
1 parent ce6e1f4 commit ec88807

17 files changed

+147
-345
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.66"}]
14+
[{:google_api_compute, "~> 0.67"}]
1515
end
1616
```
1717

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 "20241008"
23+
@discovery_revision "20241015"
2424

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
defmodule GoogleApi.Compute.V1.Model.AuditConfig do
1919
@moduledoc """
20-
Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts [email protected] from DATA_READ logging, and [email protected] from DATA_WRITE logging.
20+
Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
2121
2222
## Attributes
2323

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ defmodule GoogleApi.Compute.V1.Model.Binding do
2121
2222
## Attributes
2323
24-
* `bindingId` (*type:* `String.t`, *default:* `nil`) - This is deprecated and has no effect. Do not use.
2524
* `condition` (*type:* `GoogleApi.Compute.V1.Model.Expr.t`, *default:* `nil`) - The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2625
* `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
2726
* `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
@@ -30,13 +29,11 @@ defmodule GoogleApi.Compute.V1.Model.Binding do
3029
use GoogleApi.Gax.ModelBase
3130

3231
@type t :: %__MODULE__{
33-
:bindingId => String.t() | nil,
3432
:condition => GoogleApi.Compute.V1.Model.Expr.t() | nil,
3533
:members => list(String.t()) | nil,
3634
:role => String.t() | nil
3735
}
3836

39-
field(:bindingId)
4037
field(:condition, as: GoogleApi.Compute.V1.Model.Expr)
4138
field(:members, type: :list)
4239
field(:role)

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

Lines changed: 0 additions & 58 deletions
This file was deleted.

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ defmodule GoogleApi.Compute.V1.Model.InstanceGroupManager do
3030
* `distributionPolicy` (*type:* `GoogleApi.Compute.V1.Model.DistributionPolicy.t`, *default:* `nil`) - Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
3131
* `fingerprint` (*type:* `String.t`, *default:* `nil`) - Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
3232
* `id` (*type:* `String.t`, *default:* `nil`) - [Output Only] A unique identifier for this resource type. The server generates this identifier.
33+
* `instanceFlexibilityPolicy` (*type:* `GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicy.t`, *default:* `nil`) - Instance flexibility allowing MIG to create VMs from multiple types of machines. Instance flexibility configuration on MIG overrides instance template configuration.
3334
* `instanceGroup` (*type:* `String.t`, *default:* `nil`) - [Output Only] The URL of the Instance Group resource.
3435
* `instanceLifecyclePolicy` (*type:* `GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceLifecyclePolicy.t`, *default:* `nil`) - The repair policy for this managed instance group.
3536
* `instanceTemplate` (*type:* `String.t`, *default:* `nil`) - The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.
3637
* `kind` (*type:* `String.t`, *default:* `compute#instanceGroupManager`) - [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
3738
* `listManagedInstancesResults` (*type:* `String.t`, *default:* `nil`) - Pagination behavior of the listManagedInstances API method for this managed instance group.
3839
* `name` (*type:* `String.t`, *default:* `nil`) - The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
39-
* `namedPorts` (*type:* `list(GoogleApi.Compute.V1.Model.NamedPort.t)`, *default:* `nil`) - Named ports configured for the Instance Groups complementary to this Instance Group Manager.
40+
* `namedPorts` (*type:* `list(GoogleApi.Compute.V1.Model.NamedPort.t)`, *default:* `nil`) - [Output Only] Named ports configured on the Instance Groups complementary to this Instance Group Manager.
4041
* `region` (*type:* `String.t`, *default:* `nil`) - [Output Only] The URL of the region where the managed instance group resides (for regional resources).
4142
* `satisfiesPzi` (*type:* `boolean()`, *default:* `nil`) - [Output Only] Reserved for future use.
4243
* `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - [Output Only] Reserved for future use.
@@ -65,6 +66,8 @@ defmodule GoogleApi.Compute.V1.Model.InstanceGroupManager do
6566
:distributionPolicy => GoogleApi.Compute.V1.Model.DistributionPolicy.t() | nil,
6667
:fingerprint => String.t() | nil,
6768
:id => String.t() | nil,
69+
:instanceFlexibilityPolicy =>
70+
GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicy.t() | nil,
6871
:instanceGroup => String.t() | nil,
6972
:instanceLifecyclePolicy =>
7073
GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceLifecyclePolicy.t() | nil,
@@ -100,6 +103,11 @@ defmodule GoogleApi.Compute.V1.Model.InstanceGroupManager do
100103
field(:distributionPolicy, as: GoogleApi.Compute.V1.Model.DistributionPolicy)
101104
field(:fingerprint)
102105
field(:id)
106+
107+
field(:instanceFlexibilityPolicy,
108+
as: GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicy
109+
)
110+
103111
field(:instanceGroup)
104112

105113
field(:instanceLifecyclePolicy,
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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.InstanceGroupManagerInstanceFlexibilityPolicy do
19+
@moduledoc """
20+
21+
22+
## Attributes
23+
24+
* `instanceSelections` (*type:* `%{optional(String.t) => GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection.t}`, *default:* `nil`) - Named instance selections configuring properties that the group will use when creating new VMs.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:instanceSelections =>
31+
%{
32+
optional(String.t()) =>
33+
GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection.t()
34+
}
35+
| nil
36+
}
37+
38+
field(:instanceSelections,
39+
as: GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection,
40+
type: :map
41+
)
42+
end
43+
44+
defimpl Poison.Decoder,
45+
for: GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicy do
46+
def decode(value, options) do
47+
GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicy.decode(
48+
value,
49+
options
50+
)
51+
end
52+
end
53+
54+
defimpl Poison.Encoder,
55+
for: GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicy do
56+
def encode(value, options) do
57+
GoogleApi.Gax.ModelBase.encode(value, options)
58+
end
59+
end
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection do
19+
@moduledoc """
20+
21+
22+
## Attributes
23+
24+
* `machineTypes` (*type:* `list(String.t)`, *default:* `nil`) - Full machine-type names, e.g. "n1-standard-16".
25+
* `rank` (*type:* `integer()`, *default:* `nil`) - Preference of this instance selection. Lower number means higher preference. MIG will first try to create a VM based on the machine-type with lowest rank and fallback to next rank based on availability. Machine types and instance selections with the same rank have the same preference.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:machineTypes => list(String.t()) | nil,
32+
:rank => integer() | nil
33+
}
34+
35+
field(:machineTypes, type: :list)
36+
field(:rank)
37+
end
38+
39+
defimpl Poison.Decoder,
40+
for: GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection do
41+
def decode(value, options) do
42+
GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection.decode(
43+
value,
44+
options
45+
)
46+
end
47+
end
48+
49+
defimpl Poison.Encoder,
50+
for: GoogleApi.Compute.V1.Model.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection do
51+
def encode(value, options) do
52+
GoogleApi.Gax.ModelBase.encode(value, options)
53+
end
54+
end

0 commit comments

Comments
 (0)