diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 1830d09a2..91c0ea20f 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:8e27e5a7297b40eca3ab46ae67f10c575813a85c673839030aa161d0818f3a24 + digest: sha256:4837f2a7fdff2985b4f7432f8a6d6a87beacebf3ac071746532c0ce2e3f24b9b diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index ac1229bec..4b736511d 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-asset.git", - "sha": "df575315598d72ae1bf26e49b80e7e3755392c41" + "sha": "129c04a154968713662990372c87d96d05f4718b" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "a01e1a0bf70754f51450958b966bd673945d1e6e" + "sha": "31728d872f50e439ded2f67fa8d67955b26a4e35" } } ] diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml new file mode 100644 index 000000000..d4ca94189 --- /dev/null +++ b/.github/release-trigger.yml @@ -0,0 +1 @@ +enabled: true diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 4fd2981be..636405740 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -6,7 +6,7 @@ branchProtectionRules: isAdminEnforced: true requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true - requiresStrictStatusChecks: true + requiresStrictStatusChecks: false requiredStatusCheckContexts: - dependencies (8) - dependencies (11) @@ -21,7 +21,7 @@ branchProtectionRules: isAdminEnforced: true requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true - requiresStrictStatusChecks: true + requiresStrictStatusChecks: false requiredStatusCheckContexts: - dependencies (8) - dependencies (11) @@ -33,31 +33,6 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - cla/google - OwlBot Post Processor -# Identifies the protection rule pattern. Name of the branch to be protected. -# Defaults to `master` -- pattern: master - # Can admins overwrite branch protection. - # Defaults to `true` - isAdminEnforced: true - # Number of approving reviews required to update matching branches. - # Defaults to `1` - requiredApprovingReviewCount: 1 - # Are reviews from code owners required to update matching branches. - # Defaults to `false` - requiresCodeOwnerReviews: true - # Require up to date branches - requiresStrictStatusChecks: false - # List of required status check contexts that must pass for commits to be accepted to matching branches. - requiredStatusCheckContexts: - - "dependencies (8)" - - "dependencies (11)" - - "lint" - - "clirr" - - "units (8)" - - "units (11)" - - "Kokoro - Test: Integration" - - "cla/google" - - "OwlBot Post Processor" # List of explicit permissions to add (additive only) permissionRules: - team: yoshi-admins diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 65ae6ecdd..e23d923e1 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}} @@ -37,28 +40,21 @@ 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}} - run: java -version - run: .kokoro/dependencies.sh - linkage-monitor: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - run: java -version - - name: Install artifacts to local Maven repository - run: .kokoro/build.sh - shell: bash - - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) - uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor lint: 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 @@ -70,10 +66,13 @@ 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 - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: clirr + JOB_TYPE: clirr \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 18030e5af..e8b10f440 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [3.2.0](https://www.github.com/googleapis/java-asset/compare/v3.1.0...v3.2.0) (2021-09-03) + + +### Features + +* Release of relationships in v1, Add content type Relationship to support relationship search ([#893](https://www.github.com/googleapis/java-asset/issues/893)) ([b3fd698](https://www.github.com/googleapis/java-asset/commit/b3fd6980763e36460aa6f69d2c792e141107066b)) +* Remove use of deprecated gradle command in java README ([#1196](https://www.github.com/googleapis/java-asset/issues/1196)) ([#881](https://www.github.com/googleapis/java-asset/issues/881)) ([55bc463](https://www.github.com/googleapis/java-asset/commit/55bc4636a5c5e086eece72e90e012e24257f86b0)) + + +### Dependencies + +* update dependency com.google.api.grpc:proto-google-cloud-orgpolicy-v1 to v2.0.3 ([#887](https://www.github.com/googleapis/java-asset/issues/887)) ([b0738b5](https://www.github.com/googleapis/java-asset/commit/b0738b5db61bf1c2b98086dc2c36ab214320a218)) +* update dependency com.google.api.grpc:proto-google-cloud-os-config-v1 to v2.1.0 ([#890](https://www.github.com/googleapis/java-asset/issues/890)) ([d4a2750](https://www.github.com/googleapis/java-asset/commit/d4a27504697eee1fb84d9079bfcb7776da5db451)) +* update dependency com.google.api.grpc:proto-google-cloud-pubsub-v1 to v1.96.2 ([#872](https://www.github.com/googleapis/java-asset/issues/872)) ([4b7bbbc](https://www.github.com/googleapis/java-asset/commit/4b7bbbc5a225643e4a4e5d85b082be027d35b078)) +* update dependency com.google.api.grpc:proto-google-identity-accesscontextmanager-v1 to v1.1.5 ([#889](https://www.github.com/googleapis/java-asset/issues/889)) ([9c49e9f](https://www.github.com/googleapis/java-asset/commit/9c49e9fa9775a01c8e0a9158695adcc10e4219c8)) +* update dependency com.google.cloud:google-cloud-bigquery to v2.1.4 ([#873](https://www.github.com/googleapis/java-asset/issues/873)) ([c170f16](https://www.github.com/googleapis/java-asset/commit/c170f1609e7281794cc0a2ee748a1565c885b31e)) +* update dependency com.google.cloud:google-cloud-bigquery to v2.1.5 ([#888](https://www.github.com/googleapis/java-asset/issues/888)) ([87c9583](https://www.github.com/googleapis/java-asset/commit/87c9583e8efd5a34263c570a3965060fba7c408b)) +* update dependency com.google.cloud:google-cloud-bigquery to v2.1.6 ([#892](https://www.github.com/googleapis/java-asset/issues/892)) ([21743ea](https://www.github.com/googleapis/java-asset/commit/21743eac95ee2682de5d6b4b25a6749e672135b3)) +* update dependency com.google.cloud:google-cloud-core to v2.1.2 ([#884](https://www.github.com/googleapis/java-asset/issues/884)) ([a983cee](https://www.github.com/googleapis/java-asset/commit/a983cee0d5fa5de09a3a387a033854b734831e1f)) +* update dependency com.google.cloud:google-cloud-resourcemanager to v1.0.4 ([#874](https://www.github.com/googleapis/java-asset/issues/874)) ([753ab0d](https://www.github.com/googleapis/java-asset/commit/753ab0dbc52c726b5c41a6564783eb05126bf9ec)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.0 ([#886](https://www.github.com/googleapis/java-asset/issues/886)) ([fddb52d](https://www.github.com/googleapis/java-asset/commit/fddb52d87e62165aa163d48b39f5eddc367784e2)) +* update dependency com.google.cloud:google-cloud-storage to v2.1.0 ([#876](https://www.github.com/googleapis/java-asset/issues/876)) ([ce8cfd8](https://www.github.com/googleapis/java-asset/commit/ce8cfd8e8a76b1018fe74c168d3d262e63de3d6c)) + ## [3.1.0](https://www.github.com/googleapis/java-asset/compare/v3.0.1...v3.1.0) (2021-08-24) diff --git a/README.md b/README.md index c1638af38..4372aa0d0 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 - 21.0.0 + 22.0.0 pom import @@ -42,7 +42,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-asset - 3.0.1 + 3.1.0 ``` @@ -50,20 +50,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:21.0.0') +implementation platform('com.google.cloud:libraries-bom:22.0.0') -compile 'com.google.cloud:google-cloud-asset' +implementation 'com.google.cloud:google-cloud-asset' ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-asset:3.0.1' +implementation 'com.google.cloud:google-cloud-asset:3.1.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "3.0.1" +libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "3.1.0" ``` ## Authentication diff --git a/google-cloud-asset-bom/pom.xml b/google-cloud-asset-bom/pom.xml index 3e6f66206..36f872fc7 100644 --- a/google-cloud-asset-bom/pom.xml +++ b/google-cloud-asset-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-asset-bom - 3.1.0 + 3.2.0 pom com.google.cloud @@ -52,67 +52,67 @@ com.google.cloud google-cloud-asset - 3.1.0 + 3.2.0 com.google.api.grpc grpc-google-cloud-asset-v1 - 3.1.0 + 3.2.0 com.google.api.grpc grpc-google-cloud-asset-v1p1beta1 - 0.101.0 + 0.102.0 com.google.api.grpc grpc-google-cloud-asset-v1p2beta1 - 0.101.0 + 0.102.0 com.google.api.grpc grpc-google-cloud-asset-v1p4beta1 - 0.101.0 + 0.102.0 com.google.api.grpc grpc-google-cloud-asset-v1p5beta1 - 0.101.0 + 0.102.0 com.google.api.grpc grpc-google-cloud-asset-v1p7beta1 - 3.1.0 + 3.2.0 com.google.api.grpc proto-google-cloud-asset-v1 - 3.1.0 + 3.2.0 com.google.api.grpc proto-google-cloud-asset-v1p1beta1 - 0.101.0 + 0.102.0 com.google.api.grpc proto-google-cloud-asset-v1p2beta1 - 0.101.0 + 0.102.0 com.google.api.grpc proto-google-cloud-asset-v1p4beta1 - 0.101.0 + 0.102.0 com.google.api.grpc proto-google-cloud-asset-v1p5beta1 - 0.101.0 + 0.102.0 com.google.api.grpc proto-google-cloud-asset-v1p7beta1 - 3.1.0 + 3.2.0 diff --git a/google-cloud-asset/pom.xml b/google-cloud-asset/pom.xml index 0160f4dd7..1eaf269bf 100644 --- a/google-cloud-asset/pom.xml +++ b/google-cloud-asset/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-asset - 3.1.0 + 3.2.0 jar Google Cloud Asset https://github.com/googleapis/java-asset @@ -11,7 +11,7 @@ com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 google-cloud-asset diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java index 9c7ac8a9f..30012d98c 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java @@ -461,7 +461,9 @@ public static List getDefaultServiceScopes() { /** Returns a builder for the default credentials for this service. */ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); } /** Returns a builder for the default ChannelProvider for this service. */ diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java index a889b6a2d..0ccd6dbcf 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java @@ -286,7 +286,9 @@ public static List getDefaultServiceScopes() { /** Returns a builder for the default credentials for this service. */ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); } /** Returns a builder for the default ChannelProvider for this service. */ diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java index be2e5e9b9..5590d004d 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java @@ -152,7 +152,9 @@ public static List getDefaultServiceScopes() { /** Returns a builder for the default credentials for this service. */ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); } /** Returns a builder for the default ChannelProvider for this service. */ diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStubSettings.java index 56758b14b..cfd644271 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStubSettings.java @@ -153,7 +153,9 @@ public static List getDefaultServiceScopes() { /** Returns a builder for the default credentials for this service. */ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); } /** Returns a builder for the default ChannelProvider for this service. */ diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java index a1873eb3c..d1a76fbcf 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java @@ -187,7 +187,9 @@ public static List getDefaultServiceScopes() { /** Returns a builder for the default credentials for this service. */ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); } /** Returns a builder for the default ChannelProvider for this service. */ diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java index 93b117b35..2d512820e 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java @@ -136,7 +136,9 @@ public static List getDefaultServiceScopes() { /** Returns a builder for the default credentials for this service. */ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); } /** Returns a builder for the default ChannelProvider for this service. */ diff --git a/grpc-google-cloud-asset-v1/pom.xml b/grpc-google-cloud-asset-v1/pom.xml index e8cab933d..ba1289568 100644 --- a/grpc-google-cloud-asset-v1/pom.xml +++ b/grpc-google-cloud-asset-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1 - 3.1.0 + 3.2.0 grpc-google-cloud-asset-v1 GRPC library for grpc-google-cloud-asset-v1 com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/grpc-google-cloud-asset-v1p1beta1/pom.xml b/grpc-google-cloud-asset-v1p1beta1/pom.xml index 8819873b2..b779ff827 100644 --- a/grpc-google-cloud-asset-v1p1beta1/pom.xml +++ b/grpc-google-cloud-asset-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1p1beta1 - 0.101.0 + 0.102.0 grpc-google-cloud-asset-v1p1beta1 GRPC library for grpc-google-cloud-asset-v1p1beta1 com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/grpc-google-cloud-asset-v1p2beta1/pom.xml b/grpc-google-cloud-asset-v1p2beta1/pom.xml index 9d9101243..5650f9ce6 100644 --- a/grpc-google-cloud-asset-v1p2beta1/pom.xml +++ b/grpc-google-cloud-asset-v1p2beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1p2beta1 - 0.101.0 + 0.102.0 grpc-google-cloud-asset-v1p2beta1 GRPC library for grpc-google-cloud-asset-v1p2beta1 com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/grpc-google-cloud-asset-v1p4beta1/pom.xml b/grpc-google-cloud-asset-v1p4beta1/pom.xml index e240d52f9..a27299a3f 100644 --- a/grpc-google-cloud-asset-v1p4beta1/pom.xml +++ b/grpc-google-cloud-asset-v1p4beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1p4beta1 - 0.101.0 + 0.102.0 grpc-google-cloud-asset-v1p4beta1 GRPC library for grpc-google-cloud-asset-v1p4beta1 com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/grpc-google-cloud-asset-v1p5beta1/pom.xml b/grpc-google-cloud-asset-v1p5beta1/pom.xml index 44ca55a2e..f5f931311 100644 --- a/grpc-google-cloud-asset-v1p5beta1/pom.xml +++ b/grpc-google-cloud-asset-v1p5beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1p5beta1 - 0.101.0 + 0.102.0 grpc-google-cloud-asset-v1p5beta1 GRPC library for grpc-google-cloud-asset-v1p5beta1 com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/grpc-google-cloud-asset-v1p7beta1/pom.xml b/grpc-google-cloud-asset-v1p7beta1/pom.xml index 94ec72380..6a45dde26 100644 --- a/grpc-google-cloud-asset-v1p7beta1/pom.xml +++ b/grpc-google-cloud-asset-v1p7beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1p7beta1 - 3.1.0 + 3.2.0 grpc-google-cloud-asset-v1p7beta1 GRPC library for google-cloud-asset com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/pom.xml b/pom.xml index f6dbc1b04..6e66e738b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-asset-parent pom - 3.1.0 + 3.2.0 Google Cloud Asset Parent https://github.com/googleapis/java-asset @@ -61,90 +61,90 @@ com.google.api.grpc proto-google-cloud-asset-v1 - 3.1.0 + 3.2.0 com.google.api.grpc proto-google-cloud-asset-v1p7beta1 - 3.1.0 + 3.2.0 com.google.api.grpc grpc-google-cloud-asset-v1p7beta1 - 3.1.0 + 3.2.0 com.google.api.grpc proto-google-cloud-asset-v1p1beta1 - 0.101.0 + 0.102.0 com.google.api.grpc proto-google-cloud-asset-v1p2beta1 - 0.101.0 + 0.102.0 com.google.api.grpc proto-google-cloud-asset-v1p4beta1 - 0.101.0 + 0.102.0 com.google.api.grpc proto-google-cloud-asset-v1p5beta1 - 0.101.0 + 0.102.0 com.google.api.grpc grpc-google-cloud-asset-v1 - 3.1.0 + 3.2.0 com.google.api.grpc grpc-google-cloud-asset-v1p1beta1 - 0.101.0 + 0.102.0 com.google.api.grpc grpc-google-cloud-asset-v1p2beta1 - 0.101.0 + 0.102.0 com.google.api.grpc grpc-google-cloud-asset-v1p4beta1 - 0.101.0 + 0.102.0 com.google.api.grpc grpc-google-cloud-asset-v1p5beta1 - 0.101.0 + 0.102.0 com.google.cloud google-cloud-asset - 3.1.0 + 3.2.0 com.google.cloud google-cloud-shared-dependencies - 2.1.0 + 2.2.0 pom import com.google.api.grpc proto-google-cloud-orgpolicy-v1 - 2.0.2 + 2.0.3 com.google.api.grpc proto-google-identity-accesscontextmanager-v1 - 1.1.4 + 1.1.5 com.google.api.grpc proto-google-cloud-os-config-v1 - 2.0.2 + 2.1.0 @@ -162,13 +162,13 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.96.1 + 1.96.2 test com.google.cloud google-cloud-resourcemanager - 1.0.3 + 1.0.4 test diff --git a/proto-google-cloud-asset-v1/pom.xml b/proto-google-cloud-asset-v1/pom.xml index adb056a14..956a17d9e 100644 --- a/proto-google-cloud-asset-v1/pom.xml +++ b/proto-google-cloud-asset-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1 - 3.1.0 + 3.2.0 proto-google-cloud-asset-v1 PROTO library for proto-google-cloud-asset-v1 com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java index df9f30b51..4131879ca 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java @@ -63,6 +63,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_asset_v1_VersionedResource_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -71,6 +75,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_asset_v1_AttachedResource_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_asset_v1_AttachedResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_RelatedResources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_RelatedResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -188,7 +200,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "esource_type\030\002 \001(\t\022\016\n\006action\030\003 \001(\t\"j\n\014Re" + "latedAsset\0223\n\005asset\030\001 \001(\tB$\372A!\n\037cloudass" + "et.googleapis.com/Asset\022\022\n\nasset_type\030\002 " - + "\001(\t\022\021\n\tancestors\030\003 \003(\t\"\277\005\n\024ResourceSearc" + + "\001(\t\022\021\n\tancestors\030\003 \003(\t\"\365\006\n\024ResourceSearc" + "hResult\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(" + "\t\022\017\n\007project\030\003 \001(\t\022\017\n\007folders\030\021 \003(\t\022\024\n\014o" + "rganization\030\022 \001(\t\022\024\n\014display_name\030\004 \001(\t\022" @@ -204,68 +216,76 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "rsioned_resources\030\020 \003(\0132(.google.cloud.a" + "sset.v1.VersionedResource\022C\n\022attached_re" + "sources\030\024 \003(\0132\'.google.cloud.asset.v1.At" - + "tachedResource\022\031\n\021parent_asset_type\030g \001(" - + "\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001\"O\n\021VersionedResource\022\017\n\007version" - + "\030\001 \001(\t\022)\n\010resource\030\002 \001(\0132\027.google.protob" - + "uf.Struct\"m\n\020AttachedResource\022\022\n\nasset_t" - + "ype\030\001 \001(\t\022E\n\023versioned_resources\030\003 \003(\0132(" - + ".google.cloud.asset.v1.VersionedResource" - + "\"\217\004\n\025IamPolicySearchResult\022\020\n\010resource\030\001" - + " \001(\t\022\022\n\nasset_type\030\005 \001(\t\022\017\n\007project\030\002 \001(" - + "\t\022\017\n\007folders\030\006 \003(\t\022\024\n\014organization\030\007 \001(\t" - + "\022%\n\006policy\030\003 \001(\0132\025.google.iam.v1.Policy\022" - + "M\n\013explanation\030\004 \001(\01328.google.cloud.asse" - + "t.v1.IamPolicySearchResult.Explanation\032\241" - + "\002\n\013Explanation\022m\n\023matched_permissions\030\001 " - + "\003(\0132P.google.cloud.asset.v1.IamPolicySea" - + "rchResult.Explanation.MatchedPermissions" - + "Entry\032\"\n\013Permissions\022\023\n\013permissions\030\001 \003(" - + "\t\032\177\n\027MatchedPermissionsEntry\022\013\n\003key\030\001 \001(" - + "\t\022S\n\005value\030\002 \001(\0132D.google.cloud.asset.v1" - + ".IamPolicySearchResult.Explanation.Permi" - + "ssions:\0028\001\"G\n\026IamPolicyAnalysisState\022\036\n\004" - + "code\030\001 \001(\0162\020.google.rpc.Code\022\r\n\005cause\030\002 " - + "\001(\t\"\306\001\n\023ConditionEvaluation\022T\n\020evaluatio" - + "n_value\030\001 \001(\0162:.google.cloud.asset.v1.Co" - + "nditionEvaluation.EvaluationValue\"Y\n\017Eva" - + "luationValue\022 \n\034EVALUATION_VALUE_UNSPECI" - + "FIED\020\000\022\010\n\004TRUE\020\001\022\t\n\005FALSE\020\002\022\017\n\013CONDITION" - + "AL\020\003\"\253\t\n\027IamPolicyAnalysisResult\022#\n\033atta" - + "ched_resource_full_name\030\001 \001(\t\022+\n\013iam_bin" - + "ding\030\002 \001(\0132\026.google.iam.v1.Binding\022^\n\024ac" - + "cess_control_lists\030\003 \003(\0132@.google.cloud." - + "asset.v1.IamPolicyAnalysisResult.AccessC" - + "ontrolList\022R\n\ridentity_list\030\004 \001(\0132;.goog" - + "le.cloud.asset.v1.IamPolicyAnalysisResul" - + "t.IdentityList\022\026\n\016fully_explored\030\005 \001(\010\032m" - + "\n\010Resource\022\032\n\022full_resource_name\030\001 \001(\t\022E" - + "\n\016analysis_state\030\002 \001(\0132-.google.cloud.as" - + "set.v1.IamPolicyAnalysisState\032\205\001\n\006Access" - + "\022\016\n\004role\030\001 \001(\tH\000\022\024\n\npermission\030\002 \001(\tH\000\022E" - + "\n\016analysis_state\030\003 \001(\0132-.google.cloud.as" - + "set.v1.IamPolicyAnalysisStateB\016\n\014oneof_a" - + "ccess\032_\n\010Identity\022\014\n\004name\030\001 \001(\t\022E\n\016analy" - + "sis_state\030\002 \001(\0132-.google.cloud.asset.v1." - + "IamPolicyAnalysisState\0320\n\004Edge\022\023\n\013source" - + "_node\030\001 \001(\t\022\023\n\013target_node\030\002 \001(\t\032\277\002\n\021Acc" - + "essControlList\022J\n\tresources\030\001 \003(\01327.goog" - + "le.cloud.asset.v1.IamPolicyAnalysisResul" - + "t.Resource\022G\n\010accesses\030\002 \003(\01325.google.cl" - + "oud.asset.v1.IamPolicyAnalysisResult.Acc" - + "ess\022K\n\016resource_edges\030\003 \003(\01323.google.clo" - + "ud.asset.v1.IamPolicyAnalysisResult.Edge" - + "\022H\n\024condition_evaluation\030\004 \001(\0132*.google." - + "cloud.asset.v1.ConditionEvaluation\032\245\001\n\014I" - + "dentityList\022K\n\nidentities\030\001 \003(\01327.google" - + ".cloud.asset.v1.IamPolicyAnalysisResult." - + "Identity\022H\n\013group_edges\030\002 \003(\01323.google.c" - + "loud.asset.v1.IamPolicyAnalysisResult.Ed" - + "geB\230\001\n\031com.google.cloud.asset.v1B\nAssetP" - + "rotoP\001Z:google.golang.org/genproto/googl" - + "eapis/cloud/asset/v1;asset\370\001\001\252\002\025Google.C" - + "loud.Asset.V1\312\002\025Google\\Cloud\\Asset\\V1b\006p" - + "roto3" + + "tachedResource\022U\n\rrelationships\030\025 \003(\0132>." + + "google.cloud.asset.v1.ResourceSearchResu" + + "lt.RelationshipsEntry\022\031\n\021parent_asset_ty" + + "pe\030g \001(\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001\032]\n\022RelationshipsEntry\022\013\n" + + "\003key\030\001 \001(\t\0226\n\005value\030\002 \001(\0132\'.google.cloud" + + ".asset.v1.RelatedResources:\0028\001\"O\n\021Versio" + + "nedResource\022\017\n\007version\030\001 \001(\t\022)\n\010resource" + + "\030\002 \001(\0132\027.google.protobuf.Struct\"m\n\020Attac" + + "hedResource\022\022\n\nasset_type\030\001 \001(\t\022E\n\023versi" + + "oned_resources\030\003 \003(\0132(.google.cloud.asse" + + "t.v1.VersionedResource\"U\n\020RelatedResourc" + + "es\022A\n\021related_resources\030\001 \003(\0132&.google.c" + + "loud.asset.v1.RelatedResource\"A\n\017Related" + + "Resource\022\022\n\nasset_type\030\001 \001(\t\022\032\n\022full_res" + + "ource_name\030\002 \001(\t\"\217\004\n\025IamPolicySearchResu" + + "lt\022\020\n\010resource\030\001 \001(\t\022\022\n\nasset_type\030\005 \001(\t" + + "\022\017\n\007project\030\002 \001(\t\022\017\n\007folders\030\006 \003(\t\022\024\n\014or" + + "ganization\030\007 \001(\t\022%\n\006policy\030\003 \001(\0132\025.googl" + + "e.iam.v1.Policy\022M\n\013explanation\030\004 \001(\01328.g" + + "oogle.cloud.asset.v1.IamPolicySearchResu" + + "lt.Explanation\032\241\002\n\013Explanation\022m\n\023matche" + + "d_permissions\030\001 \003(\0132P.google.cloud.asset" + + ".v1.IamPolicySearchResult.Explanation.Ma" + + "tchedPermissionsEntry\032\"\n\013Permissions\022\023\n\013" + + "permissions\030\001 \003(\t\032\177\n\027MatchedPermissionsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022S\n\005value\030\002 \001(\0132D.googl" + + "e.cloud.asset.v1.IamPolicySearchResult.E" + + "xplanation.Permissions:\0028\001\"G\n\026IamPolicyA" + + "nalysisState\022\036\n\004code\030\001 \001(\0162\020.google.rpc." + + "Code\022\r\n\005cause\030\002 \001(\t\"\306\001\n\023ConditionEvaluat" + + "ion\022T\n\020evaluation_value\030\001 \001(\0162:.google.c" + + "loud.asset.v1.ConditionEvaluation.Evalua" + + "tionValue\"Y\n\017EvaluationValue\022 \n\034EVALUATI" + + "ON_VALUE_UNSPECIFIED\020\000\022\010\n\004TRUE\020\001\022\t\n\005FALS" + + "E\020\002\022\017\n\013CONDITIONAL\020\003\"\253\t\n\027IamPolicyAnalys" + + "isResult\022#\n\033attached_resource_full_name\030" + + "\001 \001(\t\022+\n\013iam_binding\030\002 \001(\0132\026.google.iam." + + "v1.Binding\022^\n\024access_control_lists\030\003 \003(\013" + + "2@.google.cloud.asset.v1.IamPolicyAnalys" + + "isResult.AccessControlList\022R\n\ridentity_l" + + "ist\030\004 \001(\0132;.google.cloud.asset.v1.IamPol" + + "icyAnalysisResult.IdentityList\022\026\n\016fully_" + + "explored\030\005 \001(\010\032m\n\010Resource\022\032\n\022full_resou" + + "rce_name\030\001 \001(\t\022E\n\016analysis_state\030\002 \001(\0132-" + + ".google.cloud.asset.v1.IamPolicyAnalysis" + + "State\032\205\001\n\006Access\022\016\n\004role\030\001 \001(\tH\000\022\024\n\nperm" + + "ission\030\002 \001(\tH\000\022E\n\016analysis_state\030\003 \001(\0132-" + + ".google.cloud.asset.v1.IamPolicyAnalysis" + + "StateB\016\n\014oneof_access\032_\n\010Identity\022\014\n\004nam" + + "e\030\001 \001(\t\022E\n\016analysis_state\030\002 \001(\0132-.google" + + ".cloud.asset.v1.IamPolicyAnalysisState\0320" + + "\n\004Edge\022\023\n\013source_node\030\001 \001(\t\022\023\n\013target_no" + + "de\030\002 \001(\t\032\277\002\n\021AccessControlList\022J\n\tresour" + + "ces\030\001 \003(\01327.google.cloud.asset.v1.IamPol" + + "icyAnalysisResult.Resource\022G\n\010accesses\030\002" + + " \003(\01325.google.cloud.asset.v1.IamPolicyAn" + + "alysisResult.Access\022K\n\016resource_edges\030\003 " + + "\003(\01323.google.cloud.asset.v1.IamPolicyAna" + + "lysisResult.Edge\022H\n\024condition_evaluation" + + "\030\004 \001(\0132*.google.cloud.asset.v1.Condition" + + "Evaluation\032\245\001\n\014IdentityList\022K\n\nidentitie" + + "s\030\001 \003(\01327.google.cloud.asset.v1.IamPolic" + + "yAnalysisResult.Identity\022H\n\013group_edges\030" + + "\002 \003(\01323.google.cloud.asset.v1.IamPolicyA" + + "nalysisResult.EdgeB\230\001\n\031com.google.cloud." + + "asset.v1B\nAssetProtoP\001Z:google.golang.or" + + "g/genproto/googleapis/cloud/asset/v1;ass" + + "et\370\001\001\252\002\025Google.Cloud.Asset.V1\312\002\025Google\\C" + + "loud\\Asset\\V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -382,6 +402,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ParentFullResourceName", "VersionedResources", "AttachedResources", + "Relationships", "ParentAssetType", }); internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor = @@ -394,6 +415,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor = + internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_asset_v1_VersionedResource_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_asset_v1_VersionedResource_fieldAccessorTable = @@ -410,8 +441,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "AssetType", "VersionedResources", }); - internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor = + internal_static_google_cloud_asset_v1_RelatedResources_descriptor = getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_RelatedResources_descriptor, + new java.lang.String[] { + "RelatedResources", + }); + internal_static_google_cloud_asset_v1_RelatedResource_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_RelatedResource_descriptor, + new java.lang.String[] { + "AssetType", "FullResourceName", + }); + internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor = + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_asset_v1_IamPolicySearchResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor, @@ -455,7 +502,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor, @@ -463,7 +510,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Code", "Cause", }); internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor, @@ -471,7 +518,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EvaluationValue", }); internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor, diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java new file mode 100644 index 000000000..45b7d465c --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java @@ -0,0 +1,820 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * The detailed related resource.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedResource} + */ +public final class RelatedResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedResource) + RelatedResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelatedResource.newBuilder() to construct. + private RelatedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RelatedResource() { + assetType_ = ""; + fullResourceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RelatedResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RelatedResource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + fullResourceName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedResource.class, + com.google.cloud.asset.v1.RelatedResource.Builder.class); + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object assetType_; + /** + * + * + *
+   * The type of the asset. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string asset_type = 1; + * + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + * + * + *
+   * The type of the asset. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string asset_type = 1; + * + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object fullResourceName_; + /** + * + * + *
+   * The full resource name of the related resource. Example:
+   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+   * 
+ * + * string full_resource_name = 2; + * + * @return The fullResourceName. + */ + @java.lang.Override + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } + } + /** + * + * + *
+   * The full resource name of the related resource. Example:
+   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+   * 
+ * + * string full_resource_name = 2; + * + * @return The bytes for fullResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAssetTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, assetType_); + } + if (!getFullResourceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fullResourceName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAssetTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, assetType_); + } + if (!getFullResourceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fullResourceName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.RelatedResource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.RelatedResource other = + (com.google.cloud.asset.v1.RelatedResource) obj; + + if (!getAssetType().equals(other.getAssetType())) return false; + if (!getFullResourceName().equals(other.getFullResourceName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullResourceName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedResource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.asset.v1.RelatedResource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The detailed related resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedResource) + com.google.cloud.asset.v1.RelatedResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedResource.class, + com.google.cloud.asset.v1.RelatedResource.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.RelatedResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + assetType_ = ""; + + fullResourceName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResource getDefaultInstanceForType() { + return com.google.cloud.asset.v1.RelatedResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResource build() { + com.google.cloud.asset.v1.RelatedResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResource buildPartial() { + com.google.cloud.asset.v1.RelatedResource result = + new com.google.cloud.asset.v1.RelatedResource(this); + result.assetType_ = assetType_; + result.fullResourceName_ = fullResourceName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.RelatedResource) { + return mergeFrom((com.google.cloud.asset.v1.RelatedResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.RelatedResource other) { + if (other == com.google.cloud.asset.v1.RelatedResource.getDefaultInstance()) return this; + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (!other.getFullResourceName().isEmpty()) { + fullResourceName_ = other.fullResourceName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.RelatedResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.RelatedResource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object assetType_ = ""; + /** + * + * + *
+     * The type of the asset. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string asset_type = 1; + * + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The type of the asset. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string asset_type = 1; + * + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The type of the asset. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string asset_type = 1; + * + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the asset. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string asset_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the asset. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string asset_type = 1; + * + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private java.lang.Object fullResourceName_ = ""; + /** + * + * + *
+     * The full resource name of the related resource. Example:
+     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+     * 
+ * + * string full_resource_name = 2; + * + * @return The fullResourceName. + */ + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full resource name of the related resource. Example:
+     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+     * 
+ * + * string full_resource_name = 2; + * + * @return The bytes for fullResourceName. + */ + public com.google.protobuf.ByteString getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full resource name of the related resource. Example:
+     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+     * 
+ * + * string full_resource_name = 2; + * + * @param value The fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullResourceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The full resource name of the related resource. Example:
+     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+     * 
+ * + * string full_resource_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearFullResourceName() { + + fullResourceName_ = getDefaultInstance().getFullResourceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The full resource name of the related resource. Example:
+     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+     * 
+ * + * string full_resource_name = 2; + * + * @param value The bytes for fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullResourceName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedResource) + private static final com.google.cloud.asset.v1.RelatedResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedResource(); + } + + public static com.google.cloud.asset.v1.RelatedResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelatedResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java new file mode 100644 index 000000000..e23e9a341 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface RelatedResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of the asset. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string asset_type = 1; + * + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + * + * + *
+   * The type of the asset. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string asset_type = 1; + * + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString getAssetTypeBytes(); + + /** + * + * + *
+   * The full resource name of the related resource. Example:
+   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+   * 
+ * + * string full_resource_name = 2; + * + * @return The fullResourceName. + */ + java.lang.String getFullResourceName(); + /** + * + * + *
+   * The full resource name of the related resource. Example:
+   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+   * 
+ * + * string full_resource_name = 2; + * + * @return The bytes for fullResourceName. + */ + com.google.protobuf.ByteString getFullResourceNameBytes(); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java new file mode 100644 index 000000000..446636a56 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java @@ -0,0 +1,955 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * The related resources of the primary resource.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedResources} + */ +public final class RelatedResources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedResources) + RelatedResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelatedResources.newBuilder() to construct. + private RelatedResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RelatedResources() { + relatedResources_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RelatedResources(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RelatedResources( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + relatedResources_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + relatedResources_.add( + input.readMessage( + com.google.cloud.asset.v1.RelatedResource.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + relatedResources_ = java.util.Collections.unmodifiableList(relatedResources_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedResources.class, + com.google.cloud.asset.v1.RelatedResources.Builder.class); + } + + public static final int RELATED_RESOURCES_FIELD_NUMBER = 1; + private java.util.List relatedResources_; + /** + * + * + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + @java.lang.Override + public java.util.List getRelatedResourcesList() { + return relatedResources_; + } + /** + * + * + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + @java.lang.Override + public java.util.List + getRelatedResourcesOrBuilderList() { + return relatedResources_; + } + /** + * + * + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + @java.lang.Override + public int getRelatedResourcesCount() { + return relatedResources_.size(); + } + /** + * + * + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResource getRelatedResources(int index) { + return relatedResources_.get(index); + } + /** + * + * + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResourceOrBuilder getRelatedResourcesOrBuilder( + int index) { + return relatedResources_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < relatedResources_.size(); i++) { + output.writeMessage(1, relatedResources_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < relatedResources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, relatedResources_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.RelatedResources)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.RelatedResources other = + (com.google.cloud.asset.v1.RelatedResources) obj; + + if (!getRelatedResourcesList().equals(other.getRelatedResourcesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRelatedResourcesCount() > 0) { + hash = (37 * hash) + RELATED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getRelatedResourcesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedResources parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedResources parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.asset.v1.RelatedResources prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The related resources of the primary resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedResources} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedResources) + com.google.cloud.asset.v1.RelatedResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedResources.class, + com.google.cloud.asset.v1.RelatedResources.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.RelatedResources.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRelatedResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (relatedResourcesBuilder_ == null) { + relatedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + relatedResourcesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources getDefaultInstanceForType() { + return com.google.cloud.asset.v1.RelatedResources.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources build() { + com.google.cloud.asset.v1.RelatedResources result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources buildPartial() { + com.google.cloud.asset.v1.RelatedResources result = + new com.google.cloud.asset.v1.RelatedResources(this); + int from_bitField0_ = bitField0_; + if (relatedResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + relatedResources_ = java.util.Collections.unmodifiableList(relatedResources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.relatedResources_ = relatedResources_; + } else { + result.relatedResources_ = relatedResourcesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.RelatedResources) { + return mergeFrom((com.google.cloud.asset.v1.RelatedResources) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.RelatedResources other) { + if (other == com.google.cloud.asset.v1.RelatedResources.getDefaultInstance()) return this; + if (relatedResourcesBuilder_ == null) { + if (!other.relatedResources_.isEmpty()) { + if (relatedResources_.isEmpty()) { + relatedResources_ = other.relatedResources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRelatedResourcesIsMutable(); + relatedResources_.addAll(other.relatedResources_); + } + onChanged(); + } + } else { + if (!other.relatedResources_.isEmpty()) { + if (relatedResourcesBuilder_.isEmpty()) { + relatedResourcesBuilder_.dispose(); + relatedResourcesBuilder_ = null; + relatedResources_ = other.relatedResources_; + bitField0_ = (bitField0_ & ~0x00000001); + relatedResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRelatedResourcesFieldBuilder() + : null; + } else { + relatedResourcesBuilder_.addAllMessages(other.relatedResources_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.RelatedResources parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.RelatedResources) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List relatedResources_ = + java.util.Collections.emptyList(); + + private void ensureRelatedResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + relatedResources_ = + new java.util.ArrayList(relatedResources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedResource, + com.google.cloud.asset.v1.RelatedResource.Builder, + com.google.cloud.asset.v1.RelatedResourceOrBuilder> + relatedResourcesBuilder_; + + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public java.util.List getRelatedResourcesList() { + if (relatedResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedResources_); + } else { + return relatedResourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public int getRelatedResourcesCount() { + if (relatedResourcesBuilder_ == null) { + return relatedResources_.size(); + } else { + return relatedResourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public com.google.cloud.asset.v1.RelatedResource getRelatedResources(int index) { + if (relatedResourcesBuilder_ == null) { + return relatedResources_.get(index); + } else { + return relatedResourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder setRelatedResources(int index, com.google.cloud.asset.v1.RelatedResource value) { + if (relatedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedResourcesIsMutable(); + relatedResources_.set(index, value); + onChanged(); + } else { + relatedResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder setRelatedResources( + int index, com.google.cloud.asset.v1.RelatedResource.Builder builderForValue) { + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + relatedResources_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder addRelatedResources(com.google.cloud.asset.v1.RelatedResource value) { + if (relatedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedResourcesIsMutable(); + relatedResources_.add(value); + onChanged(); + } else { + relatedResourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder addRelatedResources(int index, com.google.cloud.asset.v1.RelatedResource value) { + if (relatedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedResourcesIsMutable(); + relatedResources_.add(index, value); + onChanged(); + } else { + relatedResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder addRelatedResources( + com.google.cloud.asset.v1.RelatedResource.Builder builderForValue) { + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + relatedResources_.add(builderForValue.build()); + onChanged(); + } else { + relatedResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder addRelatedResources( + int index, com.google.cloud.asset.v1.RelatedResource.Builder builderForValue) { + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + relatedResources_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder addAllRelatedResources( + java.lang.Iterable values) { + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedResources_); + onChanged(); + } else { + relatedResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder clearRelatedResources() { + if (relatedResourcesBuilder_ == null) { + relatedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + relatedResourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder removeRelatedResources(int index) { + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + relatedResources_.remove(index); + onChanged(); + } else { + relatedResourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public com.google.cloud.asset.v1.RelatedResource.Builder getRelatedResourcesBuilder(int index) { + return getRelatedResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public com.google.cloud.asset.v1.RelatedResourceOrBuilder getRelatedResourcesOrBuilder( + int index) { + if (relatedResourcesBuilder_ == null) { + return relatedResources_.get(index); + } else { + return relatedResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public java.util.List + getRelatedResourcesOrBuilderList() { + if (relatedResourcesBuilder_ != null) { + return relatedResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedResources_); + } + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public com.google.cloud.asset.v1.RelatedResource.Builder addRelatedResourcesBuilder() { + return getRelatedResourcesFieldBuilder() + .addBuilder(com.google.cloud.asset.v1.RelatedResource.getDefaultInstance()); + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public com.google.cloud.asset.v1.RelatedResource.Builder addRelatedResourcesBuilder(int index) { + return getRelatedResourcesFieldBuilder() + .addBuilder(index, com.google.cloud.asset.v1.RelatedResource.getDefaultInstance()); + } + /** + * + * + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public java.util.List + getRelatedResourcesBuilderList() { + return getRelatedResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedResource, + com.google.cloud.asset.v1.RelatedResource.Builder, + com.google.cloud.asset.v1.RelatedResourceOrBuilder> + getRelatedResourcesFieldBuilder() { + if (relatedResourcesBuilder_ == null) { + relatedResourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedResource, + com.google.cloud.asset.v1.RelatedResource.Builder, + com.google.cloud.asset.v1.RelatedResourceOrBuilder>( + relatedResources_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + relatedResources_ = null; + } + return relatedResourcesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedResources) + private static final com.google.cloud.asset.v1.RelatedResources DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedResources(); + } + + public static com.google.cloud.asset.v1.RelatedResources getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedResources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelatedResources(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java new file mode 100644 index 000000000..7e13b3b81 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface RelatedResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedResources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + java.util.List getRelatedResourcesList(); + /** + * + * + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + com.google.cloud.asset.v1.RelatedResource getRelatedResources(int index); + /** + * + * + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + int getRelatedResourcesCount(); + /** + * + * + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + java.util.List + getRelatedResourcesOrBuilderList(); + /** + * + * + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + com.google.cloud.asset.v1.RelatedResourceOrBuilder getRelatedResourcesOrBuilder(int index); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java index 24d819ade..0b542aeda 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java @@ -257,6 +257,25 @@ private ResourceSearchResult( com.google.cloud.asset.v1.AttachedResource.parser(), extensionRegistry)); break; } + case 170: + { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + relationships_ = + com.google.protobuf.MapField.newMapField( + RelationshipsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000020; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.asset.v1.RelatedResources> + relationships__ = + input.readMessage( + RelationshipsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + relationships_ + .getMutableMap() + .put(relationships__.getKey(), relationships__.getValue()); + break; + } case 826: { java.lang.String s = input.readStringRequireUtf8(); @@ -306,6 +325,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 7: return internalGetLabels(); + case 21: + return internalGetRelationships(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -1669,6 +1690,135 @@ public com.google.cloud.asset.v1.AttachedResourceOrBuilder getAttachedResourcesO return attachedResources_.get(index); } + public static final int RELATIONSHIPS_FIELD_NUMBER = 21; + + private static final class RelationshipsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.asset.v1.RelatedResources> + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.asset.v1.RelatedResources.getDefaultInstance()); + } + + private com.google.protobuf.MapField + relationships_; + + private com.google.protobuf.MapField + internalGetRelationships() { + if (relationships_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RelationshipsDefaultEntryHolder.defaultEntry); + } + return relationships_; + } + + public int getRelationshipsCount() { + return internalGetRelationships().getMap().size(); + } + /** + * + * + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + public boolean containsRelationships(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetRelationships().getMap().containsKey(key); + } + /** Use {@link #getRelationshipsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getRelationships() { + return getRelationshipsMap(); + } + /** + * + * + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + public java.util.Map + getRelationshipsMap() { + return internalGetRelationships().getMap(); + } + /** + * + * + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( + java.lang.String key, com.google.cloud.asset.v1.RelatedResources defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetRelationships().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetRelationships().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public static final int PARENT_ASSET_TYPE_FIELD_NUMBER = 103; private volatile java.lang.Object parentAssetType_; /** @@ -1795,6 +1945,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < attachedResources_.size(); i++) { output.writeMessage(20, attachedResources_.get(i)); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetRelationships(), RelationshipsDefaultEntryHolder.defaultEntry, 21); if (!getParentAssetTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 103, parentAssetType_); } @@ -1881,6 +2033,17 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, attachedResources_.get(i)); } + for (java.util.Map.Entry entry : + internalGetRelationships().getMap().entrySet()) { + com.google.protobuf.MapEntry + relationships__ = + RelationshipsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, relationships__); + } if (!getParentAssetTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(103, parentAssetType_); } @@ -1927,6 +2090,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParentFullResourceName().equals(other.getParentFullResourceName())) return false; if (!getVersionedResourcesList().equals(other.getVersionedResourcesList())) return false; if (!getAttachedResourcesList().equals(other.getAttachedResourcesList())) return false; + if (!internalGetRelationships().equals(other.internalGetRelationships())) return false; if (!getParentAssetType().equals(other.getParentAssetType())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -1991,6 +2155,10 @@ public int hashCode() { hash = (37 * hash) + ATTACHED_RESOURCES_FIELD_NUMBER; hash = (53 * hash) + getAttachedResourcesList().hashCode(); } + if (!internalGetRelationships().getMap().isEmpty()) { + hash = (37 * hash) + RELATIONSHIPS_FIELD_NUMBER; + hash = (53 * hash) + internalGetRelationships().hashCode(); + } hash = (37 * hash) + PARENT_ASSET_TYPE_FIELD_NUMBER; hash = (53 * hash) + getParentAssetType().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); @@ -2116,6 +2284,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 7: return internalGetLabels(); + case 21: + return internalGetRelationships(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -2126,6 +2296,8 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { switch (number) { case 7: return internalGetMutableLabels(); + case 21: + return internalGetMutableRelationships(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -2216,6 +2388,7 @@ public Builder clear() { } else { attachedResourcesBuilder_.clear(); } + internalGetMutableRelationships().clear(); parentAssetType_ = ""; return this; @@ -2301,6 +2474,8 @@ public com.google.cloud.asset.v1.ResourceSearchResult buildPartial() { } else { result.attachedResources_ = attachedResourcesBuilder_.build(); } + result.relationships_ = internalGetRelationships(); + result.relationships_.makeImmutable(); result.parentAssetType_ = parentAssetType_; onBuilt(); return result; @@ -2475,6 +2650,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ResourceSearchResult other) { } } } + internalGetMutableRelationships().mergeFrom(other.internalGetRelationships()); if (!other.getParentAssetType().isEmpty()) { parentAssetType_ = other.parentAssetType_; onChanged(); @@ -6291,6 +6467,213 @@ public com.google.cloud.asset.v1.AttachedResource.Builder addAttachedResourcesBu return attachedResourcesBuilder_; } + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.asset.v1.RelatedResources> + relationships_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.asset.v1.RelatedResources> + internalGetRelationships() { + if (relationships_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RelationshipsDefaultEntryHolder.defaultEntry); + } + return relationships_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.asset.v1.RelatedResources> + internalGetMutableRelationships() { + onChanged(); + ; + if (relationships_ == null) { + relationships_ = + com.google.protobuf.MapField.newMapField(RelationshipsDefaultEntryHolder.defaultEntry); + } + if (!relationships_.isMutable()) { + relationships_ = relationships_.copy(); + } + return relationships_; + } + + public int getRelationshipsCount() { + return internalGetRelationships().getMap().size(); + } + /** + * + * + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + public boolean containsRelationships(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetRelationships().getMap().containsKey(key); + } + /** Use {@link #getRelationshipsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getRelationships() { + return getRelationshipsMap(); + } + /** + * + * + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + public java.util.Map + getRelationshipsMap() { + return internalGetRelationships().getMap(); + } + /** + * + * + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( + java.lang.String key, com.google.cloud.asset.v1.RelatedResources defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetRelationships().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow( + java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetRelationships().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRelationships() { + internalGetMutableRelationships().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + public Builder removeRelationships(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableRelationships().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableRelationships() { + return internalGetMutableRelationships().getMutableMap(); + } + /** + * + * + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + public Builder putRelationships( + java.lang.String key, com.google.cloud.asset.v1.RelatedResources value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableRelationships().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + public Builder putAllRelationships( + java.util.Map values) { + internalGetMutableRelationships().getMutableMap().putAll(values); + return this; + } + private java.lang.Object parentAssetType_ = ""; /** * diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java index 80d0550ff..3b2e5977f 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java @@ -1005,6 +1005,86 @@ public interface ResourceSearchResultOrBuilder */ com.google.cloud.asset.v1.AttachedResourceOrBuilder getAttachedResourcesOrBuilder(int index); + /** + * + * + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + int getRelationshipsCount(); + /** + * + * + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + boolean containsRelationships(java.lang.String key); + /** Use {@link #getRelationshipsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getRelationships(); + /** + * + * + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + java.util.Map getRelationshipsMap(); + /** + * + * + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( + java.lang.String key, com.google.cloud.asset.v1.RelatedResources defaultValue); + /** + * + * + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow(java.lang.String key); + /** * * diff --git a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto index 97bc4872d..3d433b8f3 100644 --- a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto +++ b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto @@ -503,6 +503,14 @@ message ResourceSearchResult { // as to allow users to search on them. repeated AttachedResource attached_resources = 20; + // A map of related resources of this resource, keyed by the + // relationship type. A relationship type is in the format of + // {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`, + // `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`. + // See [supported relationship + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types). + map relationships = 21; + // The type of this resource's immediate parent, if there is one. // // To search against the `parent_asset_type`: @@ -558,6 +566,22 @@ message AttachedResource { repeated VersionedResource versioned_resources = 3; } +// The related resources of the primary resource. +message RelatedResources { + // The detailed related resources of the primary resource. + repeated RelatedResource related_resources = 1; +} + +// The detailed related resource. +message RelatedResource { + // The type of the asset. Example: `compute.googleapis.com/Instance` + string asset_type = 1; + + // The full resource name of the related resource. Example: + // `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123` + string full_resource_name = 2; +} + // A result of IAM Policy search, containing information of an IAM policy. message IamPolicySearchResult { // Explanation about the IAM policy search result. diff --git a/proto-google-cloud-asset-v1p1beta1/pom.xml b/proto-google-cloud-asset-v1p1beta1/pom.xml index e46b8729d..ba6382416 100644 --- a/proto-google-cloud-asset-v1p1beta1/pom.xml +++ b/proto-google-cloud-asset-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1p1beta1 - 0.101.0 + 0.102.0 proto-google-cloud-asset-v1p1beta1 PROTO library for proto-google-cloud-asset-v1p1beta1 com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/proto-google-cloud-asset-v1p2beta1/pom.xml b/proto-google-cloud-asset-v1p2beta1/pom.xml index 397ac89dc..b030959cb 100644 --- a/proto-google-cloud-asset-v1p2beta1/pom.xml +++ b/proto-google-cloud-asset-v1p2beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1p2beta1 - 0.101.0 + 0.102.0 proto-google-cloud-asset-v1p2beta1 PROTO library for proto-google-cloud-asset-v1p2beta1 com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/proto-google-cloud-asset-v1p4beta1/pom.xml b/proto-google-cloud-asset-v1p4beta1/pom.xml index 8a96365eb..26df12b0e 100644 --- a/proto-google-cloud-asset-v1p4beta1/pom.xml +++ b/proto-google-cloud-asset-v1p4beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1p4beta1 - 0.101.0 + 0.102.0 proto-google-cloud-asset-v1p4beta1 PROTO library for proto-google-cloud-asset-v1p4beta1 com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/proto-google-cloud-asset-v1p5beta1/pom.xml b/proto-google-cloud-asset-v1p5beta1/pom.xml index a14dd2fb6..b82157a19 100644 --- a/proto-google-cloud-asset-v1p5beta1/pom.xml +++ b/proto-google-cloud-asset-v1p5beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1p5beta1 - 0.101.0 + 0.102.0 proto-google-cloud-asset-v1p5beta1 PROTO library for proto-google-cloud-asset-v1p4beta1 com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/proto-google-cloud-asset-v1p7beta1/pom.xml b/proto-google-cloud-asset-v1p7beta1/pom.xml index ff32eaa4a..9d9d4d42b 100644 --- a/proto-google-cloud-asset-v1p7beta1/pom.xml +++ b/proto-google-cloud-asset-v1p7beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1p7beta1 - 3.1.0 + 3.2.0 proto-google-cloud-asset-v1p7beta1 Proto library for google-cloud-asset com.google.cloud google-cloud-asset-parent - 3.1.0 + 3.2.0 diff --git a/renovate.json b/renovate.json index ad69e0422..513bba4a2 100644 --- a/renovate.json +++ b/renovate.json @@ -50,7 +50,8 @@ "^junit:junit", "^com.google.truth:truth", "^org.mockito:mockito-core", - "^org.objenesis:objenesis" + "^org.objenesis:objenesis", + "^com.google.cloud:google-cloud-conformance-tests" ], "semanticCommitType": "test", "semanticCommitScope": "deps" diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index eb237df8d..25f053281 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,25 +29,25 @@ com.google.cloud google-cloud-asset - 3.0.1 + 3.1.0 com.google.cloud google-cloud-core - 2.1.1 + 2.1.2 com.google.cloud google-cloud-storage - 2.0.2 + 2.1.0 test com.google.cloud google-cloud-bigquery - 2.1.2 + 2.1.6 test @@ -59,7 +59,7 @@ com.google.cloud google-cloud-resourcemanager - 1.0.3 + 1.0.4 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 7340205f9..c0e645563 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,25 +28,25 @@ com.google.cloud google-cloud-asset - 3.1.0 + 3.2.0 com.google.cloud google-cloud-core - 2.1.1 + 2.1.2 com.google.cloud google-cloud-storage - 2.0.2 + 2.1.0 test com.google.cloud google-cloud-bigquery - 2.1.2 + 2.1.6 test @@ -58,7 +58,7 @@ com.google.cloud google-cloud-resourcemanager - 1.0.3 + 1.0.4 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index c3707e6ab..3accb3939 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 21.0.0 + 22.0.0 pom import diff --git a/versions.txt b/versions.txt index e04e8d8ce..e69626d84 100644 --- a/versions.txt +++ b/versions.txt @@ -1,16 +1,16 @@ # Format: # module:released-version:current-version -google-cloud-asset:3.1.0:3.1.0 -grpc-google-cloud-asset-v1:3.1.0:3.1.0 -grpc-google-cloud-asset-v1p1beta1:0.101.0:0.101.0 -grpc-google-cloud-asset-v1p2beta1:0.101.0:0.101.0 -grpc-google-cloud-asset-v1p4beta1:0.101.0:0.101.0 -grpc-google-cloud-asset-v1p5beta1:0.101.0:0.101.0 -grpc-google-cloud-asset-v1p7beta1:3.1.0:3.1.0 -proto-google-cloud-asset-v1:3.1.0:3.1.0 -proto-google-cloud-asset-v1p1beta1:0.101.0:0.101.0 -proto-google-cloud-asset-v1p2beta1:0.101.0:0.101.0 -proto-google-cloud-asset-v1p4beta1:0.101.0:0.101.0 -proto-google-cloud-asset-v1p5beta1:0.101.0:0.101.0 -proto-google-cloud-asset-v1p7beta1:3.1.0:3.1.0 +google-cloud-asset:3.2.0:3.2.0 +grpc-google-cloud-asset-v1:3.2.0:3.2.0 +grpc-google-cloud-asset-v1p1beta1:0.102.0:0.102.0 +grpc-google-cloud-asset-v1p2beta1:0.102.0:0.102.0 +grpc-google-cloud-asset-v1p4beta1:0.102.0:0.102.0 +grpc-google-cloud-asset-v1p5beta1:0.102.0:0.102.0 +grpc-google-cloud-asset-v1p7beta1:3.2.0:3.2.0 +proto-google-cloud-asset-v1:3.2.0:3.2.0 +proto-google-cloud-asset-v1p1beta1:0.102.0:0.102.0 +proto-google-cloud-asset-v1p2beta1:0.102.0:0.102.0 +proto-google-cloud-asset-v1p4beta1:0.102.0:0.102.0 +proto-google-cloud-asset-v1p5beta1:0.102.0:0.102.0 +proto-google-cloud-asset-v1p7beta1:3.2.0:3.2.0