Skip to content

Commit

Permalink
fix(artifactregistry): fix resource pattern ID segment name (#100)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 416140747
Source-Link: googleapis/googleapis@429d35c
Source-Link: googleapis/googleapis-gen@9fea20e
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWZlYTIwZWRjNjA0MTMyNDg2NDZjNDljMmU1ZDk4NjYzM2VkYjE5MyJ9
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
  • Loading branch information
3 people authored Dec 30, 2021
1 parent 0c4167e commit cfa87b4
Show file tree
Hide file tree
Showing 28 changed files with 114 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

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 @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main(name) {
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main(parent) {
Expand All @@ -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();
Expand All @@ -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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main(parent) {
Expand All @@ -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();
Expand All @@ -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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main() {
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main() {
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main() {
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main() {
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main() {
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main() {
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main() {
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main(resource) {
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main() {
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main() {
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.


'use strict';

function main() {
Expand All @@ -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);
Expand Down
Loading

0 comments on commit cfa87b4

Please sign in to comment.