Skip to content

Commit 0f668fb

Browse files
feat: Automated regeneration of OrgPolicy client (googleapis#12384)
Auto-created at 2024-10-23 13:16:03 +0000 using the toys pull request generator.
1 parent c3d8c36 commit 0f668fb

7 files changed

+212
-4
lines changed

clients/org_policy/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_org_policy, "~> 0.7"}]
14+
[{:google_api_org_policy, "~> 0.8"}]
1515
end
1616
```
1717

clients/org_policy/lib/google_api/org_policy/v2/metadata.ex

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

23-
@discovery_revision "20240513"
23+
@discovery_revision "20241021"
2424

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

clients/org_policy/lib/google_api/org_policy/v2/model/google_cloud_orgpolicy_v2_constraint_boolean_constraint.ex

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,20 @@ defmodule GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintBooleanCo
2121
2222
## Attributes
2323
24+
* `customConstraintDefinition` (*type:* `GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition.t`, *default:* `nil`) - Custom constraint definition. This is set only for Managed Constraints
2425
"""
2526

2627
use GoogleApi.Gax.ModelBase
2728

28-
@type t :: %__MODULE__{}
29+
@type t :: %__MODULE__{
30+
:customConstraintDefinition =>
31+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition.t()
32+
| nil
33+
}
34+
35+
field(:customConstraintDefinition,
36+
as: GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition
37+
)
2938
end
3039

3140
defimpl Poison.Decoder,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition do
19+
@moduledoc """
20+
Currently used for Managed Constraints. This represents a subset of fields missing from Constraint proto that are required to describe CustomConstraint
21+
22+
## Attributes
23+
24+
* `actionType` (*type:* `String.t`, *default:* `nil`) - Allow or deny type.
25+
* `condition` (*type:* `String.t`, *default:* `nil`) - Org policy condition/expression. For example: `resource.instanceName.matches("[production|test]_.*_(\\d)+")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
26+
* `methodTypes` (*type:* `list(String.t)`, *default:* `nil`) - All the operations being applied for this constraint.
27+
* `parameters` (*type:* `%{optional(String.t) => GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter.t}`, *default:* `nil`) - Stores Structure of parameters used by Constraint condition. Key of map represents name of the parameter.
28+
* `resourceTypes` (*type:* `list(String.t)`, *default:* `nil`) - The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
29+
"""
30+
31+
use GoogleApi.Gax.ModelBase
32+
33+
@type t :: %__MODULE__{
34+
:actionType => String.t() | nil,
35+
:condition => String.t() | nil,
36+
:methodTypes => list(String.t()) | nil,
37+
:parameters =>
38+
%{
39+
optional(String.t()) =>
40+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter.t()
41+
}
42+
| nil,
43+
:resourceTypes => list(String.t()) | nil
44+
}
45+
46+
field(:actionType)
47+
field(:condition)
48+
field(:methodTypes, type: :list)
49+
50+
field(:parameters,
51+
as:
52+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter,
53+
type: :map
54+
)
55+
56+
field(:resourceTypes, type: :list)
57+
end
58+
59+
defimpl Poison.Decoder,
60+
for: GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition do
61+
def decode(value, options) do
62+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition.decode(
63+
value,
64+
options
65+
)
66+
end
67+
end
68+
69+
defimpl Poison.Encoder,
70+
for: GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition do
71+
def encode(value, options) do
72+
GoogleApi.Gax.ModelBase.encode(value, options)
73+
end
74+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter do
19+
@moduledoc """
20+
Defines a parameter structure.
21+
22+
## Attributes
23+
24+
* `defaultValue` (*type:* `any()`, *default:* `nil`) - Sets the value of the parameter in an assignment if no value is given.
25+
* `item` (*type:* `String.t`, *default:* `nil`) - Determines the parameter’s value structure. For example, LIST can be specified by defining type : LIST, and item type as : STRING.
26+
* `metadata` (*type:* `GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata.t`, *default:* `nil`) - Defines subproperties primarily used by the UI to display user-friendly information.
27+
* `type` (*type:* `String.t`, *default:* `nil`) - Type of the parameter.
28+
* `validValuesExpr` (*type:* `String.t`, *default:* `nil`) - Provides a CEL expression to specify the acceptable parameter values during assignment. For example, parameterName in ("parameterValue1", "parameterValue2")
29+
"""
30+
31+
use GoogleApi.Gax.ModelBase
32+
33+
@type t :: %__MODULE__{
34+
:defaultValue => any() | nil,
35+
:item => String.t() | nil,
36+
:metadata =>
37+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata.t()
38+
| nil,
39+
:type => String.t() | nil,
40+
:validValuesExpr => String.t() | nil
41+
}
42+
43+
field(:defaultValue)
44+
field(:item)
45+
46+
field(:metadata,
47+
as:
48+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata
49+
)
50+
51+
field(:type)
52+
field(:validValuesExpr)
53+
end
54+
55+
defimpl Poison.Decoder,
56+
for:
57+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter do
58+
def decode(value, options) do
59+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter.decode(
60+
value,
61+
options
62+
)
63+
end
64+
end
65+
66+
defimpl Poison.Encoder,
67+
for:
68+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter do
69+
def encode(value, options) do
70+
GoogleApi.Gax.ModelBase.encode(value, options)
71+
end
72+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata do
19+
@moduledoc """
20+
Defines Medata structure.
21+
22+
## Attributes
23+
24+
* `description` (*type:* `String.t`, *default:* `nil`) - Detailed description of what this `parameter` is and use of it. Mutable.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:description => String.t() | nil
31+
}
32+
33+
field(:description)
34+
end
35+
36+
defimpl Poison.Decoder,
37+
for:
38+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata do
39+
def decode(value, options) do
40+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata.decode(
41+
value,
42+
options
43+
)
44+
end
45+
end
46+
47+
defimpl Poison.Encoder,
48+
for:
49+
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata do
50+
def encode(value, options) do
51+
GoogleApi.Gax.ModelBase.encode(value, options)
52+
end
53+
end

clients/org_policy/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
defmodule GoogleApi.OrgPolicy.Mixfile do
1919
use Mix.Project
2020

21-
@version "0.7.0"
21+
@version "0.8.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)