diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 00000000..b6721276 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + image: gcr.io/repo-automation-bots/owlbot-java:latest + digest: sha256:8c50e7bab0ae5ad41ee29420b558542637104500f6256b8fe74282b0cf6144db diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml new file mode 100644 index 00000000..a4310c35 --- /dev/null +++ b/.github/.OwlBot.yaml @@ -0,0 +1,33 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker: + image: "gcr.io/repo-automation-bots/owlbot-java:latest" + +deep-remove-regex: +- "/grpc-google-.*/src" +- "/proto-google-.*/src" +- "/google-.*/src" + +deep-preserve-regex: +- "/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/it/ITSystemTest.java" +- "/proto-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/v1beta1/FieldName.java" + +deep-copy-regex: +- source: "/google/cloud/datacatalog/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-datacatalog-$1/src" +- source: "/google/cloud/datacatalog/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-datacatalog-$1/src" +- source: "/google/cloud/datacatalog/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-datacatalog/src" diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata deleted file mode 100644 index 21cdf08f..00000000 --- a/.github/readme/synth.metadata/synth.metadata +++ /dev/null @@ -1,18 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/java-datacatalog.git", - "sha": "34cf8d00584d342d843d5f999d586bfc82db4763" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dfd55ad78a700acf987d592c8279789b1319b8c5" - } - } - ] -} \ No newline at end of file diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index efe88147..2b69630c 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -16,6 +16,7 @@ branchProtectionRules: - units (11) - 'Kokoro - Test: Integration' - cla/google + - OwlBot Post Processor - pattern: java7 isAdminEnforced: true requiredApprovingReviewCount: 1 diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml index f247d5c7..a0ba1f7d 100644 --- a/.github/trusted-contribution.yml +++ b/.github/trusted-contribution.yml @@ -1,2 +1,3 @@ trustedContributors: -- renovate-bot \ No newline at end of file +- renovate-bot +- gcf-owl-bot[bot] diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d510359d..3becb5c0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,6 +12,9 @@ jobs: java: [8, 11] steps: - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 - uses: actions/setup-java@v1 with: java-version: ${{matrix.java}} @@ -23,6 +26,9 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 - uses: actions/setup-java@v1 with: java-version: 8 @@ -37,6 +43,9 @@ jobs: java: [8, 11] steps: - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 - uses: actions/setup-java@v1 with: java-version: ${{matrix.java}} @@ -46,6 +55,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 - uses: actions/setup-java@v1 with: java-version: 8 @@ -57,6 +69,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 - uses: actions/setup-java@v1 with: java-version: 8 diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg deleted file mode 100644 index 675e29e1..00000000 --- a/.kokoro/continuous/readme.cfg +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-datacatalog/.kokoro/readme.sh" -} - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.log" - } -} - -# The github token is stored here. -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - # TODO(theacodes): remove this after secrets have globally propagated - backend_type: FASTCONFIGPUSH - } - } -} - -# Common env vars for all repositories and builds. -env_vars: { - key: "GITHUB_USER" - value: "yoshi-automation" -} -env_vars: { - key: "GITHUB_EMAIL" - value: "yoshi-automation@google.com" -} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh index 6e3f6599..7f78ee41 100755 --- a/.kokoro/release/common.sh +++ b/.kokoro/release/common.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh index 5c4551ef..742ec1a8 100755 --- a/.kokoro/release/drop.sh +++ b/.kokoro/release/drop.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh index 1fa95fa5..3cac3d8a 100755 --- a/.kokoro/release/promote.sh +++ b/.kokoro/release/promote.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index eeed209b..564b12ac 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Google Inc. +# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 5ef1ca62..af11046a 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2021 Google Inc. +# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 8a103384..77dc4e8f 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index 9da0f839..8b69b793 100644 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/CHANGELOG.md b/CHANGELOG.md index d92f13f4..aded902a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.5.5](https://www.github.com/googleapis/java-datacatalog/compare/v1.5.4...v1.5.5) (2021-09-14) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.1 ([#644](https://www.github.com/googleapis/java-datacatalog/issues/644)) ([f93827c](https://www.github.com/googleapis/java-datacatalog/commit/f93827c8210fd6b61ebdb16cb5c9a756beb582cb)) + ### [1.5.4](https://www.github.com/googleapis/java-datacatalog/compare/v1.5.3...v1.5.4) (2021-08-31) diff --git a/README.md b/README.md index c255ac52..f826cda5 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 22.0.0 + 23.0.0 pom import @@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-datacatalog - 1.5.3 + 1.5.4 ``` @@ -49,20 +49,20 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies ```Groovy -implementation platform('com.google.cloud:libraries-bom:22.0.0') +implementation platform('com.google.cloud:libraries-bom:23.0.0') implementation 'com.google.cloud:google-cloud-datacatalog' ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-datacatalog:1.5.3' +implementation 'com.google.cloud:google-cloud-datacatalog:1.5.4' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-datacatalog" % "1.5.3" +libraryDependencies += "com.google.cloud" % "google-cloud-datacatalog" % "1.5.4" ``` ## Authentication @@ -106,10 +106,6 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-datacatalog/t | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| None | [source code](https://github.com/googleapis/java-datacatalog/blob/master/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogGetEntry.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datacatalog&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogGetEntry.java) | -| None | [source code](https://github.com/googleapis/java-datacatalog/blob/master/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogLookupEntry.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datacatalog&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogLookupEntry.java) | -| None | [source code](https://github.com/googleapis/java-datacatalog/blob/master/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogLookupEntrySqlResource.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datacatalog&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogLookupEntrySqlResource.java) | -| None | [source code](https://github.com/googleapis/java-datacatalog/blob/master/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogSearch.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datacatalog&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogSearch.java) | | Create Custom Entry | [source code](https://github.com/googleapis/java-datacatalog/blob/master/samples/snippets/src/main/java/com/example/datacatalog/CreateCustomEntry.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datacatalog&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/datacatalog/CreateCustomEntry.java) | | Create Entry | [source code](https://github.com/googleapis/java-datacatalog/blob/master/samples/snippets/src/main/java/com/example/datacatalog/CreateEntry.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datacatalog&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/datacatalog/CreateEntry.java) | | Create Entry Group | [source code](https://github.com/googleapis/java-datacatalog/blob/master/samples/snippets/src/main/java/com/example/datacatalog/CreateEntryGroup.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-datacatalog&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/datacatalog/CreateEntryGroup.java) | diff --git a/google-cloud-datacatalog-bom/pom.xml b/google-cloud-datacatalog-bom/pom.xml index 760e4d6e..182c2385 100644 --- a/google-cloud-datacatalog-bom/pom.xml +++ b/google-cloud-datacatalog-bom/pom.xml @@ -1,14 +1,14 @@ - + 4.0.0 com.google.cloud google-cloud-datacatalog-bom - 1.5.4 + 1.5.5 pom com.google.cloud google-cloud-shared-config - 1.0.1 + 1.0.2 Google Cloud Data Catalog BOM @@ -49,31 +49,30 @@ - - com.google.api.grpc - proto-google-cloud-datacatalog-v1 - 1.5.4 + com.google.cloud + google-cloud-datacatalog + 1.5.5 com.google.api.grpc - proto-google-cloud-datacatalog-v1beta1 - 0.42.4 + grpc-google-cloud-datacatalog-v1 + 1.5.5 - com.google.cloud - google-cloud-datacatalog - 1.5.4 + com.google.api.grpc + grpc-google-cloud-datacatalog-v1beta1 + 0.42.5 com.google.api.grpc - grpc-google-cloud-datacatalog-v1 - 1.5.4 + proto-google-cloud-datacatalog-v1 + 1.5.5 com.google.api.grpc - grpc-google-cloud-datacatalog-v1beta1 - 0.42.4 + proto-google-cloud-datacatalog-v1beta1 + 0.42.5 @@ -89,4 +88,4 @@ - \ No newline at end of file + diff --git a/google-cloud-datacatalog/pom.xml b/google-cloud-datacatalog/pom.xml index 1f0d45fa..eb580bfe 100644 --- a/google-cloud-datacatalog/pom.xml +++ b/google-cloud-datacatalog/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.google.cloud google-cloud-datacatalog - 1.5.4 + 1.5.5 jar Google Cloud Data Catalog https://github.com/googleapis/java-datacatalog @@ -11,7 +11,7 @@ com.google.cloud google-cloud-datacatalog-parent - 1.5.4 + 1.5.5 google-cloud-datacatalog @@ -125,4 +125,4 @@ - \ No newline at end of file + diff --git a/grpc-google-cloud-datacatalog-v1/pom.xml b/grpc-google-cloud-datacatalog-v1/pom.xml index 9fb3cb50..2b305894 100644 --- a/grpc-google-cloud-datacatalog-v1/pom.xml +++ b/grpc-google-cloud-datacatalog-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-datacatalog-v1 - 1.5.4 + 1.5.5 grpc-google-cloud-datacatalog-v1 GRPC library for grpc-google-cloud-datacatalog-v1 com.google.cloud google-cloud-datacatalog-parent - 1.5.4 + 1.5.5 diff --git a/grpc-google-cloud-datacatalog-v1beta1/pom.xml b/grpc-google-cloud-datacatalog-v1beta1/pom.xml index 9bff7d6d..be1ceb97 100644 --- a/grpc-google-cloud-datacatalog-v1beta1/pom.xml +++ b/grpc-google-cloud-datacatalog-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-datacatalog-v1beta1 - 0.42.4 + 0.42.5 grpc-google-cloud-datacatalog-v1beta1 GRPC library for grpc-google-cloud-datacatalog-v1beta1 com.google.cloud google-cloud-datacatalog-parent - 1.5.4 + 1.5.5 diff --git a/.github/readme/synth.py b/owlbot.py similarity index 68% rename from .github/readme/synth.py rename to owlbot.py index 7b48cc28..dca9d867 100644 --- a/.github/readme/synth.py +++ b/owlbot.py @@ -1,10 +1,10 @@ -# Copyright 2020 Google LLC +# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -12,8 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""This script is used to synthesize generated the README for this library.""" - +import synthtool as s from synthtool.languages import java -java.custom_templates(["java_library/README.md"]) + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates() diff --git a/pom.xml b/pom.xml index c36adba0..066b0117 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-datacatalog-parent pom - 1.5.4 + 1.5.5 Google Cloud Data Catalog Parent https://github.com/googleapis/java-datacatalog @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.0.1 + 1.0.2 @@ -61,33 +61,33 @@ com.google.api.grpc proto-google-cloud-datacatalog-v1 - 1.5.4 + 1.5.5 com.google.api.grpc proto-google-cloud-datacatalog-v1beta1 - 0.42.4 + 0.42.5 com.google.api.grpc grpc-google-cloud-datacatalog-v1 - 1.5.4 + 1.5.5 com.google.api.grpc grpc-google-cloud-datacatalog-v1beta1 - 0.42.4 + 0.42.5 com.google.cloud google-cloud-datacatalog - 1.5.4 + 1.5.5 com.google.cloud google-cloud-shared-dependencies - 2.2.0 + 2.2.1 pom import @@ -119,11 +119,11 @@ - proto-google-cloud-datacatalog-v1 - proto-google-cloud-datacatalog-v1beta1 + google-cloud-datacatalog grpc-google-cloud-datacatalog-v1 grpc-google-cloud-datacatalog-v1beta1 - google-cloud-datacatalog + proto-google-cloud-datacatalog-v1 + proto-google-cloud-datacatalog-v1beta1 google-cloud-datacatalog-bom @@ -196,4 +196,4 @@ - \ No newline at end of file + diff --git a/proto-google-cloud-datacatalog-v1/pom.xml b/proto-google-cloud-datacatalog-v1/pom.xml index c9479214..aabea59d 100644 --- a/proto-google-cloud-datacatalog-v1/pom.xml +++ b/proto-google-cloud-datacatalog-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-datacatalog-v1 - 1.5.4 + 1.5.5 proto-google-cloud-datacatalog-v1 PROTO library for proto-google-cloud-datacatalog-v1 com.google.cloud google-cloud-datacatalog-parent - 1.5.4 + 1.5.5 diff --git a/proto-google-cloud-datacatalog-v1beta1/pom.xml b/proto-google-cloud-datacatalog-v1beta1/pom.xml index 8b1c0e8a..9453cae7 100644 --- a/proto-google-cloud-datacatalog-v1beta1/pom.xml +++ b/proto-google-cloud-datacatalog-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-datacatalog-v1beta1 - 0.42.4 + 0.42.5 proto-google-cloud-datacatalog-v1beta1 PROTO library for proto-google-cloud-datacatalog-v1beta1 com.google.cloud google-cloud-datacatalog-parent - 1.5.4 + 1.5.5 diff --git a/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogGetEntry.java b/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogGetEntry.java deleted file mode 100644 index c7384ef3..00000000 --- a/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogGetEntry.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// DO NOT EDIT! This is a generated sample ("Request", "datacatalog_get_entry") -// sample-metadata: -// title: -// description: Get Entry -// usage: gradle run -PmainClass=com.google.cloud.examples.datacatalog.v1beta1.DatacatalogGetEntry [--args='[--project_id "[Google Cloud Project ID]"] [--location_id "[Google Cloud Location ID]"] [--entry_group_id "[Entry Group ID]"] [--entry_id "[Entry ID]"]'] - -package com.google.cloud.examples.datacatalog.v1beta1; - -import com.google.cloud.datacatalog.v1beta1.DataCatalogClient; -import com.google.cloud.datacatalog.v1beta1.Entry; -import com.google.cloud.datacatalog.v1beta1.GetEntryRequest; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.Options; - -public class DatacatalogGetEntry { - // [START datacatalog_get_entry] - /* - * Please include the following imports to run this sample. - * - * import com.google.cloud.datacatalog.v1beta1.DataCatalogClient; - * import com.google.cloud.datacatalog.v1beta1.Entry; - * import com.google.cloud.datacatalog.v1beta1.GetEntryRequest; - */ - - public static void sampleGetEntry() { - // TODO(developer): Replace these variables before running the sample. - String projectId = "[Google Cloud Project ID]"; - String locationId = "[Google Cloud Location ID]"; - String entryGroupId = "[Entry Group ID]"; - String entryId = "[Entry ID]"; - sampleGetEntry(projectId, locationId, entryGroupId, entryId); - } - - /** - * Get Entry - * - * @param projectId Your Google Cloud project ID - * @param locationId Google Cloud region, e.g. us-central1 - * @param entryGroupId ID of the Entry Group, e.g. {@literal @}bigquery, {@literal @}pubsub, - * my_entry_group - * @param entryId ID of the Entry - */ - public static void sampleGetEntry( - String projectId, String locationId, String entryGroupId, String entryId) { - try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) { - String formattedName = - DataCatalogClient.formatEntryName(projectId, locationId, entryGroupId, entryId); - GetEntryRequest request = GetEntryRequest.newBuilder().setName(formattedName).build(); - Entry response = dataCatalogClient.getEntry(request); - Entry entry = response; - System.out.printf("Entry name: %s\n", entry.getName()); - System.out.printf("Entry type: %s\n", entry.getType()); - System.out.printf("Linked resource: %s\n", entry.getLinkedResource()); - } catch (Exception exception) { - System.err.println("Failed to create the client due to: " + exception); - } - } - // [END datacatalog_get_entry] - - public static void main(String[] args) throws Exception { - Options options = new Options(); - options.addOption( - Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); - options.addOption( - Option.builder("").required(false).hasArg(true).longOpt("location_id").build()); - options.addOption( - Option.builder("").required(false).hasArg(true).longOpt("entry_group_id").build()); - options.addOption(Option.builder("").required(false).hasArg(true).longOpt("entry_id").build()); - - CommandLine cl = (new DefaultParser()).parse(options, args); - String projectId = cl.getOptionValue("project_id", "[Google Cloud Project ID]"); - String locationId = cl.getOptionValue("location_id", "[Google Cloud Location ID]"); - String entryGroupId = cl.getOptionValue("entry_group_id", "[Entry Group ID]"); - String entryId = cl.getOptionValue("entry_id", "[Entry ID]"); - - sampleGetEntry(projectId, locationId, entryGroupId, entryId); - } -} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogLookupEntry.java b/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogLookupEntry.java deleted file mode 100644 index ba336eaf..00000000 --- a/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogLookupEntry.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// DO NOT EDIT! This is a generated sample ("Request", "datacatalog_lookup_entry") -// sample-metadata: -// title: -// description: Lookup Entry -// usage: gradle run -PmainClass=com.google.cloud.examples.datacatalog.v1beta1.DatacatalogLookupEntry [--args='[--resource_name "[Full Resource Name]"]'] - -package com.google.cloud.examples.datacatalog.v1beta1; - -import com.google.cloud.datacatalog.v1beta1.DataCatalogClient; -import com.google.cloud.datacatalog.v1beta1.Entry; -import com.google.cloud.datacatalog.v1beta1.LookupEntryRequest; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.Options; - -public class DatacatalogLookupEntry { - // [START datacatalog_lookup_entry] - /* - * Please include the following imports to run this sample. - * - * import com.google.cloud.datacatalog.v1beta1.DataCatalogClient; - * import com.google.cloud.datacatalog.v1beta1.Entry; - * import com.google.cloud.datacatalog.v1beta1.LookupEntryRequest; - */ - - public static void sampleLookupEntry() { - // TODO(developer): Replace these variables before running the sample. - String resourceName = "[Full Resource Name]"; - sampleLookupEntry(resourceName); - } - - /** - * Lookup Entry - * - * @param resourceName The full name of the Google Cloud Platform resource the Data Catalog entry - * represents. See: https://cloud.google.com/apis/design/resource_names#full_resource_name - * Examples: - * //bigquery.googleapis.com/projects/bigquery-public-data/datasets/new_york_taxi_trips/tables/taxi_zone_geom - * //pubsub.googleapis.com/projects/pubsub-public-data/topics/taxirides-realtime - */ - public static void sampleLookupEntry(String resourceName) { - try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) { - LookupEntryRequest request = - LookupEntryRequest.newBuilder().setLinkedResource(resourceName).build(); - Entry response = dataCatalogClient.lookupEntry(request); - Entry entry = response; - System.out.printf("Entry name: %s\n", entry.getName()); - System.out.printf("Entry type: %s\n", entry.getType()); - System.out.printf("Linked resource: %s\n", entry.getLinkedResource()); - } catch (Exception exception) { - System.err.println("Failed to create the client due to: " + exception); - } - } - // [END datacatalog_lookup_entry] - - public static void main(String[] args) throws Exception { - Options options = new Options(); - options.addOption( - Option.builder("").required(false).hasArg(true).longOpt("resource_name").build()); - - CommandLine cl = (new DefaultParser()).parse(options, args); - String resourceName = cl.getOptionValue("resource_name", "[Full Resource Name]"); - - sampleLookupEntry(resourceName); - } -} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogLookupEntrySqlResource.java b/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogLookupEntrySqlResource.java deleted file mode 100644 index 9826fc4c..00000000 --- a/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogLookupEntrySqlResource.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// DO NOT EDIT! This is a generated sample ("Request", "datacatalog_lookup_entry_sql_resource") -// sample-metadata: -// title: -// description: Lookup Entry using SQL resource -// usage: gradle run -PmainClass=com.google.cloud.examples.datacatalog.v1beta1.DatacatalogLookupEntrySqlResource [--args='[--sql_name "[SQL Resource Name]"]'] - -package com.google.cloud.examples.datacatalog.v1beta1; - -import com.google.cloud.datacatalog.v1beta1.DataCatalogClient; -import com.google.cloud.datacatalog.v1beta1.Entry; -import com.google.cloud.datacatalog.v1beta1.LookupEntryRequest; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.Options; - -public class DatacatalogLookupEntrySqlResource { - // [START datacatalog_lookup_entry_sql_resource] - /* - * Please include the following imports to run this sample. - * - * import com.google.cloud.datacatalog.v1beta1.DataCatalogClient; - * import com.google.cloud.datacatalog.v1beta1.Entry; - * import com.google.cloud.datacatalog.v1beta1.LookupEntryRequest; - */ - - public static void sampleLookupEntry() { - // TODO(developer): Replace these variables before running the sample. - String sqlName = "[SQL Resource Name]"; - sampleLookupEntry(sqlName); - } - - /** - * Lookup Entry using SQL resource - * - * @param sqlName The SQL name of the Google Cloud Platform resource the Data Catalog entry - * represents. Examples: - * bigquery.table.`bigquery-public-data`.new_york_taxi_trips.taxi_zone_geom - * pubsub.topic.`pubsub-public-data`.`taxirides-realtime` - */ - public static void sampleLookupEntry(String sqlName) { - try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) { - LookupEntryRequest request = LookupEntryRequest.newBuilder().setSqlResource(sqlName).build(); - Entry response = dataCatalogClient.lookupEntry(request); - Entry entry = response; - System.out.printf("Entry name: %s\n", entry.getName()); - System.out.printf("Entry type: %s\n", entry.getType()); - System.out.printf("Linked resource: %s\n", entry.getLinkedResource()); - } catch (Exception exception) { - System.err.println("Failed to create the client due to: " + exception); - } - } - // [END datacatalog_lookup_entry_sql_resource] - - public static void main(String[] args) throws Exception { - Options options = new Options(); - options.addOption(Option.builder("").required(false).hasArg(true).longOpt("sql_name").build()); - - CommandLine cl = (new DefaultParser()).parse(options, args); - String sqlName = cl.getOptionValue("sql_name", "[SQL Resource Name]"); - - sampleLookupEntry(sqlName); - } -} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogSearch.java b/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogSearch.java deleted file mode 100644 index 1bd5aa5c..00000000 --- a/samples/generated/src/main/java/com/google/cloud/examples/datacatalog/v1beta1/DatacatalogSearch.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// DO NOT EDIT! This is a generated sample ("RequestPaged", "datacatalog_search") -// sample-metadata: -// title: -// description: Search Catalog -// usage: gradle run -PmainClass=com.google.cloud.examples.datacatalog.v1beta1.DatacatalogSearch [--args='[--include_project_id "[Google Cloud Project ID]"] [--include_gcp_public_datasets false] [--query "[String in search query syntax]"]'] - -package com.google.cloud.examples.datacatalog.v1beta1; - -import com.google.cloud.datacatalog.v1beta1.DataCatalogClient; -import com.google.cloud.datacatalog.v1beta1.SearchCatalogRequest; -import com.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; -import com.google.cloud.datacatalog.v1beta1.SearchCatalogResult; -import java.util.Arrays; -import java.util.List; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.Options; - -public class DatacatalogSearch { - // [START datacatalog_search] - /* - * Please include the following imports to run this sample. - * - * import com.google.cloud.datacatalog.v1beta1.DataCatalogClient; - * import com.google.cloud.datacatalog.v1beta1.SearchCatalogRequest; - * import com.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; - * import com.google.cloud.datacatalog.v1beta1.SearchCatalogResult; - * import java.util.Arrays; - * import java.util.List; - */ - - public static void sampleSearchCatalog() { - // TODO(developer): Replace these variables before running the sample. - String includeProjectId = "[Google Cloud Project ID]"; - boolean includeGcpPublicDatasets = false; - String query = "[String in search query syntax]"; - sampleSearchCatalog(includeProjectId, includeGcpPublicDatasets, query); - } - - /** - * Search Catalog - * - * @param includeProjectId Your Google Cloud project ID. - * @param includeGcpPublicDatasets If true, include Google Cloud Platform (GCP) public datasets in - * the search results. - * @param query Your query string. See: - * https://cloud.google.com/data-catalog/docs/how-to/search-reference Example: system=bigquery - * type=dataset - */ - public static void sampleSearchCatalog( - String includeProjectId, boolean includeGcpPublicDatasets, String query) { - try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) { - List includeProjectIds = Arrays.asList(includeProjectId); - SearchCatalogRequest.Scope scope = - SearchCatalogRequest.Scope.newBuilder() - .addAllIncludeProjectIds(includeProjectIds) - .setIncludeGcpPublicDatasets(includeGcpPublicDatasets) - .build(); - SearchCatalogRequest request = - SearchCatalogRequest.newBuilder().setScope(scope).setQuery(query).build(); - for (SearchCatalogResult responseItem : - dataCatalogClient.searchCatalog(request).iterateAll()) { - System.out.printf("Result type: %s\n", responseItem.getSearchResultType()); - System.out.printf("Result subtype: %s\n", responseItem.getSearchResultSubtype()); - System.out.printf("Relative resource name: %s\n", responseItem.getRelativeResourceName()); - System.out.printf("Linked resource: %s\n\n", responseItem.getLinkedResource()); - } - } catch (Exception exception) { - System.err.println("Failed to create the client due to: " + exception); - } - } - // [END datacatalog_search] - - public static void main(String[] args) throws Exception { - Options options = new Options(); - options.addOption( - Option.builder("").required(false).hasArg(true).longOpt("include_project_id").build()); - options.addOption( - Option.builder("") - .required(false) - .hasArg(true) - .longOpt("include_gcp_public_datasets") - .build()); - options.addOption(Option.builder("").required(false).hasArg(true).longOpt("query").build()); - - CommandLine cl = (new DefaultParser()).parse(options, args); - String includeProjectId = cl.getOptionValue("include_project_id", "[Google Cloud Project ID]"); - boolean includeGcpPublicDatasets = - cl.getOptionValue("include_gcp_public_datasets") != null - ? Boolean.parseBoolean(cl.getOptionValue("include_gcp_public_datasets")) - : false; - String query = cl.getOptionValue("query", "[String in search query syntax]"); - - sampleSearchCatalog(includeProjectId, includeGcpPublicDatasets, query); - } -} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 2a836f45..cff66a1b 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-datacatalog - 1.5.3 + 1.5.4 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index bff00486..cc3c76cc 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-datacatalog - 1.5.3 + 1.5.4 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 6708aa20..757b815b 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 22.0.0 + 23.0.0 pom import diff --git a/synth.metadata b/synth.metadata index bc090ffd..690a6f05 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-datacatalog.git", - "sha": "fe71e643a6a39af8e1d883e4bd3ad7380921e260" + "sha": "4468870aba4384ebf16d9c3cbda8d755ea82f1f3" } }, { @@ -27,7 +27,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "9a238a0623879c3de129a376c6085d4a862f6eb9" + "sha": "ad7fd76e17bf9494a3e47ff9cf445f61564432e0" } } ], diff --git a/synth.py b/synth.py deleted file mode 100644 index 47695858..00000000 --- a/synth.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""This script is used to synthesize generated parts of this library.""" - -import synthtool.languages.java as java - -AUTOSYNTH_MULTIPLE_COMMITS = True - -versions = ['v1beta1', 'v1'] -service = 'datacatalog' - -for version in versions: - java.bazel_library( - service=service, - version=version, - bazel_target=f'//google/cloud/{service}/{version}:google-cloud-{service}-{version}-java', - ) - -java.common_templates() \ No newline at end of file diff --git a/versions.txt b/versions.txt index 401fdfd3..e3720531 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -proto-google-cloud-datacatalog-v1:1.5.4:1.5.4 -proto-google-cloud-datacatalog-v1beta1:0.42.4:0.42.4 -grpc-google-cloud-datacatalog-v1:1.5.4:1.5.4 -grpc-google-cloud-datacatalog-v1beta1:0.42.4:0.42.4 -google-cloud-datacatalog:1.5.4:1.5.4 +google-cloud-datacatalog:1.5.5:1.5.5 +grpc-google-cloud-datacatalog-v1:1.5.5:1.5.5 +grpc-google-cloud-datacatalog-v1beta1:0.42.5:0.42.5 +proto-google-cloud-datacatalog-v1:1.5.5:1.5.5 +proto-google-cloud-datacatalog-v1beta1:0.42.5:0.42.5