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: [DeveloperConnect] A new resource_definition servicedirectory.googleapis.com/Service is added #7842

Merged
merged 2 commits into from
Nov 25, 2024
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
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
Loading