Skip to content

Commit 769d2a0

Browse files
feat: Automated regeneration of DLP client (#13155)
Auto-created at 2025-03-14 13:12:50 +0000 using the toys pull request generator.
1 parent f05a57b commit 769d2a0

7 files changed

+220
-3
lines changed

clients/dlp/lib/google_api/dlp/v2/api/organizations.ex

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,6 +2399,84 @@ defmodule GoogleApi.DLP.V2.Api.Organizations do
23992399
)
24002400
end
24012401

2402+
@doc """
2403+
Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.
2404+
2405+
## Parameters
2406+
2407+
* `connection` (*type:* `GoogleApi.DLP.V2.Connection.t`) - Connection to server
2408+
* `parent` (*type:* `String.t`) - The parent resource name. The format of this value is as follows: `locations/{location_id}`
2409+
* `optional_params` (*type:* `keyword()`) - Optional parameters
2410+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
2411+
* `:access_token` (*type:* `String.t`) - OAuth access token.
2412+
* `:alt` (*type:* `String.t`) - Data format for response.
2413+
* `:callback` (*type:* `String.t`) - JSONP
2414+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
2415+
* `: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.
2416+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
2417+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
2418+
* `: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.
2419+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
2420+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
2421+
* `:filter` (*type:* `String.t`) - filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.
2422+
* `:languageCode` (*type:* `String.t`) - BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.
2423+
* `:locationId` (*type:* `String.t`) - Deprecated. This field has no effect.
2424+
* `opts` (*type:* `keyword()`) - Call options
2425+
2426+
## Returns
2427+
2428+
* `{:ok, %GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ListInfoTypesResponse{}}` on success
2429+
* `{:error, info}` on failure
2430+
"""
2431+
@spec dlp_organizations_locations_info_types_list(
2432+
Tesla.Env.client(),
2433+
String.t(),
2434+
keyword(),
2435+
keyword()
2436+
) ::
2437+
{:ok, GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ListInfoTypesResponse.t()}
2438+
| {:ok, Tesla.Env.t()}
2439+
| {:ok, list()}
2440+
| {:error, any()}
2441+
def dlp_organizations_locations_info_types_list(
2442+
connection,
2443+
parent,
2444+
optional_params \\ [],
2445+
opts \\ []
2446+
) do
2447+
optional_params_config = %{
2448+
:"$.xgafv" => :query,
2449+
:access_token => :query,
2450+
:alt => :query,
2451+
:callback => :query,
2452+
:fields => :query,
2453+
:key => :query,
2454+
:oauth_token => :query,
2455+
:prettyPrint => :query,
2456+
:quotaUser => :query,
2457+
:uploadType => :query,
2458+
:upload_protocol => :query,
2459+
:filter => :query,
2460+
:languageCode => :query,
2461+
:locationId => :query
2462+
}
2463+
2464+
request =
2465+
Request.new()
2466+
|> Request.method(:get)
2467+
|> Request.url("/v2/{+parent}/infoTypes", %{
2468+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
2469+
})
2470+
|> Request.add_optional_params(optional_params_config, optional_params)
2471+
|> Request.library_version(@library_version)
2472+
2473+
connection
2474+
|> Connection.execute(request)
2475+
|> Response.decode(
2476+
opts ++ [struct: %GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ListInfoTypesResponse{}]
2477+
)
2478+
end
2479+
24022480
@doc """
24032481
Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
24042482

clients/dlp/lib/google_api/dlp/v2/api/projects.ex

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3984,6 +3984,84 @@ defmodule GoogleApi.DLP.V2.Api.Projects do
39843984
)
39853985
end
39863986

3987+
@doc """
3988+
Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.
3989+
3990+
## Parameters
3991+
3992+
* `connection` (*type:* `GoogleApi.DLP.V2.Connection.t`) - Connection to server
3993+
* `parent` (*type:* `String.t`) - The parent resource name. The format of this value is as follows: `locations/{location_id}`
3994+
* `optional_params` (*type:* `keyword()`) - Optional parameters
3995+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
3996+
* `:access_token` (*type:* `String.t`) - OAuth access token.
3997+
* `:alt` (*type:* `String.t`) - Data format for response.
3998+
* `:callback` (*type:* `String.t`) - JSONP
3999+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
4000+
* `: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.
4001+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
4002+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
4003+
* `: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.
4004+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
4005+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
4006+
* `:filter` (*type:* `String.t`) - filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.
4007+
* `:languageCode` (*type:* `String.t`) - BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.
4008+
* `:locationId` (*type:* `String.t`) - Deprecated. This field has no effect.
4009+
* `opts` (*type:* `keyword()`) - Call options
4010+
4011+
## Returns
4012+
4013+
* `{:ok, %GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ListInfoTypesResponse{}}` on success
4014+
* `{:error, info}` on failure
4015+
"""
4016+
@spec dlp_projects_locations_info_types_list(
4017+
Tesla.Env.client(),
4018+
String.t(),
4019+
keyword(),
4020+
keyword()
4021+
) ::
4022+
{:ok, GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ListInfoTypesResponse.t()}
4023+
| {:ok, Tesla.Env.t()}
4024+
| {:ok, list()}
4025+
| {:error, any()}
4026+
def dlp_projects_locations_info_types_list(
4027+
connection,
4028+
parent,
4029+
optional_params \\ [],
4030+
opts \\ []
4031+
) do
4032+
optional_params_config = %{
4033+
:"$.xgafv" => :query,
4034+
:access_token => :query,
4035+
:alt => :query,
4036+
:callback => :query,
4037+
:fields => :query,
4038+
:key => :query,
4039+
:oauth_token => :query,
4040+
:prettyPrint => :query,
4041+
:quotaUser => :query,
4042+
:uploadType => :query,
4043+
:upload_protocol => :query,
4044+
:filter => :query,
4045+
:languageCode => :query,
4046+
:locationId => :query
4047+
}
4048+
4049+
request =
4050+
Request.new()
4051+
|> Request.method(:get)
4052+
|> Request.url("/v2/{+parent}/infoTypes", %{
4053+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
4054+
})
4055+
|> Request.add_optional_params(optional_params_config, optional_params)
4056+
|> Request.library_version(@library_version)
4057+
4058+
connection
4059+
|> Connection.execute(request)
4060+
|> Response.decode(
4061+
opts ++ [struct: %GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ListInfoTypesResponse{}]
4062+
)
4063+
end
4064+
39874065
@doc """
39884066
Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
39894067

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

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

23-
@discovery_revision "20250305"
23+
@discovery_revision "20250309"
2424

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

clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_file_store_data_profile.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ defmodule GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileStoreDataProfile do
4646
* `sampleFindingsTable` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2BigQueryTable.t`, *default:* `nil`) - The BigQuery table to which the sample findings are written.
4747
* `sensitivityScore` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore.t`, *default:* `nil`) - The sensitivity score of this resource.
4848
* `state` (*type:* `String.t`, *default:* `nil`) - State of a profile.
49+
* `tags` (*type:* `list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Tag.t)`, *default:* `nil`) - The tags attached to the resource, including any tags attached during profiling.
4950
"""
5051

5152
use GoogleApi.Gax.ModelBase
@@ -82,7 +83,8 @@ defmodule GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileStoreDataProfile do
8283
GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2BigQueryTable.t() | nil,
8384
:sensitivityScore =>
8485
GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore.t() | nil,
85-
:state => String.t() | nil
86+
:state => String.t() | nil,
87+
:tags => list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Tag.t()) | nil
8688
}
8789

8890
field(:configSnapshot, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DataProfileConfigSnapshot)
@@ -124,6 +126,7 @@ defmodule GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileStoreDataProfile do
124126
field(:sampleFindingsTable, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2BigQueryTable)
125127
field(:sensitivityScore, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore)
126128
field(:state)
129+
field(:tags, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Tag, type: :list)
127130
end
128131

129132
defimpl Poison.Decoder, for: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileStoreDataProfile do

clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_info_type_description.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ defmodule GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InfoTypeDescription do
2727
* `example` (*type:* `String.t`, *default:* `nil`) - A sample that is a true positive for this infoType.
2828
* `name` (*type:* `String.t`, *default:* `nil`) - Internal name of the infoType.
2929
* `sensitivityScore` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore.t`, *default:* `nil`) - The default sensitivity of the infoType.
30+
* `specificInfoTypes` (*type:* `list(String.t)`, *default:* `nil`) - If this field is set, this infoType is a general infoType and these specific infoTypes are contained within it. General infoTypes are infoTypes that encompass multiple specific infoTypes. For example, the "GEOGRAPHIC_DATA" general infoType would have set for this field "LOCATION", "LOCATION_COORDINATES", and "STREET_ADDRESS".
3031
* `supportedBy` (*type:* `list(String.t)`, *default:* `nil`) - Which parts of the API supports this InfoType.
3132
* `versions` (*type:* `list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2VersionDescription.t)`, *default:* `nil`) - A list of available versions for the infotype.
3233
"""
@@ -42,6 +43,7 @@ defmodule GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InfoTypeDescription do
4243
:name => String.t() | nil,
4344
:sensitivityScore =>
4445
GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore.t() | nil,
46+
:specificInfoTypes => list(String.t()) | nil,
4547
:supportedBy => list(String.t()) | nil,
4648
:versions => list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2VersionDescription.t()) | nil
4749
}
@@ -52,6 +54,7 @@ defmodule GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InfoTypeDescription do
5254
field(:example)
5355
field(:name)
5456
field(:sensitivityScore, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore)
57+
field(:specificInfoTypes, type: :list)
5558
field(:supportedBy, type: :list)
5659
field(:versions, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2VersionDescription, type: :list)
5760
end

clients/dlp/lib/google_api/dlp/v2/model/google_privacy_dlp_v2_table_data_profile.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ defmodule GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TableDataProfile do
4949
* `state` (*type:* `String.t`, *default:* `nil`) - State of a profile.
5050
* `tableId` (*type:* `String.t`, *default:* `nil`) - The table ID.
5151
* `tableSizeBytes` (*type:* `String.t`, *default:* `nil`) - The size of the table when the profile was generated.
52+
* `tags` (*type:* `list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Tag.t)`, *default:* `nil`) - The tags attached to the table, including any tags attached during profiling. Because tags are attached to Cloud SQL instances rather than Cloud SQL tables, this field is empty for Cloud SQL table profiles.
5253
"""
5354

5455
use GoogleApi.Gax.ModelBase
@@ -87,7 +88,8 @@ defmodule GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TableDataProfile do
8788
GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore.t() | nil,
8889
:state => String.t() | nil,
8990
:tableId => String.t() | nil,
90-
:tableSizeBytes => String.t() | nil
91+
:tableSizeBytes => String.t() | nil,
92+
:tags => list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Tag.t()) | nil
9193
}
9294

9395
field(:configSnapshot, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DataProfileConfigSnapshot)
@@ -132,6 +134,7 @@ defmodule GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TableDataProfile do
132134
field(:state)
133135
field(:tableId)
134136
field(:tableSizeBytes)
137+
field(:tags, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Tag, type: :list)
135138
end
136139

137140
defimpl Poison.Decoder, for: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TableDataProfile do
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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.DLP.V2.Model.GooglePrivacyDlpV2Tag do
19+
@moduledoc """
20+
A tag associated with a resource.
21+
22+
## Attributes
23+
24+
* `key` (*type:* `String.t`, *default:* `nil`) - The key of a tag key-value pair. For Google Cloud resources, this is the resource name of the key, for example, "tagKeys/123456".
25+
* `namespacedTagValue` (*type:* `String.t`, *default:* `nil`) - The namespaced name for the tag value to attach to Google Cloud resources. Must be in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for example, "123456/environment/prod". This is only set for Google Cloud resources.
26+
* `value` (*type:* `String.t`, *default:* `nil`) - The value of a tag key-value pair. For Google Cloud resources, this is the resource name of the value, for example, "tagValues/123456".
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:key => String.t() | nil,
33+
:namespacedTagValue => String.t() | nil,
34+
:value => String.t() | nil
35+
}
36+
37+
field(:key)
38+
field(:namespacedTagValue)
39+
field(:value)
40+
end
41+
42+
defimpl Poison.Decoder, for: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Tag do
43+
def decode(value, options) do
44+
GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Tag.decode(value, options)
45+
end
46+
end
47+
48+
defimpl Poison.Encoder, for: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Tag do
49+
def encode(value, options) do
50+
GoogleApi.Gax.ModelBase.encode(value, options)
51+
end
52+
end

0 commit comments

Comments
 (0)