diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto index 6fc97264a44..f69f3936966 100644 --- a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto @@ -50,7 +50,7 @@ message Hash { message File { option (google.api.resource) = { type: "artifactregistry.googleapis.com/File" - pattern: "projects/{project}/locations/{location}/repositories/{repo}/files/{file}" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" }; // The name of the file, for example: diff --git a/packages/google-devtools-artifactregistry/protos/protos.json b/packages/google-devtools-artifactregistry/protos/protos.json index a1f5757dc77..90181d3632c 100644 --- a/packages/google-devtools-artifactregistry/protos/protos.json +++ b/packages/google-devtools-artifactregistry/protos/protos.json @@ -285,7 +285,7 @@ "File": { "options": { "(google.api.resource).type": "artifactregistry.googleapis.com/File", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repo}/files/{file}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" }, "fields": { "name": { diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js index dfeb366797f..61cf00196fd 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -25,8 +26,7 @@ function main(name) { // const name = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js index 246cc635a47..0c9405aea4f 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -33,8 +34,7 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); @@ -46,11 +46,9 @@ function main(parent) { }; // Run request - const iterable = await artifactregistryClient.listDockerImagesAsync( - request - ); + const iterable = await artifactregistryClient.listDockerImagesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js index ee9b3e76a54..5d5f381257e 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -33,8 +34,7 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); @@ -46,11 +46,9 @@ function main(parent) { }; // Run request - const iterable = await artifactregistryClient.listRepositoriesAsync( - request - ); + const iterable = await artifactregistryClient.listRepositoriesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js index ac6200794e6..0856c6be143 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -33,15 +34,15 @@ function main() { // const repository = {} // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callCreateRepository() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await artifactregistryClient.createRepository(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js index 8b79e8acb61..d969d98eda5 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -33,15 +34,15 @@ function main() { // const tag = {} // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callCreateTag() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await artifactregistryClient.createTag(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js index 565e4269261..616619d4251 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -25,15 +26,15 @@ function main() { // const name = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callDeletePackage() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await artifactregistryClient.deletePackage(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js index 80e7af9c501..b7cb818ae2b 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -25,15 +26,15 @@ function main() { // const name = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callDeleteRepository() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await artifactregistryClient.deleteRepository(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js index a1040b964d1..1de8d2deee5 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -25,15 +26,15 @@ function main() { // const name = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callDeleteTag() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await artifactregistryClient.deleteTag(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js index 0891fde1a18..787229d092e 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -30,15 +31,15 @@ function main() { // const force = true // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callDeleteVersion() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await artifactregistryClient.deleteVersion(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js index 12307c8cba6..52dd1d855e4 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -25,15 +26,15 @@ function main() { // const name = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callGetFile() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await artifactregistryClient.getFile(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js index b87594b3151..9c31934dd0b 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(resource) { @@ -31,8 +32,7 @@ function main(resource) { // const options = {} // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js index 45d792ee7ed..a8b4e2b6046 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -25,15 +26,15 @@ function main() { // const name = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callGetPackage() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await artifactregistryClient.getPackage(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js index e020bba99b0..0140690b017 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -25,15 +26,15 @@ function main() { // const name = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callGetRepository() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await artifactregistryClient.getRepository(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js index c0d7ed1d7e1..dccdc31b861 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -25,15 +26,15 @@ function main() { // const name = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callGetTag() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await artifactregistryClient.getTag(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js index 86668966543..ff90e8ff155 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -29,15 +30,15 @@ function main() { // const view = {} // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callGetVersion() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await artifactregistryClient.getVersion(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js index 985cb85e22f..13e015d89f2 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -45,20 +46,20 @@ function main() { // const pageToken = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callListFiles() { // Construct request - const request = {}; + const request = { + }; // Run request const iterable = await artifactregistryClient.listFilesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js index 66354f94980..19ada1ca174 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -34,20 +35,20 @@ function main() { // const pageToken = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callListPackages() { // Construct request - const request = {}; + const request = { + }; // Run request const iterable = await artifactregistryClient.listPackagesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js index d7935b000b0..2da324099f3 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -34,22 +35,20 @@ function main() { // const pageToken = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callListRepositories() { // Construct request - const request = {}; + const request = { + }; // Run request - const iterable = await artifactregistryClient.listRepositoriesAsync( - request - ); + const iterable = await artifactregistryClient.listRepositoriesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js index 1a6948d9b23..860c31682c2 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -43,20 +44,20 @@ function main() { // const pageToken = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callListTags() { // Construct request - const request = {}; + const request = { + }; // Run request const iterable = await artifactregistryClient.listTagsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js index 62837e24f71..7f9acb1a3c9 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -38,20 +39,20 @@ function main() { // const view = {} // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callListVersions() { // Construct request - const request = {}; + const request = { + }; // Run request const iterable = await artifactregistryClient.listVersionsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js index 585a2d8523d..39ddaf15d0d 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(resource, policy) { @@ -33,8 +34,7 @@ function main(resource, policy) { // const policy = {} // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js index b5866b87225..db48e4f11c0 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(resource, permissions) { @@ -33,8 +34,7 @@ function main(resource, permissions) { // const permissions = 'abc123' // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js index 4345ee7a3dd..dd00a7ff7a9 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -31,15 +32,15 @@ function main() { // const updateMask = {} // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callUpdateRepository() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await artifactregistryClient.updateRepository(request); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js index fe36e1d2b1f..87867c20049 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -31,15 +32,15 @@ function main() { // const updateMask = {} // Imports the Artifactregistry library - const {ArtifactRegistryClient} = - require('@google-cloud/artifact-registry').v1beta2; + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; // Instantiates a client const artifactregistryClient = new ArtifactRegistryClient(); async function callUpdateTag() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await artifactregistryClient.updateTag(request); diff --git a/packages/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts b/packages/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts index 675b220015f..1bcd9e8d662 100644 --- a/packages/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts +++ b/packages/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts @@ -179,7 +179,7 @@ export class ArtifactRegistryClient { // Create useful helper objects for these. this.pathTemplates = { filePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repo}/files/{file}' + 'projects/{project}/locations/{location}/repositories/{repository}/files/{file}' ), repositoryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/repositories/{repository}' @@ -3191,15 +3191,20 @@ export class ArtifactRegistryClient { * * @param {string} project * @param {string} location - * @param {string} repo + * @param {string} repository * @param {string} file * @returns {string} Resource name string. */ - filePath(project: string, location: string, repo: string, file: string) { + filePath( + project: string, + location: string, + repository: string, + file: string + ) { return this.pathTemplates.filePathTemplate.render({ project: project, location: location, - repo: repo, + repository: repository, file: file, }); } @@ -3227,14 +3232,14 @@ export class ArtifactRegistryClient { } /** - * Parse the repo from File resource. + * Parse the repository from File resource. * * @param {string} fileName * A fully-qualified path representing File resource. - * @returns {string} A string representing the repo. + * @returns {string} A string representing the repository. */ - matchRepoFromFileName(fileName: string) { - return this.pathTemplates.filePathTemplate.match(fileName).repo; + matchRepositoryFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).repository; } /** diff --git a/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts b/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts index b1d89ef3c8f..827a3f88d4f 100644 --- a/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts +++ b/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts @@ -3894,7 +3894,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { const expectedParameters = { project: 'projectValue', location: 'locationValue', - repo: 'repoValue', + repository: 'repositoryValue', file: 'fileValue', }; const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ @@ -3913,7 +3913,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { const result = client.filePath( 'projectValue', 'locationValue', - 'repoValue', + 'repositoryValue', 'fileValue' ); assert.strictEqual(result, fakePath); @@ -3944,9 +3944,9 @@ describe('v1beta2.ArtifactRegistryClient', () => { ); }); - it('matchRepoFromFileName', () => { - const result = client.matchRepoFromFileName(fakePath); - assert.strictEqual(result, 'repoValue'); + it('matchRepositoryFromFileName', () => { + const result = client.matchRepositoryFromFileName(fakePath); + assert.strictEqual(result, 'repositoryValue'); assert( (client.pathTemplates.filePathTemplate.match as SinonStub) .getCall(-1)