Skip to content

Commit

Permalink
feat: A new resource_definition `servicedirectory.googleapis.com/Serv…
Browse files Browse the repository at this point in the history
…ice` is added (#7842)

feat: A new resource_definition `cloudkms.googleapis.com/CryptoKey` is added
feat: A new field `github_enterprise_config` is added to message `.google.cloud.developerconnect.v1.Connection`
feat: A new field `gitlab_config` is added to message `.google.cloud.developerconnect.v1.Connection`
feat: A new field `gitlab_enterprise_config` is added to message `.google.cloud.developerconnect.v1.Connection`
feat: A new field `crypto_key_config` is added to message `.google.cloud.developerconnect.v1.Connection`
feat: A new message `CryptoKeyConfig` is added
feat: A new message `GitHubEnterpriseConfig` is added
feat: A new message `ServiceDirectoryConfig` is added
feat: A new message `GitLabConfig` is added
feat: A new message `UserCredential` is added
feat: A new message `GitLabEnterpriseConfig` is added
feat: A new field `webhook_id` is added to message `.google.cloud.developerconnect.v1.GitRepositoryLink`
docs: A comment for field `requested_cancellation` in message `.google.cloud.developerconnect.v1.OperationMetadata` is changed
PiperOrigin-RevId: 697641705
Source-Link: googleapis/googleapis@5708c1a
Source-Link: googleapis/googleapis-gen@872800e
Copy-Tag: eyJwIjoiRGV2ZWxvcGVyQ29ubmVjdC8uT3dsQm90LnlhbWwiLCJoIjoiODcyODAwZWQyNGFmZDg3OWE4YWNlYWQ3MTg1YzI0MzEyZDk1Y2UwNSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Nov 25, 2024
1 parent d8a6602 commit 41e996e
Show file tree
Hide file tree
Showing 13 changed files with 1,464 additions and 12 deletions.
Binary file modified DeveloperConnect/metadata/V1/DeveloperConnect.php
Binary file not shown.
44 changes: 44 additions & 0 deletions DeveloperConnect/src/V1/Client/DeveloperConnectClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,27 @@ public static function connectionName(string $project, string $location, string
]);
}

/**
* Formats a string containing the fully-qualified path to represent a crypto_key
* resource.
*
* @param string $project
* @param string $location
* @param string $keyRing
* @param string $cryptoKey
*
* @return string The formatted crypto_key resource.
*/
public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string
{
return self::getPathTemplate('cryptoKey')->render([
'project' => $project,
'location' => $location,
'key_ring' => $keyRing,
'crypto_key' => $cryptoKey,
]);
}

/**
* Formats a string containing the fully-qualified path to represent a
* git_repository_link resource.
Expand Down Expand Up @@ -266,14 +287,37 @@ public static function secretVersionName(string $project, string $secret, string
]);
}

/**
* Formats a string containing the fully-qualified path to represent a service
* resource.
*
* @param string $project
* @param string $location
* @param string $namespace
* @param string $service
*
* @return string The formatted service resource.
*/
public static function serviceName(string $project, string $location, string $namespace, string $service): string
{
return self::getPathTemplate('service')->render([
'project' => $project,
'location' => $location,
'namespace' => $namespace,
'service' => $service,
]);
}

/**
* Parses a formatted name string and returns an associative array of the components in the name.
* The following name formats are supported:
* Template: Pattern
* - connection: projects/{project}/locations/{location}/connections/{connection}
* - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
* - gitRepositoryLink: projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}
* - location: projects/{project}/locations/{location}
* - secretVersion: projects/{project}/secrets/{secret}/versions/{secret_version}
* - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}
*
* The optional $template argument can be supplied to specify a particular pattern,
* and must match one of the templates listed above. If no $template argument is
Expand Down
147 changes: 147 additions & 0 deletions DeveloperConnect/src/V1/Connection.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 76 additions & 0 deletions DeveloperConnect/src/V1/CryptoKeyConfig.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 41e996e

Please sign in to comment.