@@ -231,6 +231,12 @@ export class SecretManagerServiceClient {
231231 topicPathTemplate : new this . _gaxModule . PathTemplate (
232232 'projects/{project}/topics/{topic}'
233233 ) ,
234+ secretPathTemplate : new this . _gaxModule . PathTemplate (
235+ 'projects/{project}/secrets/{secret}'
236+ ) ,
237+ secretVersionPathTemplate : new this . _gaxModule . PathTemplate (
238+ 'projects/{project}/secrets/{secret}/versions/{secret_version}'
239+ ) ,
234240 } ;
235241
236242 // Some of the methods on this service return "paged" results,
@@ -2629,4 +2635,27 @@ export class SecretManagerServiceClient {
26292635 return this . pathTemplates . secretVersionPathTemplate . match ( secretVersionName )
26302636 . project ;
26312637 }
2638+ /**
2639+ * Parse the secret from SecretVersion resource.
2640+ *
2641+ * @param {string } secretVersionName
2642+ * A fully-qualified path representing SecretVersion resource.
2643+ * @returns {string } A string representing the secret.
2644+ */
2645+ matchSecretFromSecretVersionName ( secretVersionName : string ) {
2646+ return this . pathTemplates . secretVersionPathTemplate . match ( secretVersionName )
2647+ . secret ;
2648+ }
2649+
2650+ /**
2651+ * Parse the secret_version from SecretVersion resource.
2652+ *
2653+ * @param {string } secretVersionName
2654+ * A fully-qualified path representing SecretVersion resource.
2655+ * @returns {string } A string representing the secret_version.
2656+ */
2657+ matchSecretVersionFromSecretVersionName ( secretVersionName : string ) {
2658+ return this . pathTemplates . secretVersionPathTemplate . match ( secretVersionName )
2659+ . secret_version ;
2660+ }
26322661}
0 commit comments