This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
+ *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String parent = "";
+ * ListAssetsRequest request = ListAssetsRequest.newBuilder()
+ * .setParent(parent)
+ * .build();
+ * ApiFuture<ListAssetsPagedResponse> future = assetServiceClient.listAssetsPagedCallable().futureCall(request);
+ * // Do something
+ * for (Asset element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ *
+ * Note: close() needs to be called on the assetServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of AssetServiceSettings to + * create(). For example: + * + *
To customize credentials: + * + *
+ *
+ * AssetServiceSettings assetServiceSettings =
+ * AssetServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * AssetServiceClient assetServiceClient =
+ * AssetServiceClient.create(assetServiceSettings);
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ *
+ * AssetServiceSettings assetServiceSettings =
+ * AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AssetServiceClient assetServiceClient =
+ * AssetServiceClient.create(assetServiceSettings);
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class AssetServiceClient implements BackgroundResource {
+ private final AssetServiceSettings settings;
+ private final AssetServiceStub stub;
+
+ /** Constructs an instance of AssetServiceClient with default settings. */
+ public static final AssetServiceClient create() throws IOException {
+ return create(AssetServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of AssetServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException {
+ return new AssetServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer to use AssetServiceSettings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final AssetServiceClient create(AssetServiceStub stub) {
+ return new AssetServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of AssetServiceClient, using the given settings. This is protected so
+ * that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected AssetServiceClient(AssetServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected AssetServiceClient(AssetServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final AssetServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public AssetServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists assets with time and resource types and returns paged results in response.
+ *
+ * Sample code: + * + *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String parent = "";
+ * ListAssetsRequest request = ListAssetsRequest.newBuilder()
+ * .setParent(parent)
+ * .build();
+ * for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) {
+ return listAssetsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists assets with time and resource types and returns paged results in response.
+ *
+ * Sample code: + * + *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String parent = "";
+ * ListAssetsRequest request = ListAssetsRequest.newBuilder()
+ * .setParent(parent)
+ * .build();
+ * ApiFuture<ListAssetsPagedResponse> future = assetServiceClient.listAssetsPagedCallable().futureCall(request);
+ * // Do something
+ * for (Asset element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String parent = "";
+ * ListAssetsRequest request = ListAssetsRequest.newBuilder()
+ * .setParent(parent)
+ * .build();
+ * while (true) {
+ * ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request);
+ * for (Asset element : response.getAssetsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of listAssetsPagedCallable to 30 seconds: + * + *
+ *
+ * AssetServiceSettings.Builder assetServiceSettingsBuilder =
+ * AssetServiceSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ * .listAssetsSettings()
+ * .setRetrySettings(
+ * assetServiceSettingsBuilder.listAssetsSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class AssetServiceSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ================== AssetServiceClient ==================
+ *
+ * Service Description: Asset service definition.
+ *
+ * Sample for AssetServiceClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public abstract class AssetServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of listAssetsPagedCallable to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator")
+@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory {
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public class GrpcAssetServiceStub extends AssetServiceStub {
+
+ private static final MethodDescriptor
+ *
+ */
+@Generated("by gapic-generator")
+package com.google.cloud.asset.v1p5beta1;
+
+import javax.annotation.Generated;
diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java
new file mode 100644
index 000000000..8fc2992a7
--- /dev/null
+++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+package com.google.cloud.asset.v1p5beta1.stub;
+
+import static com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.asset.v1p5beta1.ListAssetsRequest;
+import com.google.cloud.asset.v1p5beta1.ListAssetsResponse;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+/**
+ * Base stub class for Cloud Asset API.
+ *
+ *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String parent = "";
+ * ListAssetsRequest request = ListAssetsRequest.newBuilder()
+ * .setParent(parent)
+ * .build();
+ * ListAssetsPagedResponse response = assetServiceClient.listAssetsPagedCallable(request);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class AssetServiceStubSettings extends StubSettings
+ * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
+ * AssetServiceStubSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ * .listAssetsSettings()
+ * .setRetrySettings(
+ * assetServiceSettingsBuilder.listAssetsSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ *
+ *
+ * Cloud asset. This includes all Google Cloud Platform resources, + * Cloud IAM policies, and other non-GCP assets. + *+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.Asset} + */ +public final class Asset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.Asset) + AssetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Asset.newBuilder() to construct. + private Asset(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Asset() { + name_ = ""; + assetType_ = ""; + orgPolicy_ = java.util.Collections.emptyList(); + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Asset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Asset( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: + { + com.google.cloud.asset.v1p5beta1.Resource.Builder subBuilder = null; + if (resource_ != null) { + subBuilder = resource_.toBuilder(); + } + resource_ = + input.readMessage( + com.google.cloud.asset.v1p5beta1.Resource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resource_); + resource_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.iam.v1.Policy.Builder subBuilder = null; + if (iamPolicy_ != null) { + subBuilder = iamPolicy_.toBuilder(); + } + iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(iamPolicy_); + iamPolicy_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = new java.util.ArrayList
+ * The full name of the asset. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ 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();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full name of the asset. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ASSET_TYPE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object assetType_;
+ /**
+ *
+ *
+ * + * Type of the asset. Example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Type of the asset. Example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @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 RESOURCE_FIELD_NUMBER = 3;
+ private com.google.cloud.asset.v1p5beta1.Resource resource_;
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ *
+ * @return Whether the resource field is set.
+ */
+ @java.lang.Override
+ public boolean hasResource() {
+ return resource_ != null;
+ }
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ *
+ * @return The resource.
+ */
+ @java.lang.Override
+ public com.google.cloud.asset.v1p5beta1.Resource getResource() {
+ return resource_ == null
+ ? com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance()
+ : resource_;
+ }
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ */
+ @java.lang.Override
+ public com.google.cloud.asset.v1p5beta1.ResourceOrBuilder getResourceOrBuilder() {
+ return getResource();
+ }
+
+ public static final int IAM_POLICY_FIELD_NUMBER = 4;
+ private com.google.iam.v1.Policy iamPolicy_;
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ *
+ * @return Whether the iamPolicy field is set.
+ */
+ @java.lang.Override
+ public boolean hasIamPolicy() {
+ return iamPolicy_ != null;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ *
+ * @return The iamPolicy.
+ */
+ @java.lang.Override
+ public com.google.iam.v1.Policy getIamPolicy() {
+ return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ */
+ @java.lang.Override
+ public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() {
+ return getIamPolicy();
+ }
+
+ public static final int ORG_POLICY_FIELD_NUMBER = 6;
+ private java.util.List+ * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ @java.lang.Override
+ public java.util.List+ * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.orgpolicy.v1.PolicyOrBuilder>
+ getOrgPolicyOrBuilderList() {
+ return orgPolicy_;
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ @java.lang.Override
+ public int getOrgPolicyCount() {
+ return orgPolicy_.size();
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ @java.lang.Override
+ public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) {
+ return orgPolicy_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ @java.lang.Override
+ public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder(int index) {
+ return orgPolicy_.get(index);
+ }
+
+ public static final int ACCESS_POLICY_FIELD_NUMBER = 7;
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
+ *
+ * @return Whether the accessPolicy field is set.
+ */
+ @java.lang.Override
+ public boolean hasAccessPolicy() {
+ return accessContextPolicyCase_ == 7;
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
+ *
+ * @return The accessPolicy.
+ */
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() {
+ if (accessContextPolicyCase_ == 7) {
+ return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance();
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
*/
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder
+ getAccessPolicyOrBuilder() {
+ if (accessContextPolicyCase_ == 7) {
+ return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance();
+ }
+
+ public static final int ACCESS_LEVEL_FIELD_NUMBER = 8;
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
+ *
+ * @return Whether the accessLevel field is set.
+ */
+ @java.lang.Override
+ public boolean hasAccessLevel() {
+ return accessContextPolicyCase_ == 8;
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
+ *
+ * @return The accessLevel.
+ */
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() {
+ if (accessContextPolicyCase_ == 8) {
+ return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance();
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
*/
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder
+ getAccessLevelOrBuilder() {
+ if (accessContextPolicyCase_ == 8) {
+ return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance();
+ }
+
+ public static final int SERVICE_PERIMETER_FIELD_NUMBER = 9;
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ *
+ * @return Whether the servicePerimeter field is set.
+ */
+ @java.lang.Override
+ public boolean hasServicePerimeter() {
+ return accessContextPolicyCase_ == 9;
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ *
+ * @return The servicePerimeter.
+ */
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() {
+ if (accessContextPolicyCase_ == 9) {
+ return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance();
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ */
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder
+ getServicePerimeterOrBuilder() {
+ if (accessContextPolicyCase_ == 9) {
+ return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance();
+ }
+
+ public static final int ANCESTORS_FIELD_NUMBER = 10;
+ private com.google.protobuf.LazyStringList ancestors_;
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @return A list containing the ancestors.
+ */
+ public com.google.protobuf.ProtocolStringList getAncestorsList() {
+ return ancestors_;
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @return The count of ancestors.
+ */
+ public int getAncestorsCount() {
+ return ancestors_.size();
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @param index The index of the element to return.
+ * @return The ancestors at the given index.
+ */
+ public java.lang.String getAncestors(int index) {
+ return ancestors_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the ancestors at the given index.
+ */
+ public com.google.protobuf.ByteString getAncestorsBytes(int index) {
+ return ancestors_.getByteString(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 {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!getAssetTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_);
+ }
+ if (resource_ != null) {
+ output.writeMessage(3, getResource());
+ }
+ if (iamPolicy_ != null) {
+ output.writeMessage(4, getIamPolicy());
+ }
+ for (int i = 0; i < orgPolicy_.size(); i++) {
+ output.writeMessage(6, orgPolicy_.get(i));
+ }
+ if (accessContextPolicyCase_ == 7) {
+ output.writeMessage(
+ 7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_);
+ }
+ if (accessContextPolicyCase_ == 8) {
+ output.writeMessage(
+ 8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_);
+ }
+ if (accessContextPolicyCase_ == 9) {
+ output.writeMessage(
+ 9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_);
+ }
+ for (int i = 0; i < ancestors_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ancestors_.getRaw(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (!getAssetTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_);
+ }
+ if (resource_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getResource());
+ }
+ if (iamPolicy_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getIamPolicy());
+ }
+ for (int i = 0; i < orgPolicy_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, orgPolicy_.get(i));
+ }
+ if (accessContextPolicyCase_ == 7) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_);
+ }
+ if (accessContextPolicyCase_ == 8) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_);
+ }
+ if (accessContextPolicyCase_ == 9) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 9,
+ (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < ancestors_.size(); i++) {
+ dataSize += computeStringSizeNoTag(ancestors_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getAncestorsList().size();
+ }
+ 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.v1p5beta1.Asset)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p5beta1.Asset other = (com.google.cloud.asset.v1p5beta1.Asset) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getAssetType().equals(other.getAssetType())) return false;
+ if (hasResource() != other.hasResource()) return false;
+ if (hasResource()) {
+ if (!getResource().equals(other.getResource())) return false;
+ }
+ if (hasIamPolicy() != other.hasIamPolicy()) return false;
+ if (hasIamPolicy()) {
+ if (!getIamPolicy().equals(other.getIamPolicy())) return false;
+ }
+ if (!getOrgPolicyList().equals(other.getOrgPolicyList())) return false;
+ if (!getAncestorsList().equals(other.getAncestorsList())) return false;
+ if (!getAccessContextPolicyCase().equals(other.getAccessContextPolicyCase())) return false;
+ switch (accessContextPolicyCase_) {
+ case 7:
+ if (!getAccessPolicy().equals(other.getAccessPolicy())) return false;
+ break;
+ case 8:
+ if (!getAccessLevel().equals(other.getAccessLevel())) return false;
+ break;
+ case 9:
+ if (!getServicePerimeter().equals(other.getServicePerimeter())) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getAssetType().hashCode();
+ if (hasResource()) {
+ hash = (37 * hash) + RESOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getResource().hashCode();
+ }
+ if (hasIamPolicy()) {
+ hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER;
+ hash = (53 * hash) + getIamPolicy().hashCode();
+ }
+ if (getOrgPolicyCount() > 0) {
+ hash = (37 * hash) + ORG_POLICY_FIELD_NUMBER;
+ hash = (53 * hash) + getOrgPolicyList().hashCode();
+ }
+ if (getAncestorsCount() > 0) {
+ hash = (37 * hash) + ANCESTORS_FIELD_NUMBER;
+ hash = (53 * hash) + getAncestorsList().hashCode();
+ }
+ switch (accessContextPolicyCase_) {
+ case 7:
+ hash = (37 * hash) + ACCESS_POLICY_FIELD_NUMBER;
+ hash = (53 * hash) + getAccessPolicy().hashCode();
+ break;
+ case 8:
+ hash = (37 * hash) + ACCESS_LEVEL_FIELD_NUMBER;
+ hash = (53 * hash) + getAccessLevel().hashCode();
+ break;
+ case 9:
+ hash = (37 * hash) + SERVICE_PERIMETER_FIELD_NUMBER;
+ hash = (53 * hash) + getServicePerimeter().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Asset parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Asset 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.v1p5beta1.Asset parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Asset 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.v1p5beta1.Asset parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Asset parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Asset parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Asset 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.v1p5beta1.Asset parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Asset 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.v1p5beta1.Asset parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Asset 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.v1p5beta1.Asset 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;
+ }
+ /**
+ *
+ *
+ * + * Cloud asset. This includes all Google Cloud Platform resources, + * Cloud IAM policies, and other non-GCP assets. + *+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.Asset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The full name of the asset. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full name of the asset. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full name of the asset. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full name of the asset. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full name of the asset. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object assetType_ = "";
+ /**
+ *
+ *
+ * + * Type of the asset. Example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Type of the asset. Example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Type of the asset. Example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @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;
+ }
+ /**
+ *
+ *
+ * + * Type of the asset. Example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAssetType() {
+
+ assetType_ = getDefaultInstance().getAssetType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Type of the asset. Example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @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 com.google.cloud.asset.v1p5beta1.Resource resource_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.asset.v1p5beta1.Resource,
+ com.google.cloud.asset.v1p5beta1.Resource.Builder,
+ com.google.cloud.asset.v1p5beta1.ResourceOrBuilder>
+ resourceBuilder_;
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ *
+ * @return Whether the resource field is set.
+ */
+ public boolean hasResource() {
+ return resourceBuilder_ != null || resource_ != null;
+ }
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ *
+ * @return The resource.
+ */
+ public com.google.cloud.asset.v1p5beta1.Resource getResource() {
+ if (resourceBuilder_ == null) {
+ return resource_ == null
+ ? com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance()
+ : resource_;
+ } else {
+ return resourceBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ */
+ public Builder setResource(com.google.cloud.asset.v1p5beta1.Resource value) {
+ if (resourceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ resource_ = value;
+ onChanged();
+ } else {
+ resourceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ */
+ public Builder setResource(com.google.cloud.asset.v1p5beta1.Resource.Builder builderForValue) {
+ if (resourceBuilder_ == null) {
+ resource_ = builderForValue.build();
+ onChanged();
+ } else {
+ resourceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ */
+ public Builder mergeResource(com.google.cloud.asset.v1p5beta1.Resource value) {
+ if (resourceBuilder_ == null) {
+ if (resource_ != null) {
+ resource_ =
+ com.google.cloud.asset.v1p5beta1.Resource.newBuilder(resource_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ resource_ = value;
+ }
+ onChanged();
+ } else {
+ resourceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ */
+ public Builder clearResource() {
+ if (resourceBuilder_ == null) {
+ resource_ = null;
+ onChanged();
+ } else {
+ resource_ = null;
+ resourceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ */
+ public com.google.cloud.asset.v1p5beta1.Resource.Builder getResourceBuilder() {
+
+ onChanged();
+ return getResourceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ */
+ public com.google.cloud.asset.v1p5beta1.ResourceOrBuilder getResourceOrBuilder() {
+ if (resourceBuilder_ != null) {
+ return resourceBuilder_.getMessageOrBuilder();
+ } else {
+ return resource_ == null
+ ? com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance()
+ : resource_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.asset.v1p5beta1.Resource,
+ com.google.cloud.asset.v1p5beta1.Resource.Builder,
+ com.google.cloud.asset.v1p5beta1.ResourceOrBuilder>
+ getResourceFieldBuilder() {
+ if (resourceBuilder_ == null) {
+ resourceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.asset.v1p5beta1.Resource,
+ com.google.cloud.asset.v1p5beta1.Resource.Builder,
+ com.google.cloud.asset.v1p5beta1.ResourceOrBuilder>(
+ getResource(), getParentForChildren(), isClean());
+ resource_ = null;
+ }
+ return resourceBuilder_;
+ }
+
+ private com.google.iam.v1.Policy iamPolicy_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.iam.v1.Policy,
+ com.google.iam.v1.Policy.Builder,
+ com.google.iam.v1.PolicyOrBuilder>
+ iamPolicyBuilder_;
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ *
+ * @return Whether the iamPolicy field is set.
+ */
+ public boolean hasIamPolicy() {
+ return iamPolicyBuilder_ != null || iamPolicy_ != null;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ *
+ * @return The iamPolicy.
+ */
+ public com.google.iam.v1.Policy getIamPolicy() {
+ if (iamPolicyBuilder_ == null) {
+ return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_;
+ } else {
+ return iamPolicyBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ */
+ public Builder setIamPolicy(com.google.iam.v1.Policy value) {
+ if (iamPolicyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ iamPolicy_ = value;
+ onChanged();
+ } else {
+ iamPolicyBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ */
+ public Builder setIamPolicy(com.google.iam.v1.Policy.Builder builderForValue) {
+ if (iamPolicyBuilder_ == null) {
+ iamPolicy_ = builderForValue.build();
+ onChanged();
+ } else {
+ iamPolicyBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ */
+ public Builder mergeIamPolicy(com.google.iam.v1.Policy value) {
+ if (iamPolicyBuilder_ == null) {
+ if (iamPolicy_ != null) {
+ iamPolicy_ =
+ com.google.iam.v1.Policy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial();
+ } else {
+ iamPolicy_ = value;
+ }
+ onChanged();
+ } else {
+ iamPolicyBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ */
+ public Builder clearIamPolicy() {
+ if (iamPolicyBuilder_ == null) {
+ iamPolicy_ = null;
+ onChanged();
+ } else {
+ iamPolicy_ = null;
+ iamPolicyBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ */
+ public com.google.iam.v1.Policy.Builder getIamPolicyBuilder() {
+
+ onChanged();
+ return getIamPolicyFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ */
+ public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() {
+ if (iamPolicyBuilder_ != null) {
+ return iamPolicyBuilder_.getMessageOrBuilder();
+ } else {
+ return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.iam.v1.Policy,
+ com.google.iam.v1.Policy.Builder,
+ com.google.iam.v1.PolicyOrBuilder>
+ getIamPolicyFieldBuilder() {
+ if (iamPolicyBuilder_ == null) {
+ iamPolicyBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.iam.v1.Policy,
+ com.google.iam.v1.Policy.Builder,
+ com.google.iam.v1.PolicyOrBuilder>(
+ getIamPolicy(), getParentForChildren(), isClean());
+ iamPolicy_ = null;
+ }
+ return iamPolicyBuilder_;
+ }
+
+ private java.util.List+ * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public java.util.List+ * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public int getOrgPolicyCount() {
+ if (orgPolicyBuilder_ == null) {
+ return orgPolicy_.size();
+ } else {
+ return orgPolicyBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) {
+ if (orgPolicyBuilder_ == null) {
+ return orgPolicy_.get(index);
+ } else {
+ return orgPolicyBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public Builder setOrgPolicy(int index, com.google.cloud.orgpolicy.v1.Policy value) {
+ if (orgPolicyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOrgPolicyIsMutable();
+ orgPolicy_.set(index, value);
+ onChanged();
+ } else {
+ orgPolicyBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public Builder setOrgPolicy(
+ int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) {
+ if (orgPolicyBuilder_ == null) {
+ ensureOrgPolicyIsMutable();
+ orgPolicy_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ orgPolicyBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public Builder addOrgPolicy(com.google.cloud.orgpolicy.v1.Policy value) {
+ if (orgPolicyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOrgPolicyIsMutable();
+ orgPolicy_.add(value);
+ onChanged();
+ } else {
+ orgPolicyBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public Builder addOrgPolicy(int index, com.google.cloud.orgpolicy.v1.Policy value) {
+ if (orgPolicyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOrgPolicyIsMutable();
+ orgPolicy_.add(index, value);
+ onChanged();
+ } else {
+ orgPolicyBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public Builder addOrgPolicy(com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) {
+ if (orgPolicyBuilder_ == null) {
+ ensureOrgPolicyIsMutable();
+ orgPolicy_.add(builderForValue.build());
+ onChanged();
+ } else {
+ orgPolicyBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public Builder addOrgPolicy(
+ int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) {
+ if (orgPolicyBuilder_ == null) {
+ ensureOrgPolicyIsMutable();
+ orgPolicy_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ orgPolicyBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public Builder addAllOrgPolicy(
+ java.lang.Iterable extends com.google.cloud.orgpolicy.v1.Policy> values) {
+ if (orgPolicyBuilder_ == null) {
+ ensureOrgPolicyIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, orgPolicy_);
+ onChanged();
+ } else {
+ orgPolicyBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public Builder clearOrgPolicy() {
+ if (orgPolicyBuilder_ == null) {
+ orgPolicy_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ orgPolicyBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public Builder removeOrgPolicy(int index) {
+ if (orgPolicyBuilder_ == null) {
+ ensureOrgPolicyIsMutable();
+ orgPolicy_.remove(index);
+ onChanged();
+ } else {
+ orgPolicyBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public com.google.cloud.orgpolicy.v1.Policy.Builder getOrgPolicyBuilder(int index) {
+ return getOrgPolicyFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder(int index) {
+ if (orgPolicyBuilder_ == null) {
+ return orgPolicy_.get(index);
+ } else {
+ return orgPolicyBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public java.util.List extends com.google.cloud.orgpolicy.v1.PolicyOrBuilder>
+ getOrgPolicyOrBuilderList() {
+ if (orgPolicyBuilder_ != null) {
+ return orgPolicyBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(orgPolicy_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder() {
+ return getOrgPolicyFieldBuilder()
+ .addBuilder(com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder(int index) {
+ return getOrgPolicyFieldBuilder()
+ .addBuilder(index, com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ public java.util.List.google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
+ *
+ * @return Whether the accessPolicy field is set.
+ */
+ @java.lang.Override
+ public boolean hasAccessPolicy() {
+ return accessContextPolicyCase_ == 7;
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
+ *
+ * @return The accessPolicy.
+ */
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() {
+ if (accessPolicyBuilder_ == null) {
+ if (accessContextPolicyCase_ == 7) {
+ return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance();
+ } else {
+ if (accessContextPolicyCase_ == 7) {
+ return accessPolicyBuilder_.getMessage();
+ }
+ return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance();
+ }
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
*/
+ public Builder setAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) {
+ if (accessPolicyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ accessContextPolicy_ = value;
+ onChanged();
+ } else {
+ accessPolicyBuilder_.setMessage(value);
+ }
+ accessContextPolicyCase_ = 7;
+ return this;
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
*/
+ public Builder setAccessPolicy(
+ com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder builderForValue) {
+ if (accessPolicyBuilder_ == null) {
+ accessContextPolicy_ = builderForValue.build();
+ onChanged();
+ } else {
+ accessPolicyBuilder_.setMessage(builderForValue.build());
+ }
+ accessContextPolicyCase_ = 7;
+ return this;
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
*/
+ public Builder mergeAccessPolicy(
+ com.google.identity.accesscontextmanager.v1.AccessPolicy value) {
+ if (accessPolicyBuilder_ == null) {
+ if (accessContextPolicyCase_ == 7
+ && accessContextPolicy_
+ != com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance()) {
+ accessContextPolicy_ =
+ com.google.identity.accesscontextmanager.v1.AccessPolicy.newBuilder(
+ (com.google.identity.accesscontextmanager.v1.AccessPolicy)
+ accessContextPolicy_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ accessContextPolicy_ = value;
+ }
+ onChanged();
+ } else {
+ if (accessContextPolicyCase_ == 7) {
+ accessPolicyBuilder_.mergeFrom(value);
+ }
+ accessPolicyBuilder_.setMessage(value);
+ }
+ accessContextPolicyCase_ = 7;
+ return this;
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
*/
+ public Builder clearAccessPolicy() {
+ if (accessPolicyBuilder_ == null) {
+ if (accessContextPolicyCase_ == 7) {
+ accessContextPolicyCase_ = 0;
+ accessContextPolicy_ = null;
+ onChanged();
+ }
+ } else {
+ if (accessContextPolicyCase_ == 7) {
+ accessContextPolicyCase_ = 0;
+ accessContextPolicy_ = null;
+ }
+ accessPolicyBuilder_.clear();
+ }
+ return this;
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
*/
+ public com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder
+ getAccessPolicyBuilder() {
+ return getAccessPolicyFieldBuilder().getBuilder();
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
*/
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder
+ getAccessPolicyOrBuilder() {
+ if ((accessContextPolicyCase_ == 7) && (accessPolicyBuilder_ != null)) {
+ return accessPolicyBuilder_.getMessageOrBuilder();
+ } else {
+ if (accessContextPolicyCase_ == 7) {
+ return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance();
+ }
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
*/
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.identity.accesscontextmanager.v1.AccessPolicy,
+ com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder,
+ com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder>
+ getAccessPolicyFieldBuilder() {
+ if (accessPolicyBuilder_ == null) {
+ if (!(accessContextPolicyCase_ == 7)) {
+ accessContextPolicy_ =
+ com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance();
+ }
+ accessPolicyBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.identity.accesscontextmanager.v1.AccessPolicy,
+ com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder,
+ com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder>(
+ (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_,
+ getParentForChildren(),
+ isClean());
+ accessContextPolicy_ = null;
+ }
+ accessContextPolicyCase_ = 7;
+ onChanged();
+ ;
+ return accessPolicyBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.identity.accesscontextmanager.v1.AccessLevel,
+ com.google.identity.accesscontextmanager.v1.AccessLevel.Builder,
+ com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder>
+ accessLevelBuilder_;
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
+ *
+ * @return Whether the accessLevel field is set.
+ */
+ @java.lang.Override
+ public boolean hasAccessLevel() {
+ return accessContextPolicyCase_ == 8;
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
+ *
+ * @return The accessLevel.
+ */
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() {
+ if (accessLevelBuilder_ == null) {
+ if (accessContextPolicyCase_ == 8) {
+ return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance();
+ } else {
+ if (accessContextPolicyCase_ == 8) {
+ return accessLevelBuilder_.getMessage();
+ }
+ return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance();
+ }
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
*/
+ public Builder setAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) {
+ if (accessLevelBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ accessContextPolicy_ = value;
+ onChanged();
+ } else {
+ accessLevelBuilder_.setMessage(value);
+ }
+ accessContextPolicyCase_ = 8;
+ return this;
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
*/
+ public Builder setAccessLevel(
+ com.google.identity.accesscontextmanager.v1.AccessLevel.Builder builderForValue) {
+ if (accessLevelBuilder_ == null) {
+ accessContextPolicy_ = builderForValue.build();
+ onChanged();
+ } else {
+ accessLevelBuilder_.setMessage(builderForValue.build());
+ }
+ accessContextPolicyCase_ = 8;
+ return this;
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
*/
+ public Builder mergeAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) {
+ if (accessLevelBuilder_ == null) {
+ if (accessContextPolicyCase_ == 8
+ && accessContextPolicy_
+ != com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance()) {
+ accessContextPolicy_ =
+ com.google.identity.accesscontextmanager.v1.AccessLevel.newBuilder(
+ (com.google.identity.accesscontextmanager.v1.AccessLevel)
+ accessContextPolicy_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ accessContextPolicy_ = value;
+ }
+ onChanged();
+ } else {
+ if (accessContextPolicyCase_ == 8) {
+ accessLevelBuilder_.mergeFrom(value);
+ }
+ accessLevelBuilder_.setMessage(value);
+ }
+ accessContextPolicyCase_ = 8;
+ return this;
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
*/
+ public Builder clearAccessLevel() {
+ if (accessLevelBuilder_ == null) {
+ if (accessContextPolicyCase_ == 8) {
+ accessContextPolicyCase_ = 0;
+ accessContextPolicy_ = null;
+ onChanged();
+ }
+ } else {
+ if (accessContextPolicyCase_ == 8) {
+ accessContextPolicyCase_ = 0;
+ accessContextPolicy_ = null;
+ }
+ accessLevelBuilder_.clear();
+ }
+ return this;
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
*/
+ public com.google.identity.accesscontextmanager.v1.AccessLevel.Builder getAccessLevelBuilder() {
+ return getAccessLevelFieldBuilder().getBuilder();
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
*/
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder
+ getAccessLevelOrBuilder() {
+ if ((accessContextPolicyCase_ == 8) && (accessLevelBuilder_ != null)) {
+ return accessLevelBuilder_.getMessageOrBuilder();
+ } else {
+ if (accessContextPolicyCase_ == 8) {
+ return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance();
+ }
+ }
+ /** .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
*/
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.identity.accesscontextmanager.v1.AccessLevel,
+ com.google.identity.accesscontextmanager.v1.AccessLevel.Builder,
+ com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder>
+ getAccessLevelFieldBuilder() {
+ if (accessLevelBuilder_ == null) {
+ if (!(accessContextPolicyCase_ == 8)) {
+ accessContextPolicy_ =
+ com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance();
+ }
+ accessLevelBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.identity.accesscontextmanager.v1.AccessLevel,
+ com.google.identity.accesscontextmanager.v1.AccessLevel.Builder,
+ com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder>(
+ (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_,
+ getParentForChildren(),
+ isClean());
+ accessContextPolicy_ = null;
+ }
+ accessContextPolicyCase_ = 8;
+ onChanged();
+ ;
+ return accessLevelBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter,
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder,
+ com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder>
+ servicePerimeterBuilder_;
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ *
+ * @return Whether the servicePerimeter field is set.
+ */
+ @java.lang.Override
+ public boolean hasServicePerimeter() {
+ return accessContextPolicyCase_ == 9;
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ *
+ * @return The servicePerimeter.
+ */
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() {
+ if (servicePerimeterBuilder_ == null) {
+ if (accessContextPolicyCase_ == 9) {
+ return (com.google.identity.accesscontextmanager.v1.ServicePerimeter)
+ accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance();
+ } else {
+ if (accessContextPolicyCase_ == 9) {
+ return servicePerimeterBuilder_.getMessage();
+ }
+ return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance();
+ }
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ */
+ public Builder setServicePerimeter(
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter value) {
+ if (servicePerimeterBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ accessContextPolicy_ = value;
+ onChanged();
+ } else {
+ servicePerimeterBuilder_.setMessage(value);
+ }
+ accessContextPolicyCase_ = 9;
+ return this;
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ */
+ public Builder setServicePerimeter(
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder builderForValue) {
+ if (servicePerimeterBuilder_ == null) {
+ accessContextPolicy_ = builderForValue.build();
+ onChanged();
+ } else {
+ servicePerimeterBuilder_.setMessage(builderForValue.build());
+ }
+ accessContextPolicyCase_ = 9;
+ return this;
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ */
+ public Builder mergeServicePerimeter(
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter value) {
+ if (servicePerimeterBuilder_ == null) {
+ if (accessContextPolicyCase_ == 9
+ && accessContextPolicy_
+ != com.google.identity.accesscontextmanager.v1.ServicePerimeter
+ .getDefaultInstance()) {
+ accessContextPolicy_ =
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter.newBuilder(
+ (com.google.identity.accesscontextmanager.v1.ServicePerimeter)
+ accessContextPolicy_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ accessContextPolicy_ = value;
+ }
+ onChanged();
+ } else {
+ if (accessContextPolicyCase_ == 9) {
+ servicePerimeterBuilder_.mergeFrom(value);
+ }
+ servicePerimeterBuilder_.setMessage(value);
+ }
+ accessContextPolicyCase_ = 9;
+ return this;
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ */
+ public Builder clearServicePerimeter() {
+ if (servicePerimeterBuilder_ == null) {
+ if (accessContextPolicyCase_ == 9) {
+ accessContextPolicyCase_ = 0;
+ accessContextPolicy_ = null;
+ onChanged();
+ }
+ } else {
+ if (accessContextPolicyCase_ == 9) {
+ accessContextPolicyCase_ = 0;
+ accessContextPolicy_ = null;
+ }
+ servicePerimeterBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ */
+ public com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder
+ getServicePerimeterBuilder() {
+ return getServicePerimeterFieldBuilder().getBuilder();
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ */
+ @java.lang.Override
+ public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder
+ getServicePerimeterOrBuilder() {
+ if ((accessContextPolicyCase_ == 9) && (servicePerimeterBuilder_ != null)) {
+ return servicePerimeterBuilder_.getMessageOrBuilder();
+ } else {
+ if (accessContextPolicyCase_ == 9) {
+ return (com.google.identity.accesscontextmanager.v1.ServicePerimeter)
+ accessContextPolicy_;
+ }
+ return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance();
+ }
+ }
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter,
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder,
+ com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder>
+ getServicePerimeterFieldBuilder() {
+ if (servicePerimeterBuilder_ == null) {
+ if (!(accessContextPolicyCase_ == 9)) {
+ accessContextPolicy_ =
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance();
+ }
+ servicePerimeterBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter,
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder,
+ com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder>(
+ (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_,
+ getParentForChildren(),
+ isClean());
+ accessContextPolicy_ = null;
+ }
+ accessContextPolicyCase_ = 9;
+ onChanged();
+ ;
+ return servicePerimeterBuilder_;
+ }
+
+ private com.google.protobuf.LazyStringList ancestors_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureAncestorsIsMutable() {
+ if (!((bitField0_ & 0x00000002) != 0)) {
+ ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @return A list containing the ancestors.
+ */
+ public com.google.protobuf.ProtocolStringList getAncestorsList() {
+ return ancestors_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @return The count of ancestors.
+ */
+ public int getAncestorsCount() {
+ return ancestors_.size();
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @param index The index of the element to return.
+ * @return The ancestors at the given index.
+ */
+ public java.lang.String getAncestors(int index) {
+ return ancestors_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the ancestors at the given index.
+ */
+ public com.google.protobuf.ByteString getAncestorsBytes(int index) {
+ return ancestors_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @param index The index to set the value at.
+ * @param value The ancestors to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAncestors(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAncestorsIsMutable();
+ ancestors_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @param value The ancestors to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAncestors(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAncestorsIsMutable();
+ ancestors_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @param values The ancestors to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllAncestors(java.lang.Iterable+ * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAncestors() {
+ ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @param value The bytes of the ancestors to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAncestorsBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureAncestorsIsMutable();
+ ancestors_.add(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.v1p5beta1.Asset)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.Asset)
+ private static final com.google.cloud.asset.v1p5beta1.Asset DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.Asset();
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Asset getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The full name of the asset. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The full name of the asset. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * Type of the asset. Example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @return The assetType.
+ */
+ java.lang.String getAssetType();
+ /**
+ *
+ *
+ * + * Type of the asset. Example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @return The bytes for assetType.
+ */
+ com.google.protobuf.ByteString getAssetTypeBytes();
+
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ *
+ * @return Whether the resource field is set.
+ */
+ boolean hasResource();
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ *
+ * @return The resource.
+ */
+ com.google.cloud.asset.v1p5beta1.Resource getResource();
+ /**
+ *
+ *
+ * + * Representation of the resource. + *+ * + *
.google.cloud.asset.v1p5beta1.Resource resource = 3;
+ */
+ com.google.cloud.asset.v1p5beta1.ResourceOrBuilder getResourceOrBuilder();
+
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ *
+ * @return Whether the iamPolicy field is set.
+ */
+ boolean hasIamPolicy();
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ *
+ * @return The iamPolicy.
+ */
+ com.google.iam.v1.Policy getIamPolicy();
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy iam_policy = 4;
+ */
+ com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder();
+
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ java.util.List+ * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index);
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ int getOrgPolicyCount();
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ java.util.List extends com.google.cloud.orgpolicy.v1.PolicyOrBuilder>
+ getOrgPolicyOrBuilderList();
+ /**
+ *
+ *
+ * + * Representation of the Cloud Organization Policy set on an asset. For each + * asset, there could be multiple Organization policies with different + * constraints. + *+ * + *
repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6;
+ */
+ com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder(int index);
+
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
+ *
+ * @return Whether the accessPolicy field is set.
+ */
+ boolean hasAccessPolicy();
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
+ *
+ * @return The accessPolicy.
+ */
+ com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy();
+ /** .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
*/
+ com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder();
+
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
+ *
+ * @return Whether the accessLevel field is set.
+ */
+ boolean hasAccessLevel();
+ /**
+ * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
+ *
+ * @return The accessLevel.
+ */
+ com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel();
+ /** .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
*/
+ com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder();
+
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ *
+ * @return Whether the servicePerimeter field is set.
+ */
+ boolean hasServicePerimeter();
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ *
+ * @return The servicePerimeter.
+ */
+ com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter();
+ /**
+ * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
+ */
+ com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder
+ getServicePerimeterOrBuilder();
+
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @return A list containing the ancestors.
+ */
+ java.util.List+ * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @return The count of ancestors.
+ */
+ int getAncestorsCount();
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @param index The index of the element to return.
+ * @return The ancestors at the given index.
+ */
+ java.lang.String getAncestors(int index);
+ /**
+ *
+ *
+ * + * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + * represented as a list of relative resource names. Ancestry path starts with + * the closest CRM ancestor and ends at root. If the asset is a CRM + * project/folder/organization, this starts from the asset itself. + * Example: ["projects/123456789", "folders/5432", "organizations/1234"] + *+ * + *
repeated string ancestors = 10;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the ancestors at the given index.
+ */
+ com.google.protobuf.ByteString getAncestorsBytes(int index);
+
+ public com.google.cloud.asset.v1p5beta1.Asset.AccessContextPolicyCase
+ getAccessContextPolicyCase();
+}
diff --git a/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java
new file mode 100644
index 000000000..de33750c1
--- /dev/null
+++ b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java
@@ -0,0 +1,141 @@
+/*
+ * 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/v1p5beta1/assets.proto
+
+package com.google.cloud.asset.v1p5beta1;
+
+public final class AssetProto {
+ private AssetProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_asset_v1p5beta1_Asset_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n)google/cloud/asset/v1p5beta1/assets.pr"
+ + "oto\022\034google.cloud.asset.v1p5beta1\032\034googl"
+ + "e/api/annotations.proto\032\031google/api/reso"
+ + "urce.proto\032)google/cloud/orgpolicy/v1/or"
+ + "gpolicy.proto\032\032google/iam/v1/policy.prot"
+ + "o\032:google/identity/accesscontextmanager/"
+ + "v1/access_level.proto\032;google/identity/a"
+ + "ccesscontextmanager/v1/access_policy.pro"
+ + "to\032?google/identity/accesscontextmanager"
+ + "/v1/service_perimeter.proto\032\031google/prot"
+ + "obuf/any.proto\032\034google/protobuf/struct.p"
+ + "roto\032\037google/protobuf/timestamp.proto\"\220\004"
+ + "\n\005Asset\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001("
+ + "\t\0228\n\010resource\030\003 \001(\0132&.google.cloud.asset"
+ + ".v1p5beta1.Resource\022)\n\niam_policy\030\004 \001(\0132"
+ + "\025.google.iam.v1.Policy\0225\n\norg_policy\030\006 \003"
+ + "(\0132!.google.cloud.orgpolicy.v1.Policy\022N\n"
+ + "\raccess_policy\030\007 \001(\01325.google.identity.a"
+ + "ccesscontextmanager.v1.AccessPolicyH\000\022L\n"
+ + "\014access_level\030\010 \001(\01324.google.identity.ac"
+ + "cesscontextmanager.v1.AccessLevelH\000\022V\n\021s"
+ + "ervice_perimeter\030\t \001(\01329.google.identity"
+ + ".accesscontextmanager.v1.ServicePerimete"
+ + "rH\000\022\021\n\tancestors\030\n \003(\t:\'\352A$\n\037cloudasset."
+ + "googleapis.com/Asset\022\001*B\027\n\025access_contex"
+ + "t_policy\"\240\001\n\010Resource\022\017\n\007version\030\001 \001(\t\022\036"
+ + "\n\026discovery_document_uri\030\002 \001(\t\022\026\n\016discov"
+ + "ery_name\030\003 \001(\t\022\024\n\014resource_url\030\004 \001(\t\022\016\n\006"
+ + "parent\030\005 \001(\t\022%\n\004data\030\006 \001(\0132\027.google.prot"
+ + "obuf.StructB\264\001\n com.google.cloud.asset.v"
+ + "1p5beta1B\nAssetProtoP\001ZAgoogle.golang.or"
+ + "g/genproto/googleapis/cloud/asset/v1p5be"
+ + "ta1;asset\370\001\001\252\002\034Google.Cloud.Asset.V1p5Be"
+ + "ta1\312\002\034Google\\Cloud\\Asset\\V1p5beta1b\006prot"
+ + "o3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.AnnotationsProto.getDescriptor(),
+ com.google.api.ResourceProto.getDescriptor(),
+ com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(),
+ com.google.iam.v1.PolicyProto.getDescriptor(),
+ com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(),
+ com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(),
+ com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(),
+ com.google.protobuf.AnyProto.getDescriptor(),
+ com.google.protobuf.StructProto.getDescriptor(),
+ com.google.protobuf.TimestampProto.getDescriptor(),
+ });
+ internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_cloud_asset_v1p5beta1_Asset_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor,
+ new java.lang.String[] {
+ "Name",
+ "AssetType",
+ "Resource",
+ "IamPolicy",
+ "OrgPolicy",
+ "AccessPolicy",
+ "AccessLevel",
+ "ServicePerimeter",
+ "Ancestors",
+ "AccessContextPolicy",
+ });
+ internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor,
+ new java.lang.String[] {
+ "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data",
+ });
+ com.google.protobuf.ExtensionRegistry registry =
+ com.google.protobuf.ExtensionRegistry.newInstance();
+ registry.add(com.google.api.ResourceProto.resource);
+ com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
+ descriptor, registry);
+ com.google.api.AnnotationsProto.getDescriptor();
+ com.google.api.ResourceProto.getDescriptor();
+ com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor();
+ com.google.iam.v1.PolicyProto.getDescriptor();
+ com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor();
+ com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor();
+ com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor();
+ com.google.protobuf.AnyProto.getDescriptor();
+ com.google.protobuf.StructProto.getDescriptor();
+ com.google.protobuf.TimestampProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java
new file mode 100644
index 000000000..608622bdb
--- /dev/null
+++ b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java
@@ -0,0 +1,120 @@
+/*
+ * 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/v1p5beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p5beta1;
+
+public final class AssetServiceProto {
+ private AssetServiceProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n0google/cloud/asset/v1p5beta1/asset_ser"
+ + "vice.proto\022\034google.cloud.asset.v1p5beta1"
+ + "\032\034google/api/annotations.proto\032\027google/a"
+ + "pi/client.proto\032\037google/api/field_behavi"
+ + "or.proto\032)google/cloud/asset/v1p5beta1/a"
+ + "ssets.proto\032\037google/protobuf/timestamp.p"
+ + "roto\"\324\001\n\021ListAssetsRequest\022\023\n\006parent\030\001 \001"
+ + "(\tB\003\340A\002\022-\n\tread_time\030\002 \001(\0132\032.google.prot"
+ + "obuf.Timestamp\022\023\n\013asset_types\030\003 \003(\t\022?\n\014c"
+ + "ontent_type\030\004 \001(\0162).google.cloud.asset.v"
+ + "1p5beta1.ContentType\022\021\n\tpage_size\030\005 \001(\005\022"
+ + "\022\n\npage_token\030\006 \001(\t\"\221\001\n\022ListAssetsRespon"
+ + "se\022-\n\tread_time\030\001 \001(\0132\032.google.protobuf."
+ + "Timestamp\0223\n\006assets\030\002 \003(\0132#.google.cloud"
+ + ".asset.v1p5beta1.Asset\022\027\n\017next_page_toke"
+ + "n\030\003 \001(\t*l\n\013ContentType\022\034\n\030CONTENT_TYPE_U"
+ + "NSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_POLICY"
+ + "\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POLICY\020\0052\367\001"
+ + "\n\014AssetService\022\227\001\n\nListAssets\022/.google.c"
+ + "loud.asset.v1p5beta1.ListAssetsRequest\0320"
+ + ".google.cloud.asset.v1p5beta1.ListAssets"
+ + "Response\"&\202\323\344\223\002 \022\036/v1p5beta1/{parent=*/*"
+ + "}/assets\032M\312A\031cloudasset.googleapis.com\322A"
+ + ".https://www.googleapis.com/auth/cloud-p"
+ + "latformB\270\001\n com.google.cloud.asset.v1p5b"
+ + "eta1B\021AssetServiceProtoP\001ZAgoogle.golang"
+ + ".org/genproto/googleapis/cloud/asset/v1p"
+ + "5beta1;asset\252\002\034Google.Cloud.Asset.V1P5Be"
+ + "ta1\312\002\034Google\\Cloud\\Asset\\V1p5beta1b\006prot"
+ + "o3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.AnnotationsProto.getDescriptor(),
+ com.google.api.ClientProto.getDescriptor(),
+ com.google.api.FieldBehaviorProto.getDescriptor(),
+ com.google.cloud.asset.v1p5beta1.AssetProto.getDescriptor(),
+ com.google.protobuf.TimestampProto.getDescriptor(),
+ });
+ internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor,
+ new java.lang.String[] {
+ "Parent", "ReadTime", "AssetTypes", "ContentType", "PageSize", "PageToken",
+ });
+ internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor,
+ new java.lang.String[] {
+ "ReadTime", "Assets", "NextPageToken",
+ });
+ com.google.protobuf.ExtensionRegistry registry =
+ com.google.protobuf.ExtensionRegistry.newInstance();
+ registry.add(com.google.api.ClientProto.defaultHost);
+ registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
+ registry.add(com.google.api.AnnotationsProto.http);
+ registry.add(com.google.api.ClientProto.oauthScopes);
+ com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
+ descriptor, registry);
+ com.google.api.AnnotationsProto.getDescriptor();
+ com.google.api.ClientProto.getDescriptor();
+ com.google.api.FieldBehaviorProto.getDescriptor();
+ com.google.cloud.asset.v1p5beta1.AssetProto.getDescriptor();
+ com.google.protobuf.TimestampProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java
new file mode 100644
index 000000000..fed8739eb
--- /dev/null
+++ b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java
@@ -0,0 +1,220 @@
+/*
+ * 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/v1p5beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p5beta1;
+
+/**
+ *
+ *
+ * + * Asset content type. + *+ * + * Protobuf enum {@code google.cloud.asset.v1p5beta1.ContentType} + */ +public enum ContentType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Unspecified content type. + *+ * + *
CONTENT_TYPE_UNSPECIFIED = 0;
+ */
+ CONTENT_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Resource metadata. + *+ * + *
RESOURCE = 1;
+ */
+ RESOURCE(1),
+ /**
+ *
+ *
+ * + * The actual IAM policy set on a resource. + *+ * + *
IAM_POLICY = 2;
+ */
+ IAM_POLICY(2),
+ /**
+ *
+ *
+ * + * The Cloud Organization Policy set on an asset. + *+ * + *
ORG_POLICY = 4;
+ */
+ ORG_POLICY(4),
+ /**
+ *
+ *
+ * + * The Cloud Access context mananger Policy set on an asset. + *+ * + *
ACCESS_POLICY = 5;
+ */
+ ACCESS_POLICY(5),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Unspecified content type. + *+ * + *
CONTENT_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int CONTENT_TYPE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Resource metadata. + *+ * + *
RESOURCE = 1;
+ */
+ public static final int RESOURCE_VALUE = 1;
+ /**
+ *
+ *
+ * + * The actual IAM policy set on a resource. + *+ * + *
IAM_POLICY = 2;
+ */
+ public static final int IAM_POLICY_VALUE = 2;
+ /**
+ *
+ *
+ * + * The Cloud Organization Policy set on an asset. + *+ * + *
ORG_POLICY = 4;
+ */
+ public static final int ORG_POLICY_VALUE = 4;
+ /**
+ *
+ *
+ * + * The Cloud Access context mananger Policy set on an asset. + *+ * + *
ACCESS_POLICY = 5;
+ */
+ public static final int ACCESS_POLICY_VALUE = 5;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static ContentType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static ContentType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return CONTENT_TYPE_UNSPECIFIED;
+ case 1:
+ return RESOURCE;
+ case 2:
+ return IAM_POLICY;
+ case 4:
+ return ORG_POLICY;
+ case 5:
+ return ACCESS_POLICY;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * ListAssets request. + *+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsRequest} + */ +public final class ListAssetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.ListAssetsRequest) + ListAssetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAssetsRequest.newBuilder() to construct. + private ListAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ListAssetsRequest() { + parent_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + contentType_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAssetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAssetsRequest( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + contentType_ = rawValue; + break; + } + case 40: + { + pageSize_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p5beta1.ListAssetsRequest.class, + com.google.cloud.asset.v1p5beta1.ListAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-number]" (such as "projects/my-project-id"), or + * "projects/[project-id]" (such as "projects/12345"). + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ 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();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-number]" (such as "projects/my-project-id"), or + * "projects/[project-id]" (such as "projects/12345"). + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int READ_TIME_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp readTime_;
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ *
+ * @return Whether the readTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasReadTime() {
+ return readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ *
+ * @return The readTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getReadTime() {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ return getReadTime();
+ }
+
+ public static final int ASSET_TYPES_FIELD_NUMBER = 3;
+ private com.google.protobuf.LazyStringList assetTypes_;
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @return A list containing the assetTypes.
+ */
+ public com.google.protobuf.ProtocolStringList getAssetTypesList() {
+ return assetTypes_;
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @return The count of assetTypes.
+ */
+ public int getAssetTypesCount() {
+ return assetTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @param index The index of the element to return.
+ * @return The assetTypes at the given index.
+ */
+ public java.lang.String getAssetTypes(int index) {
+ return assetTypes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the assetTypes at the given index.
+ */
+ public com.google.protobuf.ByteString getAssetTypesBytes(int index) {
+ return assetTypes_.getByteString(index);
+ }
+
+ public static final int CONTENT_TYPE_FIELD_NUMBER = 4;
+ private int contentType_;
+ /**
+ *
+ *
+ * + * Asset content type. If not specified, no content but the asset name will + * be returned. + *+ * + *
.google.cloud.asset.v1p5beta1.ContentType content_type = 4;
+ *
+ * @return The enum numeric value on the wire for contentType.
+ */
+ @java.lang.Override
+ public int getContentTypeValue() {
+ return contentType_;
+ }
+ /**
+ *
+ *
+ * + * Asset content type. If not specified, no content but the asset name will + * be returned. + *+ * + *
.google.cloud.asset.v1p5beta1.ContentType content_type = 4;
+ *
+ * @return The contentType.
+ */
+ @java.lang.Override
+ public com.google.cloud.asset.v1p5beta1.ContentType getContentType() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.asset.v1p5beta1.ContentType result =
+ com.google.cloud.asset.v1p5beta1.ContentType.valueOf(contentType_);
+ return result == null ? com.google.cloud.asset.v1p5beta1.ContentType.UNRECOGNIZED : result;
+ }
+
+ public static final int PAGE_SIZE_FIELD_NUMBER = 5;
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * The maximum number of assets to be returned in a single response. Default + * is 100, minimum is 1, and maximum is 1000. + *+ * + *
int32 page_size = 5;
+ *
+ * @return The pageSize.
+ */
+ @java.lang.Override
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 6;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ *
+ * + * The `next_page_token` returned from the previous `ListAssetsResponse`, or + * unspecified for the first `ListAssetsRequest`. It is a continuation of a + * prior `ListAssets` call, and the API should return the next page of assets. + *+ * + *
string page_token = 6;
+ *
+ * @return The pageToken.
+ */
+ @java.lang.Override
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ 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();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The `next_page_token` returned from the previous `ListAssetsResponse`, or + * unspecified for the first `ListAssetsRequest`. It is a continuation of a + * prior `ListAssets` call, and the API should return the next page of assets. + *+ * + *
string page_token = 6;
+ *
+ * @return The bytes for pageToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = 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 (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (readTime_ != null) {
+ output.writeMessage(2, getReadTime());
+ }
+ for (int i = 0; i < assetTypes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i));
+ }
+ if (contentType_
+ != com.google.cloud.asset.v1p5beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) {
+ output.writeEnum(4, contentType_);
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(5, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (readTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadTime());
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < assetTypes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getAssetTypesList().size();
+ }
+ if (contentType_
+ != com.google.cloud.asset.v1p5beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, contentType_);
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_);
+ }
+ 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.v1p5beta1.ListAssetsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p5beta1.ListAssetsRequest other =
+ (com.google.cloud.asset.v1p5beta1.ListAssetsRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (hasReadTime() != other.hasReadTime()) return false;
+ if (hasReadTime()) {
+ if (!getReadTime().equals(other.getReadTime())) return false;
+ }
+ if (!getAssetTypesList().equals(other.getAssetTypesList())) return false;
+ if (contentType_ != other.contentType_) return false;
+ if (getPageSize() != other.getPageSize()) return false;
+ if (!getPageToken().equals(other.getPageToken())) 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) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ if (hasReadTime()) {
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().hashCode();
+ }
+ if (getAssetTypesCount() > 0) {
+ hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER;
+ hash = (53 * hash) + getAssetTypesList().hashCode();
+ }
+ hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + contentType_;
+ hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPageSize();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest 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.v1p5beta1.ListAssetsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest 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.v1p5beta1.ListAssetsRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest 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.v1p5beta1.ListAssetsRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest 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.v1p5beta1.ListAssetsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest 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.v1p5beta1.ListAssetsRequest 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;
+ }
+ /**
+ *
+ *
+ * + * ListAssets request. + *+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-number]" (such as "projects/my-project-id"), or + * "projects/[project-id]" (such as "projects/12345"). + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-number]" (such as "projects/my-project-id"), or + * "projects/[project-id]" (such as "projects/12345"). + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-number]" (such as "projects/my-project-id"), or + * "projects/[project-id]" (such as "projects/12345"). + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-number]" (such as "projects/my-project-id"), or + * "projects/[project-id]" (such as "projects/12345"). + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-number]" (such as "projects/my-project-id"), or + * "projects/[project-id]" (such as "projects/12345"). + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp readTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ readTimeBuilder_;
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ *
+ * @return Whether the readTime field is set.
+ */
+ public boolean hasReadTime() {
+ return readTimeBuilder_ != null || readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ *
+ * @return The readTime.
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ } else {
+ return readTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readTime_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ readTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (readTime_ != null) {
+ readTime_ =
+ com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
+ } else {
+ readTime_ = value;
+ }
+ onChanged();
+ } else {
+ readTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ onChanged();
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+
+ onChanged();
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (readTimeBuilder_ != null) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getReadTime(), getParentForChildren(), isClean());
+ readTime_ = null;
+ }
+ return readTimeBuilder_;
+ }
+
+ private com.google.protobuf.LazyStringList assetTypes_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureAssetTypesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @return A list containing the assetTypes.
+ */
+ public com.google.protobuf.ProtocolStringList getAssetTypesList() {
+ return assetTypes_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @return The count of assetTypes.
+ */
+ public int getAssetTypesCount() {
+ return assetTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @param index The index of the element to return.
+ * @return The assetTypes at the given index.
+ */
+ public java.lang.String getAssetTypes(int index) {
+ return assetTypes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the assetTypes at the given index.
+ */
+ public com.google.protobuf.ByteString getAssetTypesBytes(int index) {
+ return assetTypes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @param index The index to set the value at.
+ * @param value The assetTypes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAssetTypes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAssetTypesIsMutable();
+ assetTypes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @param value The assetTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAssetTypes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAssetTypesIsMutable();
+ assetTypes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @param values The assetTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllAssetTypes(java.lang.Iterable+ * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAssetTypes() {
+ assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @param value The bytes of the assetTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAssetTypesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureAssetTypesIsMutable();
+ assetTypes_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private int contentType_ = 0;
+ /**
+ *
+ *
+ * + * Asset content type. If not specified, no content but the asset name will + * be returned. + *+ * + *
.google.cloud.asset.v1p5beta1.ContentType content_type = 4;
+ *
+ * @return The enum numeric value on the wire for contentType.
+ */
+ @java.lang.Override
+ public int getContentTypeValue() {
+ return contentType_;
+ }
+ /**
+ *
+ *
+ * + * Asset content type. If not specified, no content but the asset name will + * be returned. + *+ * + *
.google.cloud.asset.v1p5beta1.ContentType content_type = 4;
+ *
+ * @param value The enum numeric value on the wire for contentType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setContentTypeValue(int value) {
+
+ contentType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Asset content type. If not specified, no content but the asset name will + * be returned. + *+ * + *
.google.cloud.asset.v1p5beta1.ContentType content_type = 4;
+ *
+ * @return The contentType.
+ */
+ @java.lang.Override
+ public com.google.cloud.asset.v1p5beta1.ContentType getContentType() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.asset.v1p5beta1.ContentType result =
+ com.google.cloud.asset.v1p5beta1.ContentType.valueOf(contentType_);
+ return result == null ? com.google.cloud.asset.v1p5beta1.ContentType.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ *
+ * + * Asset content type. If not specified, no content but the asset name will + * be returned. + *+ * + *
.google.cloud.asset.v1p5beta1.ContentType content_type = 4;
+ *
+ * @param value The contentType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setContentType(com.google.cloud.asset.v1p5beta1.ContentType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ contentType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Asset content type. If not specified, no content but the asset name will + * be returned. + *+ * + *
.google.cloud.asset.v1p5beta1.ContentType content_type = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearContentType() {
+
+ contentType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * The maximum number of assets to be returned in a single response. Default + * is 100, minimum is 1, and maximum is 1000. + *+ * + *
int32 page_size = 5;
+ *
+ * @return The pageSize.
+ */
+ @java.lang.Override
+ public int getPageSize() {
+ return pageSize_;
+ }
+ /**
+ *
+ *
+ * + * The maximum number of assets to be returned in a single response. Default + * is 100, minimum is 1, and maximum is 1000. + *+ * + *
int32 page_size = 5;
+ *
+ * @param value The pageSize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The maximum number of assets to be returned in a single response. Default + * is 100, minimum is 1, and maximum is 1000. + *+ * + *
int32 page_size = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ *
+ * + * The `next_page_token` returned from the previous `ListAssetsResponse`, or + * unspecified for the first `ListAssetsRequest`. It is a continuation of a + * prior `ListAssets` call, and the API should return the next page of assets. + *+ * + *
string page_token = 6;
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The `next_page_token` returned from the previous `ListAssetsResponse`, or + * unspecified for the first `ListAssetsRequest`. It is a continuation of a + * prior `ListAssets` call, and the API should return the next page of assets. + *+ * + *
string page_token = 6;
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The `next_page_token` returned from the previous `ListAssetsResponse`, or + * unspecified for the first `ListAssetsRequest`. It is a continuation of a + * prior `ListAssets` call, and the API should return the next page of assets. + *+ * + *
string page_token = 6;
+ *
+ * @param value The pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The `next_page_token` returned from the previous `ListAssetsResponse`, or + * unspecified for the first `ListAssetsRequest`. It is a continuation of a + * prior `ListAssets` call, and the API should return the next page of assets. + *+ * + *
string page_token = 6;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The `next_page_token` returned from the previous `ListAssetsResponse`, or + * unspecified for the first `ListAssetsRequest`. It is a continuation of a + * prior `ListAssets` call, and the API should return the next page of assets. + *+ * + *
string page_token = 6;
+ *
+ * @param value The bytes for pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = 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.v1p5beta1.ListAssetsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.ListAssetsRequest)
+ private static final com.google.cloud.asset.v1p5beta1.ListAssetsRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.ListAssetsRequest();
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-number]" (such as "projects/my-project-id"), or + * "projects/[project-id]" (such as "projects/12345"). + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The parent.
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-number]" (such as "projects/my-project-id"), or + * "projects/[project-id]" (such as "projects/12345"). + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for parent.
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ *
+ * @return Whether the readTime field is set.
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ *
+ * @return The readTime.
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * between 2018-10-02 UTC (inclusive) and the current time. If not specified, + * the current time will be used. Due to delays in resource data collection + * and indexing, there is a volatile window during which running the same + * query may get different results. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @return A list containing the assetTypes.
+ */
+ java.util.List+ * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @return The count of assetTypes.
+ */
+ int getAssetTypesCount();
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @param index The index of the element to return.
+ * @return The assetTypes at the given index.
+ */
+ java.lang.String getAssetTypes(int index);
+ /**
+ *
+ *
+ * + * A list of asset types of which to take a snapshot for. For example: + * "compute.googleapis.com/Disk". If specified, only matching assets will be + * returned. See [Introduction to Cloud Asset + * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * for all supported asset types. + *+ * + *
repeated string asset_types = 3;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the assetTypes at the given index.
+ */
+ com.google.protobuf.ByteString getAssetTypesBytes(int index);
+
+ /**
+ *
+ *
+ * + * Asset content type. If not specified, no content but the asset name will + * be returned. + *+ * + *
.google.cloud.asset.v1p5beta1.ContentType content_type = 4;
+ *
+ * @return The enum numeric value on the wire for contentType.
+ */
+ int getContentTypeValue();
+ /**
+ *
+ *
+ * + * Asset content type. If not specified, no content but the asset name will + * be returned. + *+ * + *
.google.cloud.asset.v1p5beta1.ContentType content_type = 4;
+ *
+ * @return The contentType.
+ */
+ com.google.cloud.asset.v1p5beta1.ContentType getContentType();
+
+ /**
+ *
+ *
+ * + * The maximum number of assets to be returned in a single response. Default + * is 100, minimum is 1, and maximum is 1000. + *+ * + *
int32 page_size = 5;
+ *
+ * @return The pageSize.
+ */
+ int getPageSize();
+
+ /**
+ *
+ *
+ * + * The `next_page_token` returned from the previous `ListAssetsResponse`, or + * unspecified for the first `ListAssetsRequest`. It is a continuation of a + * prior `ListAssets` call, and the API should return the next page of assets. + *+ * + *
string page_token = 6;
+ *
+ * @return The pageToken.
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ *
+ * + * The `next_page_token` returned from the previous `ListAssetsResponse`, or + * unspecified for the first `ListAssetsRequest`. It is a continuation of a + * prior `ListAssets` call, and the API should return the next page of assets. + *+ * + *
string page_token = 6;
+ *
+ * @return The bytes for pageToken.
+ */
+ com.google.protobuf.ByteString getPageTokenBytes();
+}
diff --git a/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java
new file mode 100644
index 000000000..ce21a98bf
--- /dev/null
+++ b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java
@@ -0,0 +1,1402 @@
+/*
+ * 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/v1p5beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p5beta1;
+
+/**
+ *
+ *
+ * + * ListAssets response. + *+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsResponse} + */ +public final class ListAssetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.ListAssetsResponse) + ListAssetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAssetsResponse.newBuilder() to construct. + private ListAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ListAssetsResponse() { + assets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAssetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAssetsResponse( + 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: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList
+ * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return Whether the readTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasReadTime() {
+ return readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return The readTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getReadTime() {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ return getReadTime();
+ }
+
+ public static final int ASSETS_FIELD_NUMBER = 2;
+ private java.util.List+ * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ @java.lang.Override
+ public java.util.List+ * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.asset.v1p5beta1.AssetOrBuilder>
+ getAssetsOrBuilderList() {
+ return assets_;
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ @java.lang.Override
+ public int getAssetsCount() {
+ return assets_.size();
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ @java.lang.Override
+ public com.google.cloud.asset.v1p5beta1.Asset getAssets(int index) {
+ return assets_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ @java.lang.Override
+ public com.google.cloud.asset.v1p5beta1.AssetOrBuilder getAssetsOrBuilder(int index) {
+ return assets_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3;
+ private volatile java.lang.Object nextPageToken_;
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. Set to empty if there are no + * remaining results. + *+ * + *
string next_page_token = 3;
+ *
+ * @return The nextPageToken.
+ */
+ @java.lang.Override
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ 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();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. Set to empty if there are no + * remaining results. + *+ * + *
string next_page_token = 3;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = 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 (readTime_ != null) {
+ output.writeMessage(1, getReadTime());
+ }
+ for (int i = 0; i < assets_.size(); i++) {
+ output.writeMessage(2, assets_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (readTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReadTime());
+ }
+ for (int i = 0; i < assets_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, assets_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_);
+ }
+ 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.v1p5beta1.ListAssetsResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p5beta1.ListAssetsResponse other =
+ (com.google.cloud.asset.v1p5beta1.ListAssetsResponse) obj;
+
+ if (hasReadTime() != other.hasReadTime()) return false;
+ if (hasReadTime()) {
+ if (!getReadTime().equals(other.getReadTime())) return false;
+ }
+ if (!getAssetsList().equals(other.getAssetsList())) return false;
+ if (!getNextPageToken().equals(other.getNextPageToken())) 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 (hasReadTime()) {
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().hashCode();
+ }
+ if (getAssetsCount() > 0) {
+ hash = (37 * hash) + ASSETS_FIELD_NUMBER;
+ hash = (53 * hash) + getAssetsList().hashCode();
+ }
+ hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getNextPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse 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.v1p5beta1.ListAssetsResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse 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.v1p5beta1.ListAssetsResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse 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.v1p5beta1.ListAssetsResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse 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.v1p5beta1.ListAssetsResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse 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.v1p5beta1.ListAssetsResponse 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;
+ }
+ /**
+ *
+ *
+ * + * ListAssets response. + *+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return Whether the readTime field is set.
+ */
+ public boolean hasReadTime() {
+ return readTimeBuilder_ != null || readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return The readTime.
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ } else {
+ return readTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readTime_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ readTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (readTime_ != null) {
+ readTime_ =
+ com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
+ } else {
+ readTime_ = value;
+ }
+ onChanged();
+ } else {
+ readTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ onChanged();
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+
+ onChanged();
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (readTimeBuilder_ != null) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getReadTime(), getParentForChildren(), isClean());
+ readTime_ = null;
+ }
+ return readTimeBuilder_;
+ }
+
+ private java.util.List+ * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public java.util.List+ * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public int getAssetsCount() {
+ if (assetsBuilder_ == null) {
+ return assets_.size();
+ } else {
+ return assetsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public com.google.cloud.asset.v1p5beta1.Asset getAssets(int index) {
+ if (assetsBuilder_ == null) {
+ return assets_.get(index);
+ } else {
+ return assetsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public Builder setAssets(int index, com.google.cloud.asset.v1p5beta1.Asset value) {
+ if (assetsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAssetsIsMutable();
+ assets_.set(index, value);
+ onChanged();
+ } else {
+ assetsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public Builder setAssets(
+ int index, com.google.cloud.asset.v1p5beta1.Asset.Builder builderForValue) {
+ if (assetsBuilder_ == null) {
+ ensureAssetsIsMutable();
+ assets_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ assetsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public Builder addAssets(com.google.cloud.asset.v1p5beta1.Asset value) {
+ if (assetsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAssetsIsMutable();
+ assets_.add(value);
+ onChanged();
+ } else {
+ assetsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public Builder addAssets(int index, com.google.cloud.asset.v1p5beta1.Asset value) {
+ if (assetsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAssetsIsMutable();
+ assets_.add(index, value);
+ onChanged();
+ } else {
+ assetsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public Builder addAssets(com.google.cloud.asset.v1p5beta1.Asset.Builder builderForValue) {
+ if (assetsBuilder_ == null) {
+ ensureAssetsIsMutable();
+ assets_.add(builderForValue.build());
+ onChanged();
+ } else {
+ assetsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public Builder addAssets(
+ int index, com.google.cloud.asset.v1p5beta1.Asset.Builder builderForValue) {
+ if (assetsBuilder_ == null) {
+ ensureAssetsIsMutable();
+ assets_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ assetsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public Builder addAllAssets(
+ java.lang.Iterable extends com.google.cloud.asset.v1p5beta1.Asset> values) {
+ if (assetsBuilder_ == null) {
+ ensureAssetsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assets_);
+ onChanged();
+ } else {
+ assetsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public Builder clearAssets() {
+ if (assetsBuilder_ == null) {
+ assets_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ assetsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public Builder removeAssets(int index) {
+ if (assetsBuilder_ == null) {
+ ensureAssetsIsMutable();
+ assets_.remove(index);
+ onChanged();
+ } else {
+ assetsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public com.google.cloud.asset.v1p5beta1.Asset.Builder getAssetsBuilder(int index) {
+ return getAssetsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public com.google.cloud.asset.v1p5beta1.AssetOrBuilder getAssetsOrBuilder(int index) {
+ if (assetsBuilder_ == null) {
+ return assets_.get(index);
+ } else {
+ return assetsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public java.util.List extends com.google.cloud.asset.v1p5beta1.AssetOrBuilder>
+ getAssetsOrBuilderList() {
+ if (assetsBuilder_ != null) {
+ return assetsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(assets_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public com.google.cloud.asset.v1p5beta1.Asset.Builder addAssetsBuilder() {
+ return getAssetsFieldBuilder()
+ .addBuilder(com.google.cloud.asset.v1p5beta1.Asset.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public com.google.cloud.asset.v1p5beta1.Asset.Builder addAssetsBuilder(int index) {
+ return getAssetsFieldBuilder()
+ .addBuilder(index, com.google.cloud.asset.v1p5beta1.Asset.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ public java.util.List+ * Token to retrieve the next page of results. Set to empty if there are no + * remaining results. + *+ * + *
string next_page_token = 3;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. Set to empty if there are no + * remaining results. + *+ * + *
string next_page_token = 3;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. Set to empty if there are no + * remaining results. + *+ * + *
string next_page_token = 3;
+ *
+ * @param value The nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. Set to empty if there are no + * remaining results. + *+ * + *
string next_page_token = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. Set to empty if there are no + * remaining results. + *+ * + *
string next_page_token = 3;
+ *
+ * @param value The bytes for nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = 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.v1p5beta1.ListAssetsResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.ListAssetsResponse)
+ private static final com.google.cloud.asset.v1p5beta1.ListAssetsResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.ListAssetsResponse();
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return Whether the readTime field is set.
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return The readTime.
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * Time the snapshot was taken. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ java.util.List+ * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ com.google.cloud.asset.v1p5beta1.Asset getAssets(int index);
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ int getAssetsCount();
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ java.util.List extends com.google.cloud.asset.v1p5beta1.AssetOrBuilder>
+ getAssetsOrBuilderList();
+ /**
+ *
+ *
+ * + * Assets. + *+ * + *
repeated .google.cloud.asset.v1p5beta1.Asset assets = 2;
+ */
+ com.google.cloud.asset.v1p5beta1.AssetOrBuilder getAssetsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. Set to empty if there are no + * remaining results. + *+ * + *
string next_page_token = 3;
+ *
+ * @return The nextPageToken.
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. Set to empty if there are no + * remaining results. + *+ * + *
string next_page_token = 3;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+}
diff --git a/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java
new file mode 100644
index 000000000..62a8155f3
--- /dev/null
+++ b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java
@@ -0,0 +1,1753 @@
+/*
+ * 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/v1p5beta1/assets.proto
+
+package com.google.cloud.asset.v1p5beta1;
+
+/**
+ *
+ *
+ * + * Representation of a cloud resource. + *+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.Resource} + */ +public final class Resource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.Resource) + ResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Resource() { + version_ = ""; + discoveryDocumentUri_ = ""; + discoveryName_ = ""; + resourceUrl_ = ""; + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Resource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Resource( + 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(); + + version_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + discoveryDocumentUri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + discoveryName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUrl_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 50: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (data_ != null) { + subBuilder = data_.toBuilder(); + } + data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(data_); + data_ = subBuilder.buildPartial(); + } + + 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.v1p5beta1.AssetProto + .internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p5beta1.AssetProto + .internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p5beta1.Resource.class, + com.google.cloud.asset.v1p5beta1.Resource.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+ * The API version. Example: "v1". + *+ * + *
string version = 1;
+ *
+ * @return The version.
+ */
+ @java.lang.Override
+ public java.lang.String getVersion() {
+ java.lang.Object ref = version_;
+ 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();
+ version_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The API version. Example: "v1". + *+ * + *
string version = 1;
+ *
+ * @return The bytes for version.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getVersionBytes() {
+ java.lang.Object ref = version_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ version_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER = 2;
+ private volatile java.lang.Object discoveryDocumentUri_;
+ /**
+ *
+ *
+ * + * The URL of the discovery document containing the resource's JSON schema. + * For example: + * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + * It will be left unspecified for resources without a discovery-based API, + * such as Cloud Bigtable. + *+ * + *
string discovery_document_uri = 2;
+ *
+ * @return The discoveryDocumentUri.
+ */
+ @java.lang.Override
+ public java.lang.String getDiscoveryDocumentUri() {
+ java.lang.Object ref = discoveryDocumentUri_;
+ 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();
+ discoveryDocumentUri_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The URL of the discovery document containing the resource's JSON schema. + * For example: + * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + * It will be left unspecified for resources without a discovery-based API, + * such as Cloud Bigtable. + *+ * + *
string discovery_document_uri = 2;
+ *
+ * @return The bytes for discoveryDocumentUri.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getDiscoveryDocumentUriBytes() {
+ java.lang.Object ref = discoveryDocumentUri_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ discoveryDocumentUri_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DISCOVERY_NAME_FIELD_NUMBER = 3;
+ private volatile java.lang.Object discoveryName_;
+ /**
+ *
+ *
+ * + * The JSON schema name listed in the discovery document. + * Example: "Project". It will be left unspecified for resources (such as + * Cloud Bigtable) without a discovery-based API. + *+ * + *
string discovery_name = 3;
+ *
+ * @return The discoveryName.
+ */
+ @java.lang.Override
+ public java.lang.String getDiscoveryName() {
+ java.lang.Object ref = discoveryName_;
+ 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();
+ discoveryName_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The JSON schema name listed in the discovery document. + * Example: "Project". It will be left unspecified for resources (such as + * Cloud Bigtable) without a discovery-based API. + *+ * + *
string discovery_name = 3;
+ *
+ * @return The bytes for discoveryName.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getDiscoveryNameBytes() {
+ java.lang.Object ref = discoveryName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ discoveryName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int RESOURCE_URL_FIELD_NUMBER = 4;
+ private volatile java.lang.Object resourceUrl_;
+ /**
+ *
+ *
+ * + * The REST URL for accessing the resource. An HTTP GET operation using this + * URL returns the resource itself. + * Example: + * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + * It will be left unspecified for resources without a REST API. + *+ * + *
string resource_url = 4;
+ *
+ * @return The resourceUrl.
+ */
+ @java.lang.Override
+ public java.lang.String getResourceUrl() {
+ java.lang.Object ref = resourceUrl_;
+ 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();
+ resourceUrl_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The REST URL for accessing the resource. An HTTP GET operation using this + * URL returns the resource itself. + * Example: + * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + * It will be left unspecified for resources without a REST API. + *+ * + *
string resource_url = 4;
+ *
+ * @return The bytes for resourceUrl.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getResourceUrlBytes() {
+ java.lang.Object ref = resourceUrl_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ resourceUrl_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PARENT_FIELD_NUMBER = 5;
+ private volatile java.lang.Object parent_;
+ /**
+ *
+ *
+ * + * The full name of the immediate parent of this resource. See + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + * For GCP assets, it is the parent resource defined in the [Cloud IAM policy + * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + * For example: + * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + * For third-party assets, it is up to the users to define. + *+ * + *
string parent = 5;
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ 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();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full name of the immediate parent of this resource. See + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + * For GCP assets, it is the parent resource defined in the [Cloud IAM policy + * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + * For example: + * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + * For third-party assets, it is up to the users to define. + *+ * + *
string parent = 5;
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DATA_FIELD_NUMBER = 6;
+ private com.google.protobuf.Struct data_;
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ *
+ * @return Whether the data field is set.
+ */
+ @java.lang.Override
+ public boolean hasData() {
+ return data_ != null;
+ }
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ *
+ * @return The data.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getData() {
+ return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_;
+ }
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getDataOrBuilder() {
+ return getData();
+ }
+
+ 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 (!getVersionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_);
+ }
+ if (!getDiscoveryDocumentUriBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discoveryDocumentUri_);
+ }
+ if (!getDiscoveryNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, discoveryName_);
+ }
+ if (!getResourceUrlBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUrl_);
+ }
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_);
+ }
+ if (data_ != null) {
+ output.writeMessage(6, getData());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getVersionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_);
+ }
+ if (!getDiscoveryDocumentUriBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discoveryDocumentUri_);
+ }
+ if (!getDiscoveryNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, discoveryName_);
+ }
+ if (!getResourceUrlBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUrl_);
+ }
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_);
+ }
+ if (data_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getData());
+ }
+ 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.v1p5beta1.Resource)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p5beta1.Resource other =
+ (com.google.cloud.asset.v1p5beta1.Resource) obj;
+
+ if (!getVersion().equals(other.getVersion())) return false;
+ if (!getDiscoveryDocumentUri().equals(other.getDiscoveryDocumentUri())) return false;
+ if (!getDiscoveryName().equals(other.getDiscoveryName())) return false;
+ if (!getResourceUrl().equals(other.getResourceUrl())) return false;
+ if (!getParent().equals(other.getParent())) return false;
+ if (hasData() != other.hasData()) return false;
+ if (hasData()) {
+ if (!getData().equals(other.getData())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion().hashCode();
+ hash = (37 * hash) + DISCOVERY_DOCUMENT_URI_FIELD_NUMBER;
+ hash = (53 * hash) + getDiscoveryDocumentUri().hashCode();
+ hash = (37 * hash) + DISCOVERY_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getDiscoveryName().hashCode();
+ hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER;
+ hash = (53 * hash) + getResourceUrl().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ if (hasData()) {
+ hash = (37 * hash) + DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getData().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Resource parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Resource 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.v1p5beta1.Resource parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Resource 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.v1p5beta1.Resource parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Resource parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Resource parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Resource 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.v1p5beta1.Resource parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Resource 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.v1p5beta1.Resource parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Resource 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.v1p5beta1.Resource 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;
+ }
+ /**
+ *
+ *
+ * + * Representation of a cloud resource. + *+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.Resource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The API version. Example: "v1". + *+ * + *
string version = 1;
+ *
+ * @return The version.
+ */
+ public java.lang.String getVersion() {
+ java.lang.Object ref = version_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ version_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The API version. Example: "v1". + *+ * + *
string version = 1;
+ *
+ * @return The bytes for version.
+ */
+ public com.google.protobuf.ByteString getVersionBytes() {
+ java.lang.Object ref = version_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ version_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The API version. Example: "v1". + *+ * + *
string version = 1;
+ *
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The API version. Example: "v1". + *+ * + *
string version = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = getDefaultInstance().getVersion();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The API version. Example: "v1". + *+ * + *
string version = 1;
+ *
+ * @param value The bytes for version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object discoveryDocumentUri_ = "";
+ /**
+ *
+ *
+ * + * The URL of the discovery document containing the resource's JSON schema. + * For example: + * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + * It will be left unspecified for resources without a discovery-based API, + * such as Cloud Bigtable. + *+ * + *
string discovery_document_uri = 2;
+ *
+ * @return The discoveryDocumentUri.
+ */
+ public java.lang.String getDiscoveryDocumentUri() {
+ java.lang.Object ref = discoveryDocumentUri_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ discoveryDocumentUri_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The URL of the discovery document containing the resource's JSON schema. + * For example: + * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + * It will be left unspecified for resources without a discovery-based API, + * such as Cloud Bigtable. + *+ * + *
string discovery_document_uri = 2;
+ *
+ * @return The bytes for discoveryDocumentUri.
+ */
+ public com.google.protobuf.ByteString getDiscoveryDocumentUriBytes() {
+ java.lang.Object ref = discoveryDocumentUri_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ discoveryDocumentUri_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The URL of the discovery document containing the resource's JSON schema. + * For example: + * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + * It will be left unspecified for resources without a discovery-based API, + * such as Cloud Bigtable. + *+ * + *
string discovery_document_uri = 2;
+ *
+ * @param value The discoveryDocumentUri to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDiscoveryDocumentUri(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ discoveryDocumentUri_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The URL of the discovery document containing the resource's JSON schema. + * For example: + * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + * It will be left unspecified for resources without a discovery-based API, + * such as Cloud Bigtable. + *+ * + *
string discovery_document_uri = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDiscoveryDocumentUri() {
+
+ discoveryDocumentUri_ = getDefaultInstance().getDiscoveryDocumentUri();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The URL of the discovery document containing the resource's JSON schema. + * For example: + * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + * It will be left unspecified for resources without a discovery-based API, + * such as Cloud Bigtable. + *+ * + *
string discovery_document_uri = 2;
+ *
+ * @param value The bytes for discoveryDocumentUri to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDiscoveryDocumentUriBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ discoveryDocumentUri_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object discoveryName_ = "";
+ /**
+ *
+ *
+ * + * The JSON schema name listed in the discovery document. + * Example: "Project". It will be left unspecified for resources (such as + * Cloud Bigtable) without a discovery-based API. + *+ * + *
string discovery_name = 3;
+ *
+ * @return The discoveryName.
+ */
+ public java.lang.String getDiscoveryName() {
+ java.lang.Object ref = discoveryName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ discoveryName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The JSON schema name listed in the discovery document. + * Example: "Project". It will be left unspecified for resources (such as + * Cloud Bigtable) without a discovery-based API. + *+ * + *
string discovery_name = 3;
+ *
+ * @return The bytes for discoveryName.
+ */
+ public com.google.protobuf.ByteString getDiscoveryNameBytes() {
+ java.lang.Object ref = discoveryName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ discoveryName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The JSON schema name listed in the discovery document. + * Example: "Project". It will be left unspecified for resources (such as + * Cloud Bigtable) without a discovery-based API. + *+ * + *
string discovery_name = 3;
+ *
+ * @param value The discoveryName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDiscoveryName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ discoveryName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The JSON schema name listed in the discovery document. + * Example: "Project". It will be left unspecified for resources (such as + * Cloud Bigtable) without a discovery-based API. + *+ * + *
string discovery_name = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDiscoveryName() {
+
+ discoveryName_ = getDefaultInstance().getDiscoveryName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The JSON schema name listed in the discovery document. + * Example: "Project". It will be left unspecified for resources (such as + * Cloud Bigtable) without a discovery-based API. + *+ * + *
string discovery_name = 3;
+ *
+ * @param value The bytes for discoveryName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDiscoveryNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ discoveryName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object resourceUrl_ = "";
+ /**
+ *
+ *
+ * + * The REST URL for accessing the resource. An HTTP GET operation using this + * URL returns the resource itself. + * Example: + * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + * It will be left unspecified for resources without a REST API. + *+ * + *
string resource_url = 4;
+ *
+ * @return The resourceUrl.
+ */
+ public java.lang.String getResourceUrl() {
+ java.lang.Object ref = resourceUrl_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ resourceUrl_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The REST URL for accessing the resource. An HTTP GET operation using this + * URL returns the resource itself. + * Example: + * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + * It will be left unspecified for resources without a REST API. + *+ * + *
string resource_url = 4;
+ *
+ * @return The bytes for resourceUrl.
+ */
+ public com.google.protobuf.ByteString getResourceUrlBytes() {
+ java.lang.Object ref = resourceUrl_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ resourceUrl_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The REST URL for accessing the resource. An HTTP GET operation using this + * URL returns the resource itself. + * Example: + * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + * It will be left unspecified for resources without a REST API. + *+ * + *
string resource_url = 4;
+ *
+ * @param value The resourceUrl to set.
+ * @return This builder for chaining.
+ */
+ public Builder setResourceUrl(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ resourceUrl_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The REST URL for accessing the resource. An HTTP GET operation using this + * URL returns the resource itself. + * Example: + * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + * It will be left unspecified for resources without a REST API. + *+ * + *
string resource_url = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearResourceUrl() {
+
+ resourceUrl_ = getDefaultInstance().getResourceUrl();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The REST URL for accessing the resource. An HTTP GET operation using this + * URL returns the resource itself. + * Example: + * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + * It will be left unspecified for resources without a REST API. + *+ * + *
string resource_url = 4;
+ *
+ * @param value The bytes for resourceUrl to set.
+ * @return This builder for chaining.
+ */
+ public Builder setResourceUrlBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ resourceUrl_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object parent_ = "";
+ /**
+ *
+ *
+ * + * The full name of the immediate parent of this resource. See + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + * For GCP assets, it is the parent resource defined in the [Cloud IAM policy + * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + * For example: + * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + * For third-party assets, it is up to the users to define. + *+ * + *
string parent = 5;
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full name of the immediate parent of this resource. See + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + * For GCP assets, it is the parent resource defined in the [Cloud IAM policy + * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + * For example: + * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + * For third-party assets, it is up to the users to define. + *+ * + *
string parent = 5;
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full name of the immediate parent of this resource. See + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + * For GCP assets, it is the parent resource defined in the [Cloud IAM policy + * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + * For example: + * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + * For third-party assets, it is up to the users to define. + *+ * + *
string parent = 5;
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full name of the immediate parent of this resource. See + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + * For GCP assets, it is the parent resource defined in the [Cloud IAM policy + * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + * For example: + * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + * For third-party assets, it is up to the users to define. + *+ * + *
string parent = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full name of the immediate parent of this resource. See + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + * For GCP assets, it is the parent resource defined in the [Cloud IAM policy + * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + * For example: + * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + * For third-party assets, it is up to the users to define. + *+ * + *
string parent = 5;
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Struct data_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ dataBuilder_;
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ *
+ * @return Whether the data field is set.
+ */
+ public boolean hasData() {
+ return dataBuilder_ != null || data_ != null;
+ }
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ *
+ * @return The data.
+ */
+ public com.google.protobuf.Struct getData() {
+ if (dataBuilder_ == null) {
+ return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_;
+ } else {
+ return dataBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ */
+ public Builder setData(com.google.protobuf.Struct value) {
+ if (dataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ data_ = value;
+ onChanged();
+ } else {
+ dataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ */
+ public Builder setData(com.google.protobuf.Struct.Builder builderForValue) {
+ if (dataBuilder_ == null) {
+ data_ = builderForValue.build();
+ onChanged();
+ } else {
+ dataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ */
+ public Builder mergeData(com.google.protobuf.Struct value) {
+ if (dataBuilder_ == null) {
+ if (data_ != null) {
+ data_ = com.google.protobuf.Struct.newBuilder(data_).mergeFrom(value).buildPartial();
+ } else {
+ data_ = value;
+ }
+ onChanged();
+ } else {
+ dataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ */
+ public Builder clearData() {
+ if (dataBuilder_ == null) {
+ data_ = null;
+ onChanged();
+ } else {
+ data_ = null;
+ dataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ */
+ public com.google.protobuf.Struct.Builder getDataBuilder() {
+
+ onChanged();
+ return getDataFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ */
+ public com.google.protobuf.StructOrBuilder getDataOrBuilder() {
+ if (dataBuilder_ != null) {
+ return dataBuilder_.getMessageOrBuilder();
+ } else {
+ return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ getDataFieldBuilder() {
+ if (dataBuilder_ == null) {
+ dataBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>(getData(), getParentForChildren(), isClean());
+ data_ = null;
+ }
+ return dataBuilder_;
+ }
+
+ @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.v1p5beta1.Resource)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.Resource)
+ private static final com.google.cloud.asset.v1p5beta1.Resource DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.Resource();
+ }
+
+ public static com.google.cloud.asset.v1p5beta1.Resource getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The API version. Example: "v1". + *+ * + *
string version = 1;
+ *
+ * @return The version.
+ */
+ java.lang.String getVersion();
+ /**
+ *
+ *
+ * + * The API version. Example: "v1". + *+ * + *
string version = 1;
+ *
+ * @return The bytes for version.
+ */
+ com.google.protobuf.ByteString getVersionBytes();
+
+ /**
+ *
+ *
+ * + * The URL of the discovery document containing the resource's JSON schema. + * For example: + * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + * It will be left unspecified for resources without a discovery-based API, + * such as Cloud Bigtable. + *+ * + *
string discovery_document_uri = 2;
+ *
+ * @return The discoveryDocumentUri.
+ */
+ java.lang.String getDiscoveryDocumentUri();
+ /**
+ *
+ *
+ * + * The URL of the discovery document containing the resource's JSON schema. + * For example: + * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + * It will be left unspecified for resources without a discovery-based API, + * such as Cloud Bigtable. + *+ * + *
string discovery_document_uri = 2;
+ *
+ * @return The bytes for discoveryDocumentUri.
+ */
+ com.google.protobuf.ByteString getDiscoveryDocumentUriBytes();
+
+ /**
+ *
+ *
+ * + * The JSON schema name listed in the discovery document. + * Example: "Project". It will be left unspecified for resources (such as + * Cloud Bigtable) without a discovery-based API. + *+ * + *
string discovery_name = 3;
+ *
+ * @return The discoveryName.
+ */
+ java.lang.String getDiscoveryName();
+ /**
+ *
+ *
+ * + * The JSON schema name listed in the discovery document. + * Example: "Project". It will be left unspecified for resources (such as + * Cloud Bigtable) without a discovery-based API. + *+ * + *
string discovery_name = 3;
+ *
+ * @return The bytes for discoveryName.
+ */
+ com.google.protobuf.ByteString getDiscoveryNameBytes();
+
+ /**
+ *
+ *
+ * + * The REST URL for accessing the resource. An HTTP GET operation using this + * URL returns the resource itself. + * Example: + * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + * It will be left unspecified for resources without a REST API. + *+ * + *
string resource_url = 4;
+ *
+ * @return The resourceUrl.
+ */
+ java.lang.String getResourceUrl();
+ /**
+ *
+ *
+ * + * The REST URL for accessing the resource. An HTTP GET operation using this + * URL returns the resource itself. + * Example: + * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + * It will be left unspecified for resources without a REST API. + *+ * + *
string resource_url = 4;
+ *
+ * @return The bytes for resourceUrl.
+ */
+ com.google.protobuf.ByteString getResourceUrlBytes();
+
+ /**
+ *
+ *
+ * + * The full name of the immediate parent of this resource. See + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + * For GCP assets, it is the parent resource defined in the [Cloud IAM policy + * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + * For example: + * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + * For third-party assets, it is up to the users to define. + *+ * + *
string parent = 5;
+ *
+ * @return The parent.
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * The full name of the immediate parent of this resource. See + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + * For GCP assets, it is the parent resource defined in the [Cloud IAM policy + * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + * For example: + * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + * For third-party assets, it is up to the users to define. + *+ * + *
string parent = 5;
+ *
+ * @return The bytes for parent.
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ *
+ * @return Whether the data field is set.
+ */
+ boolean hasData();
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ *
+ * @return The data.
+ */
+ com.google.protobuf.Struct getData();
+ /**
+ *
+ *
+ * + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + *+ * + *
.google.protobuf.Struct data = 6;
+ */
+ com.google.protobuf.StructOrBuilder getDataOrBuilder();
+}
diff --git a/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto b/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto
new file mode 100644
index 000000000..52233ad05
--- /dev/null
+++ b/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto
@@ -0,0 +1,112 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.asset.v1p5beta1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/cloud/asset/v1p5beta1/assets.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Asset.V1P5Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1;asset";
+option java_multiple_files = true;
+option java_outer_classname = "AssetServiceProto";
+option java_package = "com.google.cloud.asset.v1p5beta1";
+option php_namespace = "Google\\Cloud\\Asset\\V1p5beta1";
+
+// Asset service definition.
+service AssetService {
+ option (google.api.default_host) = "cloudasset.googleapis.com";
+ option (google.api.oauth_scopes) =
+ "https://www.googleapis.com/auth/cloud-platform";
+
+ // Lists assets with time and resource types and returns paged results in
+ // response.
+ rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) {
+ option (google.api.http) = {
+ get: "/v1p5beta1/{parent=*/*}/assets"
+ };
+ }
+}
+
+// ListAssets request.
+message ListAssetsRequest {
+ // Required. Name of the organization or project the assets belong to. Format:
+ // "organizations/[organization-number]" (such as "organizations/123"),
+ // "projects/[project-number]" (such as "projects/my-project-id"), or
+ // "projects/[project-id]" (such as "projects/12345").
+ string parent = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Timestamp to take an asset snapshot. This can only be set to a timestamp
+ // between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+ // the current time will be used. Due to delays in resource data collection
+ // and indexing, there is a volatile window during which running the same
+ // query may get different results.
+ google.protobuf.Timestamp read_time = 2;
+
+ // A list of asset types of which to take a snapshot for. For example:
+ // "compute.googleapis.com/Disk". If specified, only matching assets will be
+ // returned. See [Introduction to Cloud Asset
+ // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+ // for all supported asset types.
+ repeated string asset_types = 3;
+
+ // Asset content type. If not specified, no content but the asset name will
+ // be returned.
+ ContentType content_type = 4;
+
+ // The maximum number of assets to be returned in a single response. Default
+ // is 100, minimum is 1, and maximum is 1000.
+ int32 page_size = 5;
+
+ // The `next_page_token` returned from the previous `ListAssetsResponse`, or
+ // unspecified for the first `ListAssetsRequest`. It is a continuation of a
+ // prior `ListAssets` call, and the API should return the next page of assets.
+ string page_token = 6;
+}
+
+// Asset content type.
+enum ContentType {
+ // Unspecified content type.
+ CONTENT_TYPE_UNSPECIFIED = 0;
+
+ // Resource metadata.
+ RESOURCE = 1;
+
+ // The actual IAM policy set on a resource.
+ IAM_POLICY = 2;
+
+ // The Cloud Organization Policy set on an asset.
+ ORG_POLICY = 4;
+
+ // The Cloud Access context mananger Policy set on an asset.
+ ACCESS_POLICY = 5;
+}
+
+// ListAssets response.
+message ListAssetsResponse {
+ // Time the snapshot was taken.
+ google.protobuf.Timestamp read_time = 1;
+
+ // Assets.
+ repeated Asset assets = 2;
+
+ // Token to retrieve the next page of results. Set to empty if there are no
+ // remaining results.
+ string next_page_token = 3;
+}
diff --git a/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto b/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto
new file mode 100644
index 000000000..b9d1e1991
--- /dev/null
+++ b/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto
@@ -0,0 +1,127 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.asset.v1p5beta1;
+
+import "google/api/annotations.proto";
+import "google/api/resource.proto";
+import "google/cloud/orgpolicy/v1/orgpolicy.proto";
+import "google/iam/v1/policy.proto";
+import "google/identity/accesscontextmanager/v1/access_level.proto";
+import "google/identity/accesscontextmanager/v1/access_policy.proto";
+import "google/identity/accesscontextmanager/v1/service_perimeter.proto";
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Asset.V1p5Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1;asset";
+option java_multiple_files = true;
+option java_outer_classname = "AssetProto";
+option java_package = "com.google.cloud.asset.v1p5beta1";
+option php_namespace = "Google\\Cloud\\Asset\\V1p5beta1";
+
+// Cloud asset. This includes all Google Cloud Platform resources,
+// Cloud IAM policies, and other non-GCP assets.
+message Asset {
+ option (google.api.resource) = {
+ type: "cloudasset.googleapis.com/Asset"
+ pattern: "*"
+ };
+
+ // The full name of the asset. For example:
+ // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+ // See [Resource
+ // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // for more information.
+ string name = 1;
+
+ // Type of the asset. Example: "compute.googleapis.com/Disk".
+ string asset_type = 2;
+
+ // Representation of the resource.
+ Resource resource = 3;
+
+ // Representation of the actual Cloud IAM policy set on a cloud resource. For
+ // each resource, there must be at most one Cloud IAM policy set on it.
+ google.iam.v1.Policy iam_policy = 4;
+
+ // Representation of the Cloud Organization Policy set on an asset. For each
+ // asset, there could be multiple Organization policies with different
+ // constraints.
+ repeated google.cloud.orgpolicy.v1.Policy org_policy = 6;
+
+ // Representation of the Cloud Organization access policy.
+ oneof access_context_policy {
+ google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7;
+
+ google.identity.accesscontextmanager.v1.AccessLevel access_level = 8;
+
+ google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter =
+ 9;
+ }
+
+ // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+ // represented as a list of relative resource names. Ancestry path starts with
+ // the closest CRM ancestor and ends at root. If the asset is a CRM
+ // project/folder/organization, this starts from the asset itself.
+ //
+ // Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+ repeated string ancestors = 10;
+}
+
+// Representation of a cloud resource.
+message Resource {
+ // The API version. Example: "v1".
+ string version = 1;
+
+ // The URL of the discovery document containing the resource's JSON schema.
+ // For example:
+ // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+ // It will be left unspecified for resources without a discovery-based API,
+ // such as Cloud Bigtable.
+ string discovery_document_uri = 2;
+
+ // The JSON schema name listed in the discovery document.
+ // Example: "Project". It will be left unspecified for resources (such as
+ // Cloud Bigtable) without a discovery-based API.
+ string discovery_name = 3;
+
+ // The REST URL for accessing the resource. An HTTP GET operation using this
+ // URL returns the resource itself.
+ // Example:
+ // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+ // It will be left unspecified for resources without a REST API.
+ string resource_url = 4;
+
+ // The full name of the immediate parent of this resource. See
+ // [Resource
+ // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // for more information.
+ //
+ // For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+ // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+ // For example:
+ // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+ //
+ // For third-party assets, it is up to the users to define.
+ string parent = 5;
+
+ // The content of the resource, in which some sensitive fields are scrubbed
+ // away and may not be present.
+ google.protobuf.Struct data = 6;
+}
diff --git a/synth.metadata b/synth.metadata
index f8b0d9379..f5aa503e6 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,54 +4,62 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-asset.git",
- "sha": "5ea164b86c15ee444c285699e76ebc5ea2b64d62"
+ "sha": "0ff54327bffe1b7a74d822c78e90729f82a89956"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e",
- "internalRef": "317872667"
+ "sha": "4d8706453bf6016ebf1bb241d78b4dc58c92064d",
+ "internalRef": "320022685"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e",
- "internalRef": "317872667"
+ "sha": "4d8706453bf6016ebf1bb241d78b4dc58c92064d",
+ "internalRef": "320022685"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e",
- "internalRef": "317872667"
+ "sha": "4d8706453bf6016ebf1bb241d78b4dc58c92064d",
+ "internalRef": "320022685"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e",
- "internalRef": "317872667"
+ "sha": "4d8706453bf6016ebf1bb241d78b4dc58c92064d",
+ "internalRef": "320022685"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e",
- "internalRef": "317872667"
+ "sha": "4d8706453bf6016ebf1bb241d78b4dc58c92064d",
+ "internalRef": "320022685"
+ }
+ },
+ {
+ "git": {
+ "name": "googleapis",
+ "remote": "https://github.com/googleapis/googleapis.git",
+ "sha": "4d8706453bf6016ebf1bb241d78b4dc58c92064d",
+ "internalRef": "320022685"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
- "sha": "c4f3059c27591eb24d6942a0e357ec94c80459f2"
+ "sha": "d53e4b70cf091cba04362c2fac3cda0546121641"
}
}
],
@@ -100,6 +108,15 @@
"language": "java",
"generator": "bazel"
}
+ },
+ {
+ "client": {
+ "source": "googleapis",
+ "apiName": "asset",
+ "apiVersion": "v1p5beta1",
+ "language": "java",
+ "generator": "bazel"
+ }
}
]
}
\ No newline at end of file
diff --git a/synth.py b/synth.py
index e3445d4b8..ed6afd39b 100644
--- a/synth.py
+++ b/synth.py
@@ -19,7 +19,7 @@
AUTOSYNTH_MULTIPLE_COMMITS = True
service = 'asset'
-versions = ['v1', 'v1beta1', 'v1p2beta1', 'v1p1beta1', 'v1p4beta1']
+versions = ['v1', 'v1beta1', 'v1p2beta1', 'v1p1beta1', 'v1p4beta1', 'v1p5beta1']
for version in versions:
library = java.bazel_library(
diff --git a/versions.txt b/versions.txt
index 913796481..eae161770 100644
--- a/versions.txt
+++ b/versions.txt
@@ -6,9 +6,11 @@ proto-google-cloud-asset-v1p1beta1:0.89.0:0.89.1-SNAPSHOT
proto-google-cloud-asset-v1p2beta1:0.89.0:0.89.1-SNAPSHOT
proto-google-cloud-asset-v1beta1:0.89.0:0.89.1-SNAPSHOT
proto-google-cloud-asset-v1p4beta1:0.89.0:0.89.1-SNAPSHOT
+proto-google-cloud-asset-v1p5beta1:0.89.0:0.89.1-SNAPSHOT
grpc-google-cloud-asset-v1:1.4.0:1.4.1-SNAPSHOT
grpc-google-cloud-asset-v1beta1:0.89.0:0.89.1-SNAPSHOT
grpc-google-cloud-asset-v1p1beta1:0.89.0:0.89.1-SNAPSHOT
grpc-google-cloud-asset-v1p2beta1:0.89.0:0.89.1-SNAPSHOT
grpc-google-cloud-asset-v1p4beta1:0.89.0:0.89.1-SNAPSHOT
+grpc-google-cloud-asset-v1p5beta1:0.89.0:0.89.1-SNAPSHOT
google-cloud-asset:1.4.0:1.4.1-SNAPSHOT
\ No newline at end of file