Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of DeveloperConnect client #12904

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/developer_connect/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_developer_connect, "~> 0.5"}]
[{:google_api_developer_connect, "~> 0.6"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,150 @@ defmodule GoogleApi.DeveloperConnect.V1.Api.Projects do
)
end

@doc """
ProcessBitbucketCloudWebhook is called by the external Bitbucket Cloud instances for notifying events.

## Parameters

* `connection` (*type:* `GoogleApi.DeveloperConnect.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The GitRepositoryLink where the webhook will be received. Format: `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
* `:alt` (*type:* `String.t`) - Data format for response.
* `:callback` (*type:* `String.t`) - JSONP
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
* `: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.
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
* `: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").
* `:body` (*type:* `GoogleApi.DeveloperConnect.V1.Model.ProcessBitbucketCloudWebhookRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.DeveloperConnect.V1.Model.Empty{}}` on success
* `{:error, info}` on failure
"""
@spec developerconnect_projects_locations_connections_git_repository_links_process_bitbucket_cloud_webhook(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.DeveloperConnect.V1.Model.Empty.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def developerconnect_projects_locations_connections_git_repository_links_process_bitbucket_cloud_webhook(
connection,
name,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:body => :body
}

request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/{+name}:processBitbucketCloudWebhook", %{
"name" => URI.encode(name, &URI.char_unreserved?/1)
})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(opts ++ [struct: %GoogleApi.DeveloperConnect.V1.Model.Empty{}])
end

@doc """
ProcessBitbucketDataCenterWebhook is called by the external Bitbucket Data Center instances for notifying events.

## Parameters

* `connection` (*type:* `GoogleApi.DeveloperConnect.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The GitRepositoryLink where the webhook will be received. Format: `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
* `:alt` (*type:* `String.t`) - Data format for response.
* `:callback` (*type:* `String.t`) - JSONP
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
* `: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.
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
* `: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").
* `:body` (*type:* `GoogleApi.DeveloperConnect.V1.Model.ProcessBitbucketDataCenterWebhookRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.DeveloperConnect.V1.Model.Empty{}}` on success
* `{:error, info}` on failure
"""
@spec developerconnect_projects_locations_connections_git_repository_links_process_bitbucket_data_center_webhook(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.DeveloperConnect.V1.Model.Empty.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def developerconnect_projects_locations_connections_git_repository_links_process_bitbucket_data_center_webhook(
connection,
name,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:body => :body
}

request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/{+name}:processBitbucketDataCenterWebhook", %{
"name" => URI.encode(name, &URI.char_unreserved?/1)
})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(opts ++ [struct: %GoogleApi.DeveloperConnect.V1.Model.Empty{}])
end

@doc """
ProcessGitLabEnterpriseWebhook is called by the external GitLab Enterprise instances for notifying events.

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

@discovery_revision "20241205"
@discovery_revision "20250129"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig do
@moduledoc """
Configuration for connections to an instance of Bitbucket Cloud.

## Attributes

* `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.
* `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.
* `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.
* `workspace` (*type:* `String.t`, *default:* `nil`) - Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:authorizerCredential => GoogleApi.DeveloperConnect.V1.Model.UserCredential.t() | nil,
:readAuthorizerCredential =>
GoogleApi.DeveloperConnect.V1.Model.UserCredential.t() | nil,
:webhookSecretSecretVersion => String.t() | nil,
:workspace => String.t() | nil
}

field(:authorizerCredential, as: GoogleApi.DeveloperConnect.V1.Model.UserCredential)
field(:readAuthorizerCredential, as: GoogleApi.DeveloperConnect.V1.Model.UserCredential)
field(:webhookSecretSecretVersion)
field(:workspace)
end

defimpl Poison.Decoder, for: GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig do
def decode(value, options) do
GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig do
@moduledoc """
Configuration for connections to an instance of Bitbucket Data Center.

## Attributes

* `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.
* `hostUri` (*type:* `String.t`, *default:* `nil`) - Required. The URI of the Bitbucket Data Center host this connection is for.
* `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.
* `serverVersion` (*type:* `String.t`, *default:* `nil`) - Output only. Version of the Bitbucket Data Center server running on the `host_uri`.
* `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.
* `sslCaCertificate` (*type:* `String.t`, *default:* `nil`) - Optional. SSL certificate authority to trust when making requests to Bitbucket Data Center.
* `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.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:authorizerCredential => GoogleApi.DeveloperConnect.V1.Model.UserCredential.t() | nil,
:hostUri => String.t() | nil,
:readAuthorizerCredential =>
GoogleApi.DeveloperConnect.V1.Model.UserCredential.t() | nil,
:serverVersion => String.t() | nil,
:serviceDirectoryConfig =>
GoogleApi.DeveloperConnect.V1.Model.ServiceDirectoryConfig.t() | nil,
:sslCaCertificate => String.t() | nil,
:webhookSecretSecretVersion => String.t() | nil
}

field(:authorizerCredential, as: GoogleApi.DeveloperConnect.V1.Model.UserCredential)
field(:hostUri)
field(:readAuthorizerCredential, as: GoogleApi.DeveloperConnect.V1.Model.UserCredential)
field(:serverVersion)
field(:serviceDirectoryConfig, as: GoogleApi.DeveloperConnect.V1.Model.ServiceDirectoryConfig)
field(:sslCaCertificate)
field(:webhookSecretSecretVersion)
end

defimpl Poison.Decoder, for: GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig do
def decode(value, options) do
GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ defmodule GoogleApi.DeveloperConnect.V1.Model.Connection do
## Attributes

* `annotations` (*type:* `map()`, *default:* `nil`) - Optional. Allows clients to store small amounts of arbitrary data.
* `bitbucketCloudConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig.t`, *default:* `nil`) - Configuration for connections to an instance of Bitbucket Clouds.
* `bitbucketDataCenterConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig.t`, *default:* `nil`) - Configuration for connections to an instance of Bitbucket Data Center.
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. [Output only] Create timestamp
* `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.
* `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. [Output only] Delete timestamp
* `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.
* `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.
* `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.
* `githubConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.GitHubConfig.t`, *default:* `nil`) - Configuration for connections to github.com.
* `githubEnterpriseConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.GitHubEnterpriseConfig.t`, *default:* `nil`) - Configuration for connections to an instance of GitHub Enterprise.
* `gitlabConfig` (*type:* `GoogleApi.DeveloperConnect.V1.Model.GitLabConfig.t`, *default:* `nil`) - Configuration for connections to gitlab.com.
Expand All @@ -43,11 +46,16 @@ defmodule GoogleApi.DeveloperConnect.V1.Model.Connection do

@type t :: %__MODULE__{
:annotations => map() | nil,
:bitbucketCloudConfig =>
GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig.t() | nil,
:bitbucketDataCenterConfig =>
GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig.t() | nil,
:createTime => DateTime.t() | nil,
:cryptoKeyConfig => GoogleApi.DeveloperConnect.V1.Model.CryptoKeyConfig.t() | nil,
:deleteTime => DateTime.t() | nil,
:disabled => boolean() | nil,
:etag => String.t() | nil,
:gitProxyConfig => GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig.t() | nil,
:githubConfig => GoogleApi.DeveloperConnect.V1.Model.GitHubConfig.t() | nil,
:githubEnterpriseConfig =>
GoogleApi.DeveloperConnect.V1.Model.GitHubEnterpriseConfig.t() | nil,
Expand All @@ -63,11 +71,18 @@ defmodule GoogleApi.DeveloperConnect.V1.Model.Connection do
}

field(:annotations, type: :map)
field(:bitbucketCloudConfig, as: GoogleApi.DeveloperConnect.V1.Model.BitbucketCloudConfig)

field(:bitbucketDataCenterConfig,
as: GoogleApi.DeveloperConnect.V1.Model.BitbucketDataCenterConfig
)

field(:createTime, as: DateTime)
field(:cryptoKeyConfig, as: GoogleApi.DeveloperConnect.V1.Model.CryptoKeyConfig)
field(:deleteTime, as: DateTime)
field(:disabled)
field(:etag)
field(:gitProxyConfig, as: GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig)
field(:githubConfig, as: GoogleApi.DeveloperConnect.V1.Model.GitHubConfig)
field(:githubEnterpriseConfig, as: GoogleApi.DeveloperConnect.V1.Model.GitHubEnterpriseConfig)
field(:gitlabConfig, as: GoogleApi.DeveloperConnect.V1.Model.GitLabConfig)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig do
@moduledoc """
The git proxy configuration.

## Attributes

* `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.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:enabled => boolean() | nil
}

field(:enabled)
end

defimpl Poison.Decoder, for: GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig do
def decode(value, options) do
GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.DeveloperConnect.V1.Model.GitProxyConfig do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Loading
Loading