Skip to content

Commit

Permalink
feat: Automated regeneration of OrgPolicy client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Dec 7, 2024
1 parent f864fd8 commit b7c7fc5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clients/org_policy/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_org_policy, "~> 0.8"}]
[{:google_api_org_policy, "~> 0.9"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.OrgPolicy.V2 do
API client metadata for GoogleApi.OrgPolicy.V2.
"""

@discovery_revision "20241021"
@discovery_revision "20241129"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ defmodule GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Constraint do
* `listConstraint` (*type:* `GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintListConstraint.t`, *default:* `nil`) - Defines this constraint as being a ListConstraint.
* `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The resource name of the constraint. Must be in one of the following forms: * `projects/{project_number}/constraints/{constraint_name}` * `folders/{folder_id}/constraints/{constraint_name}` * `organizations/{organization_id}/constraints/{constraint_name}` For example, "/projects/123/constraints/compute.disableSerialPortAccess".
* `supportsDryRun` (*type:* `boolean()`, *default:* `nil`) - Shows if dry run is supported for this constraint or not.
* `supportsSimulation` (*type:* `boolean()`, *default:* `nil`) - Shows if simulation is supported for this constraint or not.
"""

use GoogleApi.Gax.ModelBase
Expand All @@ -42,7 +43,8 @@ defmodule GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Constraint do
:listConstraint =>
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ConstraintListConstraint.t() | nil,
:name => String.t() | nil,
:supportsDryRun => boolean() | nil
:supportsDryRun => boolean() | nil,
:supportsSimulation => boolean() | nil
}

field(:booleanConstraint,
Expand All @@ -59,6 +61,7 @@ defmodule GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Constraint do

field(:name)
field(:supportsDryRun)
field(:supportsSimulation)
end

defimpl Poison.Decoder, for: GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Constraint do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ defmodule GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2PolicySpecPolicyRul
* `condition` (*type:* `GoogleApi.OrgPolicy.V2.Model.GoogleTypeExpr.t`, *default:* `nil`) - A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')".
* `denyAll` (*type:* `boolean()`, *default:* `nil`) - Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
* `enforce` (*type:* `boolean()`, *default:* `nil`) - If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.
* `parameters` (*type:* `map()`, *default:* `nil`) - Optional. Required for GMCs if parameters defined in constraints. Pass parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], "allowAll" : true }
* `values` (*type:* `GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues.t`, *default:* `nil`) - List of values to be used for this policy rule. This field can be set only in policies for list constraints.
"""

Expand All @@ -35,6 +36,7 @@ defmodule GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2PolicySpecPolicyRul
:condition => GoogleApi.OrgPolicy.V2.Model.GoogleTypeExpr.t() | nil,
:denyAll => boolean() | nil,
:enforce => boolean() | nil,
:parameters => map() | nil,
:values =>
GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues.t()
| nil
Expand All @@ -44,6 +46,7 @@ defmodule GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2PolicySpecPolicyRul
field(:condition, as: GoogleApi.OrgPolicy.V2.Model.GoogleTypeExpr)
field(:denyAll)
field(:enforce)
field(:parameters, type: :map)

field(:values,
as: GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues
Expand Down
2 changes: 1 addition & 1 deletion clients/org_policy/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.OrgPolicy.Mixfile do
use Mix.Project

@version "0.8.0"
@version "0.9.0"

def project() do
[
Expand Down

0 comments on commit b7c7fc5

Please sign in to comment.