@@ -103,13 +103,13 @@ class OsLoginServiceClient {
103103 // identifiers to uniquely identify resources within the API.
104104 // Create useful helper objects for these.
105105 this . _pathTemplates = {
106- userPathTemplate : new gax . PathTemplate ( 'users/{user}' ) ,
107- projectPathTemplate : new gax . PathTemplate (
108- 'users/{user}/projects/{project}'
109- ) ,
110106 fingerprintPathTemplate : new gax . PathTemplate (
111107 'users/{user}/sshPublicKeys/{fingerprint}'
112108 ) ,
109+ projectPathTemplate : new gax . PathTemplate (
110+ 'users/{user}/projects/{project}'
111+ ) ,
112+ userPathTemplate : new gax . PathTemplate ( 'users/{user}' ) ,
113113 } ;
114114
115115 // Put together the default options sent with requests.
@@ -544,14 +544,16 @@ class OsLoginServiceClient {
544544 // --------------------
545545
546546 /**
547- * Return a fully-qualified user resource name string.
547+ * Return a fully-qualified fingerprint resource name string.
548548 *
549549 * @param {String } user
550+ * @param {String } fingerprint
550551 * @returns {String }
551552 */
552- userPath ( user ) {
553- return this . _pathTemplates . userPathTemplate . render ( {
553+ fingerprintPath ( user , fingerprint ) {
554+ return this . _pathTemplates . fingerprintPathTemplate . render ( {
554555 user : user ,
556+ fingerprint : fingerprint ,
555557 } ) ;
556558 }
557559
@@ -570,28 +572,39 @@ class OsLoginServiceClient {
570572 }
571573
572574 /**
573- * Return a fully-qualified fingerprint resource name string.
575+ * Return a fully-qualified user resource name string.
574576 *
575577 * @param {String } user
576- * @param {String } fingerprint
577578 * @returns {String }
578579 */
579- fingerprintPath ( user , fingerprint ) {
580- return this . _pathTemplates . fingerprintPathTemplate . render ( {
580+ userPath ( user ) {
581+ return this . _pathTemplates . userPathTemplate . render ( {
581582 user : user ,
582- fingerprint : fingerprint ,
583583 } ) ;
584584 }
585585
586586 /**
587- * Parse the userName from a user resource.
587+ * Parse the fingerprintName from a fingerprint resource.
588588 *
589- * @param {String } userName
590- * A fully-qualified path representing a user resources.
589+ * @param {String } fingerprintName
590+ * A fully-qualified path representing a fingerprint resources.
591591 * @returns {String } - A string representing the user.
592592 */
593- matchUserFromUserName ( userName ) {
594- return this . _pathTemplates . userPathTemplate . match ( userName ) . user ;
593+ matchUserFromFingerprintName ( fingerprintName ) {
594+ return this . _pathTemplates . fingerprintPathTemplate . match ( fingerprintName )
595+ . user ;
596+ }
597+
598+ /**
599+ * Parse the fingerprintName from a fingerprint resource.
600+ *
601+ * @param {String } fingerprintName
602+ * A fully-qualified path representing a fingerprint resources.
603+ * @returns {String } - A string representing the fingerprint.
604+ */
605+ matchFingerprintFromFingerprintName ( fingerprintName ) {
606+ return this . _pathTemplates . fingerprintPathTemplate . match ( fingerprintName )
607+ . fingerprint ;
595608 }
596609
597610 /**
@@ -617,27 +630,14 @@ class OsLoginServiceClient {
617630 }
618631
619632 /**
620- * Parse the fingerprintName from a fingerprint resource.
633+ * Parse the userName from a user resource.
621634 *
622- * @param {String } fingerprintName
623- * A fully-qualified path representing a fingerprint resources.
635+ * @param {String } userName
636+ * A fully-qualified path representing a user resources.
624637 * @returns {String } - A string representing the user.
625638 */
626- matchUserFromFingerprintName ( fingerprintName ) {
627- return this . _pathTemplates . fingerprintPathTemplate . match ( fingerprintName )
628- . user ;
629- }
630-
631- /**
632- * Parse the fingerprintName from a fingerprint resource.
633- *
634- * @param {String } fingerprintName
635- * A fully-qualified path representing a fingerprint resources.
636- * @returns {String } - A string representing the fingerprint.
637- */
638- matchFingerprintFromFingerprintName ( fingerprintName ) {
639- return this . _pathTemplates . fingerprintPathTemplate . match ( fingerprintName )
640- . fingerprint ;
639+ matchUserFromUserName ( userName ) {
640+ return this . _pathTemplates . userPathTemplate . match ( userName ) . user ;
641641 }
642642}
643643
0 commit comments