Skip to content

Commit

Permalink
feat: Automated regeneration of OrgPolicy client (#10990)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-code-bot authored Mar 12, 2024
1 parent aaba027 commit 9cefb68
Show file tree
Hide file tree
Showing 17 changed files with 108 additions and 87 deletions.
2 changes: 1 addition & 1 deletion clients/org_policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Organization Policy API client library.

The Org Policy API allows users to configure governance rules on their GCP resources across the Cloud Resource Hierarchy.
The Organization Policy API allows users to configure governance rules on their Google Cloud resources across the resource hierarchy.

## Installation

Expand Down
34 changes: 19 additions & 15 deletions clients/org_policy/lib/google_api/org_policy/v2/api/folders.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
@library_version Mix.Project.config() |> Keyword.get(:version, "")

@doc """
Lists `Constraints` that could be applied on the specified resource.
Lists constraints that could be applied on the specified resource.
## Parameters
* `connection` (*type:* `GoogleApi.OrgPolicy.V2.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`
* `parent` (*type:* `String.t`) - Required. The Google Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -93,12 +93,12 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
end

@doc """
Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Cloud resource.
Creates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Google Cloud resource.
## Parameters
* `connection` (*type:* `GoogleApi.OrgPolicy.V2.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`
* `parent` (*type:* `String.t`) - Required. The Google Cloud resource that will parent the new policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -157,12 +157,12 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
end

@doc """
Deletes a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or Org Policy does not exist.
Deletes a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not exist.
## Parameters
* `connection` (*type:* `GoogleApi.OrgPolicy.V2.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. Name of the policy to delete. See `Policy` for naming rules.
* `name` (*type:* `String.t`) - Required. Name of the policy to delete. See the policy entry for naming rules.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand All @@ -175,6 +175,7 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
* `: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.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:etag` (*type:* `String.t`) - Optional. The current etag of policy. If an etag is provided and does not match the current etag of the policy, deletion will be blocked and an ABORTED error will be returned.
* `opts` (*type:* `keyword()`) - Call options
## Returns
Expand All @@ -199,7 +200,8 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query
:upload_protocol => :query,
:etag => :query
}

request =
Expand All @@ -217,12 +219,12 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
end

@doc """
Gets a `Policy` on a resource. If no `Policy` is set on the resource, NOT_FOUND is returned. The `etag` value can be used with `UpdatePolicy()` to update a `Policy` during read-modify-write.
Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND` is returned. The `etag` value can be used with `UpdatePolicy()` to update a policy during read-modify-write.
## Parameters
* `connection` (*type:* `GoogleApi.OrgPolicy.V2.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. Resource name of the policy. See `Policy` for naming requirements.
* `name` (*type:* `String.t`) - Required. Resource name of the policy. See Policy for naming requirements.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -279,12 +281,12 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
end

@doc """
Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy and evaluating conditions. The returned `Policy` will not have an `etag` or `condition` set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.
Gets the effective policy on a resource. This is the result of merging policies in the resource hierarchy and evaluating conditions. The returned policy will not have an `etag` or `condition` set because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.
## Parameters
* `connection` (*type:* `GoogleApi.OrgPolicy.V2.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The effective policy to compute. See `Policy` for naming rules.
* `name` (*type:* `String.t`) - Required. The effective policy to compute. See Policy for naming requirements.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -351,12 +353,12 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
end

@doc """
Retrieves all of the `Policies` that exist on a particular resource.
Retrieves all of the policies that exist on a particular resource.
## Parameters
* `connection` (*type:* `GoogleApi.OrgPolicy.V2.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`
* `parent` (*type:* `String.t`) - Required. The target Google Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -417,12 +419,12 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
end

@doc """
Updates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.
Updates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.
## Parameters
* `connection` (*type:* `GoogleApi.OrgPolicy.V2.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
* `name` (*type:* `String.t`) - Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand All @@ -435,6 +437,7 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
* `: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.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:updateMask` (*type:* `String.t`) - Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
* `:body` (*type:* `GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Policy.t`) -
* `opts` (*type:* `keyword()`) - Call options
Expand All @@ -461,6 +464,7 @@ defmodule GoogleApi.OrgPolicy.V2.Api.Folders do
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:updateMask => :query,
:body => :body
}

Expand Down
Loading

0 comments on commit 9cefb68

Please sign in to comment.