Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Nov 18, 2024
1 parent b621772 commit c86907d
Show file tree
Hide file tree
Showing 68 changed files with 247 additions and 10,193 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.

34 changes: 34 additions & 0 deletions DeveloperConnect/src/V1/GitRepositoryLink.php

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

28 changes: 16 additions & 12 deletions DeveloperConnect/src/V1/OperationMetadata.php

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

Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,11 @@
],
'templateMap' => [
'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}',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,14 @@ public function createGitRepositoryLinkTest()
$etag = 'etag3123477';
$reconciling = false;
$uid = 'uid115792';
$webhookId = 'webhookId311874531';
$expectedResponse = new GitRepositoryLink();
$expectedResponse->setName($name);
$expectedResponse->setCloneUri($cloneUri);
$expectedResponse->setEtag($etag);
$expectedResponse->setReconciling($reconciling);
$expectedResponse->setUid($uid);
$expectedResponse->setWebhookId($webhookId);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
Expand Down Expand Up @@ -1117,12 +1119,14 @@ public function getGitRepositoryLinkTest()
$etag = 'etag3123477';
$reconciling = false;
$uid = 'uid115792';
$webhookId = 'webhookId311874531';
$expectedResponse = new GitRepositoryLink();
$expectedResponse->setName($name2);
$expectedResponse->setCloneUri($cloneUri);
$expectedResponse->setEtag($etag);
$expectedResponse->setReconciling($reconciling);
$expectedResponse->setUid($uid);
$expectedResponse->setWebhookId($webhookId);
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->gitRepositoryLinkName(
Expand Down
Binary file not shown.
Loading

0 comments on commit c86907d

Please sign in to comment.