Skip to content

Commit 74715b9

Browse files
feat: Automated regeneration of DeveloperConnect client (googleapis#12904)
Auto-created at 2025-01-31 13:15:33 +0000 using the toys pull request generator.
1 parent 4b06ad3 commit 74715b9

File tree

11 files changed

+432
-3
lines changed

11 files changed

+432
-3
lines changed

clients/developer_connect/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_developer_connect, "~> 0.5"}]
14+
[{:google_api_developer_connect, "~> 0.6"}]
1515
end
1616
```
1717

clients/developer_connect/lib/google_api/developer_connect/v1/api/projects.ex

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,6 +1303,150 @@ defmodule GoogleApi.DeveloperConnect.V1.Api.Projects do
13031303
)
13041304
end
13051305

1306+
@doc """
1307+
ProcessBitbucketCloudWebhook is called by the external Bitbucket Cloud instances for notifying events.
1308+
1309+
## Parameters
1310+
1311+
* `connection` (*type:* `GoogleApi.DeveloperConnect.V1.Connection.t`) - Connection to server
1312+
* `name` (*type:* `String.t`) - Required. The GitRepositoryLink where the webhook will be received. Format: `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
1313+
* `optional_params` (*type:* `keyword()`) - Optional parameters
1314+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
1315+
* `:access_token` (*type:* `String.t`) - OAuth access token.
1316+
* `:alt` (*type:* `String.t`) - Data format for response.
1317+
* `:callback` (*type:* `String.t`) - JSONP
1318+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
1319+
* `: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.
1320+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
1321+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
1322+
* `: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.
1323+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
1324+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
1325+
* `:body` (*type:* `GoogleApi.DeveloperConnect.V1.Model.ProcessBitbucketCloudWebhookRequest.t`) -
1326+
* `opts` (*type:* `keyword()`) - Call options
1327+
1328+
## Returns
1329+
1330+
* `{:ok, %GoogleApi.DeveloperConnect.V1.Model.Empty{}}` on success
1331+
* `{:error, info}` on failure
1332+
"""
1333+
@spec developerconnect_projects_locations_connections_git_repository_links_process_bitbucket_cloud_webhook(
1334+
Tesla.Env.client(),
1335+
String.t(),
1336+
keyword(),
1337+
keyword()
1338+
) ::
1339+
{:ok, GoogleApi.DeveloperConnect.V1.Model.Empty.t()}
1340+
| {:ok, Tesla.Env.t()}
1341+
| {:ok, list()}
1342+
| {:error, any()}
1343+
def developerconnect_projects_locations_connections_git_repository_links_process_bitbucket_cloud_webhook(
1344+
connection,
1345+
name,
1346+
optional_params \\ [],
1347+
opts \\ []
1348+
) do
1349+
optional_params_config = %{
1350+
:"$.xgafv" => :query,
1351+
:access_token => :query,
1352+
:alt => :query,
1353+
:callback => :query,
1354+
:fields => :query,
1355+
:key => :query,
1356+
:oauth_token => :query,
1357+
:prettyPrint => :query,
1358+
:quotaUser => :query,
1359+
:uploadType => :query,
1360+
:upload_protocol => :query,
1361+
:body => :body
1362+
}
1363+
1364+
request =
1365+
Request.new()
1366+
|> Request.method(:post)
1367+
|> Request.url("/v1/{+name}:processBitbucketCloudWebhook", %{
1368+
"name" => URI.encode(name, &URI.char_unreserved?/1)
1369+
})
1370+
|> Request.add_optional_params(optional_params_config, optional_params)
1371+
|> Request.library_version(@library_version)
1372+
1373+
connection
1374+
|> Connection.execute(request)
1375+
|> Response.decode(opts ++ [struct: %GoogleApi.DeveloperConnect.V1.Model.Empty{}])
1376+
end
1377+
1378+
@doc """
1379+
ProcessBitbucketDataCenterWebhook is called by the external Bitbucket Data Center instances for notifying events.
1380+
1381+
## Parameters
1382+
1383+
* `connection` (*type:* `GoogleApi.DeveloperConnect.V1.Connection.t`) - Connection to server
1384+
* `name` (*type:* `String.t`) - Required. The GitRepositoryLink where the webhook will be received. Format: `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
1385+
* `optional_params` (*type:* `keyword()`) - Optional parameters
1386+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
1387+
* `:access_token` (*type:* `String.t`) - OAuth access token.
1388+
* `:alt` (*type:* `String.t`) - Data format for response.
1389+
* `:callback` (*type:* `String.t`) - JSONP
1390+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
1391+
* `: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.
1392+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
1393+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
1394+
* `: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.
1395+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
1396+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
1397+
* `:body` (*type:* `GoogleApi.DeveloperConnect.V1.Model.ProcessBitbucketDataCenterWebhookRequest.t`) -
1398+
* `opts` (*type:* `keyword()`) - Call options
1399+
1400+
## Returns
1401+
1402+
* `{:ok, %GoogleApi.DeveloperConnect.V1.Model.Empty{}}` on success
1403+
* `{:error, info}` on failure
1404+
"""
1405+
@spec developerconnect_projects_locations_connections_git_repository_links_process_bitbucket_data_center_webhook(
1406+
Tesla.Env.client(),
1407+
String.t(),
1408+
keyword(),
1409+
keyword()
1410+
) ::
1411+
{:ok, GoogleApi.DeveloperConnect.V1.Model.Empty.t()}
1412+
| {:ok, Tesla.Env.t()}
1413+
| {:ok, list()}
1414+
| {:error, any()}
1415+
def developerconnect_projects_locations_connections_git_repository_links_process_bitbucket_data_center_webhook(
1416+
connection,
1417+
name,
1418+
optional_params \\ [],
1419+
opts \\ []
1420+
) do
1421+
optional_params_config = %{
1422+
:"$.xgafv" => :query,
1423+
:access_token => :query,
1424+
:alt => :query,
1425+
:callback => :query,
1426+
:fields => :query,
1427+
:key => :query,
1428+
:oauth_token => :query,
1429+
:prettyPrint => :query,
1430+
:quotaUser => :query,
1431+
:uploadType => :query,
1432+
:upload_protocol => :query,
1433+
:body => :body
1434+
}
1435+
1436+
request =
1437+
Request.new()
1438+
|> Request.method(:post)
1439+
|> Request.url("/v1/{+name}:processBitbucketDataCenterWebhook", %{
1440+
"name" => URI.encode(name, &URI.char_unreserved?/1)
1441+
})
1442+
|> Request.add_optional_params(optional_params_config, optional_params)
1443+
|> Request.library_version(@library_version)
1444+
1445+
connection
1446+
|> Connection.execute(request)
1447+
|> Response.decode(opts ++ [struct: %GoogleApi.DeveloperConnect.V1.Model.Empty{}])
1448+
end
1449+
13061450
@doc """
13071451
ProcessGitLabEnterpriseWebhook is called by the external GitLab Enterprise instances for notifying events.
13081452

clients/developer_connect/lib/google_api/developer_connect/v1/metadata.ex

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

23-
@discovery_revision "20241205"
23+
@discovery_revision "20250129"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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.DeveloperConnect.V1.Model.BitbucketCloudConfig do
19+
@moduledoc """
20+
Configuration for connections to an instance of Bitbucket Cloud.
21+
22+
## Attributes
23+
24+
* `authorizerCredential` (*type:* `GoogleApi.DeveloperConnect.V1.Model.UserCredential.t`, *default:* `nil`) - Required. An access token with the minimum `repository`, `pullrequest` and `webhook` scope access. It can either be a workspace, project or repository access token. This is needed to create webhooks. It's recommended to use a system account to generate these credentials.
25+
* `readAuthorizerCredential` (*type:* `GoogleApi.DeveloperConnect.V1.Model.UserCredential.t`, *default:* `nil`) - Required. An access token with the minimum `repository` access. It can either be a workspace, project or repository access token. It's recommended to use a system account to generate the credentials.
26+
* `webhookSecretSecretVersion` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/*/secrets/*/versions/*`. This is used to validate and create webhooks.
27+
* `workspace` (*type:* `String.t`, *default:* `nil`) - Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform.
28+
"""
29+
30+
use GoogleApi.Gax.ModelBase
31+
32+
@type t :: %__MODULE__{
33+
:authorizerCredential => GoogleApi.DeveloperConnect.V1.Model.UserCredential.t() | nil,
34+
:readAuthorizerCredential =>
35+
GoogleApi.DeveloperConnect.V1.Model.UserCredential.t() | nil,
36+
:webhookSecretSecretVersion => String.t() | nil,
37+
:workspace => String.t() | nil
38+
}
39+
40+
field(:authorizerCredential, as: GoogleApi.DeveloperConnect.V1.Model.UserCredential)
41+
field(:readAuthorizerCredential, as: GoogleApi.DeveloperConnect.V1.Model.UserCredential)
42+
field(:webhookSecretSecretVersion)
43+
field(:workspace)
44+
end
45+
46+
defimpl Poison.Decoder, for: GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig do
47+
def decode(value, options) do
48+
GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig.decode(value, options)
49+
end
50+
end
51+
52+
defimpl Poison.Encoder, for: GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig do
53+
def encode(value, options) do
54+
GoogleApi.Gax.ModelBase.encode(value, options)
55+
end
56+
end
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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.DeveloperConnect.V1.Model.BitbucketDataCenterConfig do
19+
@moduledoc """
20+
Configuration for connections to an instance of Bitbucket Data Center.
21+
22+
## Attributes
23+
24+
* `authorizerCredential` (*type:* `GoogleApi.DeveloperConnect.V1.Model.UserCredential.t`, *default:* `nil`) - Required. An http access token with the minimum `Repository admin` scope access. This is needed to create webhooks. It's recommended to use a system account to generate these credentials.
25+
* `hostUri` (*type:* `String.t`, *default:* `nil`) - Required. The URI of the Bitbucket Data Center host this connection is for.
26+
* `readAuthorizerCredential` (*type:* `GoogleApi.DeveloperConnect.V1.Model.UserCredential.t`, *default:* `nil`) - Required. An http access token with the minimum `Repository read` access. It's recommended to use a system account to generate the credentials.
27+
* `serverVersion` (*type:* `String.t`, *default:* `nil`) - Output only. Version of the Bitbucket Data Center server running on the `host_uri`.
28+
* `serviceDirectoryConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.ServiceDirectoryConfig.t`, *default:* `nil`) - Optional. Configuration for using Service Directory to privately connect to a Bitbucket Data Center instance. This should only be set if the Bitbucket Data Center is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the Bitbucket Data Center will be made over the public internet.
29+
* `sslCaCertificate` (*type:* `String.t`, *default:* `nil`) - Optional. SSL certificate authority to trust when making requests to Bitbucket Data Center.
30+
* `webhookSecretSecretVersion` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/*/secrets/*/versions/*`. This is used to validate webhooks.
31+
"""
32+
33+
use GoogleApi.Gax.ModelBase
34+
35+
@type t :: %__MODULE__{
36+
:authorizerCredential => GoogleApi.DeveloperConnect.V1.Model.UserCredential.t() | nil,
37+
:hostUri => String.t() | nil,
38+
:readAuthorizerCredential =>
39+
GoogleApi.DeveloperConnect.V1.Model.UserCredential.t() | nil,
40+
:serverVersion => String.t() | nil,
41+
:serviceDirectoryConfig =>
42+
GoogleApi.DeveloperConnect.V1.Model.ServiceDirectoryConfig.t() | nil,
43+
:sslCaCertificate => String.t() | nil,
44+
:webhookSecretSecretVersion => String.t() | nil
45+
}
46+
47+
field(:authorizerCredential, as: GoogleApi.DeveloperConnect.V1.Model.UserCredential)
48+
field(:hostUri)
49+
field(:readAuthorizerCredential, as: GoogleApi.DeveloperConnect.V1.Model.UserCredential)
50+
field(:serverVersion)
51+
field(:serviceDirectoryConfig, as: GoogleApi.DeveloperConnect.V1.Model.ServiceDirectoryConfig)
52+
field(:sslCaCertificate)
53+
field(:webhookSecretSecretVersion)
54+
end
55+
56+
defimpl Poison.Decoder, for: GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig do
57+
def decode(value, options) do
58+
GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig.decode(value, options)
59+
end
60+
end
61+
62+
defimpl Poison.Encoder, for: GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig do
63+
def encode(value, options) do
64+
GoogleApi.Gax.ModelBase.encode(value, options)
65+
end
66+
end

clients/developer_connect/lib/google_api/developer_connect/v1/model/connection.ex

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ defmodule GoogleApi.DeveloperConnect.V1.Model.Connection do
2222
## Attributes
2323
2424
* `annotations` (*type:* `map()`, *default:* `nil`) - Optional. Allows clients to store small amounts of arbitrary data.
25+
* `bitbucketCloudConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig.t`, *default:* `nil`) - Configuration for connections to an instance of Bitbucket Clouds.
26+
* `bitbucketDataCenterConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig.t`, *default:* `nil`) - Configuration for connections to an instance of Bitbucket Data Center.
2527
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. [Output only] Create timestamp
2628
* `cryptoKeyConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.CryptoKeyConfig.t`, *default:* `nil`) - Optional. The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature.
2729
* `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. [Output only] Delete timestamp
2830
* `disabled` (*type:* `boolean()`, *default:* `nil`) - Optional. If disabled is set to true, functionality is disabled for this connection. Repository based API methods and webhooks processing for repositories in this connection will be disabled.
2931
* `etag` (*type:* `String.t`, *default:* `nil`) - Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
32+
* `gitProxyConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig.t`, *default:* `nil`) - Optional. Configuration for the git proxy feature. Enabling the git proxy allows clients to perform git operations on the repositories linked in the connection.
3033
* `githubConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.GitHubConfig.t`, *default:* `nil`) - Configuration for connections to github.com.
3134
* `githubEnterpriseConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.GitHubEnterpriseConfig.t`, *default:* `nil`) - Configuration for connections to an instance of GitHub Enterprise.
3235
* `gitlabConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.GitLabConfig.t`, *default:* `nil`) - Configuration for connections to gitlab.com.
@@ -43,11 +46,16 @@ defmodule GoogleApi.DeveloperConnect.V1.Model.Connection do
4346

4447
@type t :: %__MODULE__{
4548
:annotations => map() | nil,
49+
:bitbucketCloudConfig =>
50+
GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig.t() | nil,
51+
:bitbucketDataCenterConfig =>
52+
GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig.t() | nil,
4653
:createTime => DateTime.t() | nil,
4754
:cryptoKeyConfig => GoogleApi.DeveloperConnect.V1.Model.CryptoKeyConfig.t() | nil,
4855
:deleteTime => DateTime.t() | nil,
4956
:disabled => boolean() | nil,
5057
:etag => String.t() | nil,
58+
:gitProxyConfig => GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig.t() | nil,
5159
:githubConfig => GoogleApi.DeveloperConnect.V1.Model.GitHubConfig.t() | nil,
5260
:githubEnterpriseConfig =>
5361
GoogleApi.DeveloperConnect.V1.Model.GitHubEnterpriseConfig.t() | nil,
@@ -63,11 +71,18 @@ defmodule GoogleApi.DeveloperConnect.V1.Model.Connection do
6371
}
6472

6573
field(:annotations, type: :map)
74+
field(:bitbucketCloudConfig, as: GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig)
75+
76+
field(:bitbucketDataCenterConfig,
77+
as: GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig
78+
)
79+
6680
field(:createTime, as: DateTime)
6781
field(:cryptoKeyConfig, as: GoogleApi.DeveloperConnect.V1.Model.CryptoKeyConfig)
6882
field(:deleteTime, as: DateTime)
6983
field(:disabled)
7084
field(:etag)
85+
field(:gitProxyConfig, as: GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig)
7186
field(:githubConfig, as: GoogleApi.DeveloperConnect.V1.Model.GitHubConfig)
7287
field(:githubEnterpriseConfig, as: GoogleApi.DeveloperConnect.V1.Model.GitHubEnterpriseConfig)
7388
field(:gitlabConfig, as: GoogleApi.DeveloperConnect.V1.Model.GitLabConfig)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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.DeveloperConnect.V1.Model.GitProxyConfig do
19+
@moduledoc """
20+
The git proxy configuration.
21+
22+
## Attributes
23+
24+
* `enabled` (*type:* `boolean()`, *default:* `nil`) - Optional. Setting this to true allows the git proxy to be used for performing git operations on the repositories linked in the connection.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:enabled => boolean() | nil
31+
}
32+
33+
field(:enabled)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig do
37+
def decode(value, options) do
38+
GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
end

0 commit comments

Comments
 (0)