com.google.cloud.securitycenter.v1.Resource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-securitycenter-v1 Show documentation
Show all versions of proto-google-cloud-securitycenter-v1 Show documentation
PROTO library for proto-google-cloud-securitycenter-v1
The newest version!
/*
* Copyright 2024 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/securitycenter/v1/resource.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.securitycenter.v1;
/**
*
*
*
* Information related to the Google Cloud resource.
*
*
* Protobuf type {@code google.cloud.securitycenter.v1.Resource}
*/
public final class Resource extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.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() {
name_ = "";
displayName_ = "";
type_ = "";
project_ = "";
projectDisplayName_ = "";
parent_ = "";
parentDisplayName_ = "";
folders_ = java.util.Collections.emptyList();
cloudProvider_ = 0;
organization_ = "";
service_ = "";
location_ = "";
resourcePathString_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Resource();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v1.ResourceProto
.internal_static_google_cloud_securitycenter_v1_Resource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v1.ResourceProto
.internal_static_google_cloud_securitycenter_v1_Resource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v1.Resource.class,
com.google.cloud.securitycenter.v1.Resource.Builder.class);
}
private int bitField0_;
private int cloudProviderMetadataCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object cloudProviderMetadata_;
public enum CloudProviderMetadataCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
AWS_METADATA(16),
AZURE_METADATA(17),
CLOUDPROVIDERMETADATA_NOT_SET(0);
private final int value;
private CloudProviderMetadataCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CloudProviderMetadataCase valueOf(int value) {
return forNumber(value);
}
public static CloudProviderMetadataCase forNumber(int value) {
switch (value) {
case 16:
return AWS_METADATA;
case 17:
return AZURE_METADATA;
case 0:
return CLOUDPROVIDERMETADATA_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public CloudProviderMetadataCase getCloudProviderMetadataCase() {
return CloudProviderMetadataCase.forNumber(cloudProviderMetadataCase_);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* The full resource name of the resource. See:
* https://cloud.google.com/apis/design/resource_names#full_resource_name
*
*
* 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 resource name of the resource. See:
* https://cloud.google.com/apis/design/resource_names#full_resource_name
*
*
* 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 DISPLAY_NAME_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* The human readable name of the resource.
*
*
* string display_name = 8;
*
* @return The displayName.
*/
@java.lang.Override
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
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();
displayName_ = s;
return s;
}
}
/**
*
*
*
* The human readable name of the resource.
*
*
* string display_name = 8;
*
* @return The bytes for displayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TYPE_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object type_ = "";
/**
*
*
*
* The full resource type of the resource.
*
*
* string type = 6;
*
* @return The type.
*/
@java.lang.Override
public java.lang.String getType() {
java.lang.Object ref = type_;
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();
type_ = s;
return s;
}
}
/**
*
*
*
* The full resource type of the resource.
*
*
* string type = 6;
*
* @return The bytes for type.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROJECT_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object project_ = "";
/**
*
*
*
* The full resource name of project that the resource belongs to.
*
*
* string project = 2;
*
* @return The project.
*/
@java.lang.Override
public java.lang.String getProject() {
java.lang.Object ref = project_;
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();
project_ = s;
return s;
}
}
/**
*
*
*
* The full resource name of project that the resource belongs to.
*
*
* string project = 2;
*
* @return The bytes for project.
*/
@java.lang.Override
public com.google.protobuf.ByteString getProjectBytes() {
java.lang.Object ref = project_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
project_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROJECT_DISPLAY_NAME_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object projectDisplayName_ = "";
/**
*
*
*
* The project ID that the resource belongs to.
*
*
* string project_display_name = 3;
*
* @return The projectDisplayName.
*/
@java.lang.Override
public java.lang.String getProjectDisplayName() {
java.lang.Object ref = projectDisplayName_;
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();
projectDisplayName_ = s;
return s;
}
}
/**
*
*
*
* The project ID that the resource belongs to.
*
*
* string project_display_name = 3;
*
* @return The bytes for projectDisplayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getProjectDisplayNameBytes() {
java.lang.Object ref = projectDisplayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
projectDisplayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PARENT_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object parent_ = "";
/**
*
*
*
* The full resource name of resource's parent.
*
*
* string parent = 4;
*
* @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 resource name of resource's parent.
*
*
* string parent = 4;
*
* @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 PARENT_DISPLAY_NAME_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object parentDisplayName_ = "";
/**
*
*
*
* The human readable name of resource's parent.
*
*
* string parent_display_name = 5;
*
* @return The parentDisplayName.
*/
@java.lang.Override
public java.lang.String getParentDisplayName() {
java.lang.Object ref = parentDisplayName_;
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();
parentDisplayName_ = s;
return s;
}
}
/**
*
*
*
* The human readable name of resource's parent.
*
*
* string parent_display_name = 5;
*
* @return The bytes for parentDisplayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getParentDisplayNameBytes() {
java.lang.Object ref = parentDisplayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
parentDisplayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FOLDERS_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private java.util.List folders_;
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public java.util.List getFoldersList() {
return folders_;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.securitycenter.v1.FolderOrBuilder>
getFoldersOrBuilderList() {
return folders_;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public int getFoldersCount() {
return folders_.size();
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.Folder getFolders(int index) {
return folders_.get(index);
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.FolderOrBuilder getFoldersOrBuilder(int index) {
return folders_.get(index);
}
public static final int CLOUD_PROVIDER_FIELD_NUMBER = 9;
private int cloudProvider_ = 0;
/**
*
*
*
* Indicates which cloud provider the resource resides in.
*
*
* .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 9;
*
* @return The enum numeric value on the wire for cloudProvider.
*/
@java.lang.Override
public int getCloudProviderValue() {
return cloudProvider_;
}
/**
*
*
*
* Indicates which cloud provider the resource resides in.
*
*
* .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 9;
*
* @return The cloudProvider.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.CloudProvider getCloudProvider() {
com.google.cloud.securitycenter.v1.CloudProvider result =
com.google.cloud.securitycenter.v1.CloudProvider.forNumber(cloudProvider_);
return result == null ? com.google.cloud.securitycenter.v1.CloudProvider.UNRECOGNIZED : result;
}
public static final int ORGANIZATION_FIELD_NUMBER = 10;
@SuppressWarnings("serial")
private volatile java.lang.Object organization_ = "";
/**
*
*
*
* Indicates which organization or tenant in the cloud provider the finding
* applies to.
*
*
* string organization = 10;
*
* @return The organization.
*/
@java.lang.Override
public java.lang.String getOrganization() {
java.lang.Object ref = organization_;
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();
organization_ = s;
return s;
}
}
/**
*
*
*
* Indicates which organization or tenant in the cloud provider the finding
* applies to.
*
*
* string organization = 10;
*
* @return The bytes for organization.
*/
@java.lang.Override
public com.google.protobuf.ByteString getOrganizationBytes() {
java.lang.Object ref = organization_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
organization_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SERVICE_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private volatile java.lang.Object service_ = "";
/**
*
*
*
* The parent service or product from which the resource is provided, for
* example, GKE or SNS.
*
*
* string service = 11;
*
* @return The service.
*/
@java.lang.Override
public java.lang.String getService() {
java.lang.Object ref = service_;
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();
service_ = s;
return s;
}
}
/**
*
*
*
* The parent service or product from which the resource is provided, for
* example, GKE or SNS.
*
*
* string service = 11;
*
* @return The bytes for service.
*/
@java.lang.Override
public com.google.protobuf.ByteString getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LOCATION_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
private volatile java.lang.Object location_ = "";
/**
*
*
*
* The region or location of the service (if applicable).
*
*
* string location = 12;
*
* @return The location.
*/
@java.lang.Override
public java.lang.String getLocation() {
java.lang.Object ref = location_;
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();
location_ = s;
return s;
}
}
/**
*
*
*
* The region or location of the service (if applicable).
*
*
* string location = 12;
*
* @return The bytes for location.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLocationBytes() {
java.lang.Object ref = location_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
location_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AWS_METADATA_FIELD_NUMBER = 16;
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*
* @return Whether the awsMetadata field is set.
*/
@java.lang.Override
public boolean hasAwsMetadata() {
return cloudProviderMetadataCase_ == 16;
}
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*
* @return The awsMetadata.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.AwsMetadata getAwsMetadata() {
if (cloudProviderMetadataCase_ == 16) {
return (com.google.cloud.securitycenter.v1.AwsMetadata) cloudProviderMetadata_;
}
return com.google.cloud.securitycenter.v1.AwsMetadata.getDefaultInstance();
}
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.AwsMetadataOrBuilder getAwsMetadataOrBuilder() {
if (cloudProviderMetadataCase_ == 16) {
return (com.google.cloud.securitycenter.v1.AwsMetadata) cloudProviderMetadata_;
}
return com.google.cloud.securitycenter.v1.AwsMetadata.getDefaultInstance();
}
public static final int AZURE_METADATA_FIELD_NUMBER = 17;
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*
* @return Whether the azureMetadata field is set.
*/
@java.lang.Override
public boolean hasAzureMetadata() {
return cloudProviderMetadataCase_ == 17;
}
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*
* @return The azureMetadata.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.AzureMetadata getAzureMetadata() {
if (cloudProviderMetadataCase_ == 17) {
return (com.google.cloud.securitycenter.v1.AzureMetadata) cloudProviderMetadata_;
}
return com.google.cloud.securitycenter.v1.AzureMetadata.getDefaultInstance();
}
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.AzureMetadataOrBuilder getAzureMetadataOrBuilder() {
if (cloudProviderMetadataCase_ == 17) {
return (com.google.cloud.securitycenter.v1.AzureMetadata) cloudProviderMetadata_;
}
return com.google.cloud.securitycenter.v1.AzureMetadata.getDefaultInstance();
}
public static final int RESOURCE_PATH_FIELD_NUMBER = 18;
private com.google.cloud.securitycenter.v1.ResourcePath resourcePath_;
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*
* @return Whether the resourcePath field is set.
*/
@java.lang.Override
public boolean hasResourcePath() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*
* @return The resourcePath.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.ResourcePath getResourcePath() {
return resourcePath_ == null
? com.google.cloud.securitycenter.v1.ResourcePath.getDefaultInstance()
: resourcePath_;
}
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.ResourcePathOrBuilder getResourcePathOrBuilder() {
return resourcePath_ == null
? com.google.cloud.securitycenter.v1.ResourcePath.getDefaultInstance()
: resourcePath_;
}
public static final int RESOURCE_PATH_STRING_FIELD_NUMBER = 19;
@SuppressWarnings("serial")
private volatile java.lang.Object resourcePathString_ = "";
/**
*
*
*
* A string representation of the resource path.
* For Google Cloud, it has the format of
* `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
* where there can be any number of folders.
* For AWS, it has the format of
* `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
* where there can be any number of organizational units.
* For Azure, it has the format of
* `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
* where there can be any number of management groups.
*
*
* string resource_path_string = 19;
*
* @return The resourcePathString.
*/
@java.lang.Override
public java.lang.String getResourcePathString() {
java.lang.Object ref = resourcePathString_;
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();
resourcePathString_ = s;
return s;
}
}
/**
*
*
*
* A string representation of the resource path.
* For Google Cloud, it has the format of
* `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
* where there can be any number of folders.
* For AWS, it has the format of
* `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
* where there can be any number of organizational units.
* For Azure, it has the format of
* `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
* where there can be any number of management groups.
*
*
* string resource_path_string = 19;
*
* @return The bytes for resourcePathString.
*/
@java.lang.Override
public com.google.protobuf.ByteString getResourcePathStringBytes() {
java.lang.Object ref = resourcePathString_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
resourcePathString_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectDisplayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, projectDisplayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDisplayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parentDisplayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, type_);
}
for (int i = 0; i < folders_.size(); i++) {
output.writeMessage(7, folders_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, displayName_);
}
if (cloudProvider_
!= com.google.cloud.securitycenter.v1.CloudProvider.CLOUD_PROVIDER_UNSPECIFIED
.getNumber()) {
output.writeEnum(9, cloudProvider_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, organization_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, service_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, location_);
}
if (cloudProviderMetadataCase_ == 16) {
output.writeMessage(
16, (com.google.cloud.securitycenter.v1.AwsMetadata) cloudProviderMetadata_);
}
if (cloudProviderMetadataCase_ == 17) {
output.writeMessage(
17, (com.google.cloud.securitycenter.v1.AzureMetadata) cloudProviderMetadata_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(18, getResourcePath());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourcePathString_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 19, resourcePathString_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectDisplayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, projectDisplayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDisplayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parentDisplayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, type_);
}
for (int i = 0; i < folders_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, folders_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, displayName_);
}
if (cloudProvider_
!= com.google.cloud.securitycenter.v1.CloudProvider.CLOUD_PROVIDER_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, cloudProvider_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, organization_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, service_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, location_);
}
if (cloudProviderMetadataCase_ == 16) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
16, (com.google.cloud.securitycenter.v1.AwsMetadata) cloudProviderMetadata_);
}
if (cloudProviderMetadataCase_ == 17) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
17, (com.google.cloud.securitycenter.v1.AzureMetadata) cloudProviderMetadata_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getResourcePath());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourcePathString_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, resourcePathString_);
}
size += getUnknownFields().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.securitycenter.v1.Resource)) {
return super.equals(obj);
}
com.google.cloud.securitycenter.v1.Resource other =
(com.google.cloud.securitycenter.v1.Resource) obj;
if (!getName().equals(other.getName())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getType().equals(other.getType())) return false;
if (!getProject().equals(other.getProject())) return false;
if (!getProjectDisplayName().equals(other.getProjectDisplayName())) return false;
if (!getParent().equals(other.getParent())) return false;
if (!getParentDisplayName().equals(other.getParentDisplayName())) return false;
if (!getFoldersList().equals(other.getFoldersList())) return false;
if (cloudProvider_ != other.cloudProvider_) return false;
if (!getOrganization().equals(other.getOrganization())) return false;
if (!getService().equals(other.getService())) return false;
if (!getLocation().equals(other.getLocation())) return false;
if (hasResourcePath() != other.hasResourcePath()) return false;
if (hasResourcePath()) {
if (!getResourcePath().equals(other.getResourcePath())) return false;
}
if (!getResourcePathString().equals(other.getResourcePathString())) return false;
if (!getCloudProviderMetadataCase().equals(other.getCloudProviderMetadataCase())) return false;
switch (cloudProviderMetadataCase_) {
case 16:
if (!getAwsMetadata().equals(other.getAwsMetadata())) return false;
break;
case 17:
if (!getAzureMetadata().equals(other.getAzureMetadata())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
hash = (37 * hash) + PROJECT_FIELD_NUMBER;
hash = (53 * hash) + getProject().hashCode();
hash = (37 * hash) + PROJECT_DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getProjectDisplayName().hashCode();
hash = (37 * hash) + PARENT_FIELD_NUMBER;
hash = (53 * hash) + getParent().hashCode();
hash = (37 * hash) + PARENT_DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getParentDisplayName().hashCode();
if (getFoldersCount() > 0) {
hash = (37 * hash) + FOLDERS_FIELD_NUMBER;
hash = (53 * hash) + getFoldersList().hashCode();
}
hash = (37 * hash) + CLOUD_PROVIDER_FIELD_NUMBER;
hash = (53 * hash) + cloudProvider_;
hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER;
hash = (53 * hash) + getOrganization().hashCode();
hash = (37 * hash) + SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getService().hashCode();
hash = (37 * hash) + LOCATION_FIELD_NUMBER;
hash = (53 * hash) + getLocation().hashCode();
if (hasResourcePath()) {
hash = (37 * hash) + RESOURCE_PATH_FIELD_NUMBER;
hash = (53 * hash) + getResourcePath().hashCode();
}
hash = (37 * hash) + RESOURCE_PATH_STRING_FIELD_NUMBER;
hash = (53 * hash) + getResourcePathString().hashCode();
switch (cloudProviderMetadataCase_) {
case 16:
hash = (37 * hash) + AWS_METADATA_FIELD_NUMBER;
hash = (53 * hash) + getAwsMetadata().hashCode();
break;
case 17:
hash = (37 * hash) + AZURE_METADATA_FIELD_NUMBER;
hash = (53 * hash) + getAzureMetadata().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.securitycenter.v1.Resource parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v1.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.securitycenter.v1.Resource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v1.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.securitycenter.v1.Resource parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v1.Resource parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v1.Resource parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v1.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.securitycenter.v1.Resource parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v1.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.securitycenter.v1.Resource parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v1.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.securitycenter.v1.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;
}
/**
*
*
*
* Information related to the Google Cloud resource.
*
*
* Protobuf type {@code google.cloud.securitycenter.v1.Resource}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Resource)
com.google.cloud.securitycenter.v1.ResourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v1.ResourceProto
.internal_static_google_cloud_securitycenter_v1_Resource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v1.ResourceProto
.internal_static_google_cloud_securitycenter_v1_Resource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v1.Resource.class,
com.google.cloud.securitycenter.v1.Resource.Builder.class);
}
// Construct using com.google.cloud.securitycenter.v1.Resource.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getFoldersFieldBuilder();
getResourcePathFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
displayName_ = "";
type_ = "";
project_ = "";
projectDisplayName_ = "";
parent_ = "";
parentDisplayName_ = "";
if (foldersBuilder_ == null) {
folders_ = java.util.Collections.emptyList();
} else {
folders_ = null;
foldersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000080);
cloudProvider_ = 0;
organization_ = "";
service_ = "";
location_ = "";
if (awsMetadataBuilder_ != null) {
awsMetadataBuilder_.clear();
}
if (azureMetadataBuilder_ != null) {
azureMetadataBuilder_.clear();
}
resourcePath_ = null;
if (resourcePathBuilder_ != null) {
resourcePathBuilder_.dispose();
resourcePathBuilder_ = null;
}
resourcePathString_ = "";
cloudProviderMetadataCase_ = 0;
cloudProviderMetadata_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.securitycenter.v1.ResourceProto
.internal_static_google_cloud_securitycenter_v1_Resource_descriptor;
}
@java.lang.Override
public com.google.cloud.securitycenter.v1.Resource getDefaultInstanceForType() {
return com.google.cloud.securitycenter.v1.Resource.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.securitycenter.v1.Resource build() {
com.google.cloud.securitycenter.v1.Resource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.securitycenter.v1.Resource buildPartial() {
com.google.cloud.securitycenter.v1.Resource result =
new com.google.cloud.securitycenter.v1.Resource(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.securitycenter.v1.Resource result) {
if (foldersBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)) {
folders_ = java.util.Collections.unmodifiableList(folders_);
bitField0_ = (bitField0_ & ~0x00000080);
}
result.folders_ = folders_;
} else {
result.folders_ = foldersBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.securitycenter.v1.Resource result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.displayName_ = displayName_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.project_ = project_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.projectDisplayName_ = projectDisplayName_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.parent_ = parent_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.parentDisplayName_ = parentDisplayName_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.cloudProvider_ = cloudProvider_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.organization_ = organization_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.service_ = service_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.location_ = location_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00004000) != 0)) {
result.resourcePath_ =
resourcePathBuilder_ == null ? resourcePath_ : resourcePathBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00008000) != 0)) {
result.resourcePathString_ = resourcePathString_;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.google.cloud.securitycenter.v1.Resource result) {
result.cloudProviderMetadataCase_ = cloudProviderMetadataCase_;
result.cloudProviderMetadata_ = this.cloudProviderMetadata_;
if (cloudProviderMetadataCase_ == 16 && awsMetadataBuilder_ != null) {
result.cloudProviderMetadata_ = awsMetadataBuilder_.build();
}
if (cloudProviderMetadataCase_ == 17 && azureMetadataBuilder_ != null) {
result.cloudProviderMetadata_ = azureMetadataBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.securitycenter.v1.Resource) {
return mergeFrom((com.google.cloud.securitycenter.v1.Resource) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.securitycenter.v1.Resource other) {
if (other == com.google.cloud.securitycenter.v1.Resource.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getType().isEmpty()) {
type_ = other.type_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getProject().isEmpty()) {
project_ = other.project_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getProjectDisplayName().isEmpty()) {
projectDisplayName_ = other.projectDisplayName_;
bitField0_ |= 0x00000010;
onChanged();
}
if (!other.getParent().isEmpty()) {
parent_ = other.parent_;
bitField0_ |= 0x00000020;
onChanged();
}
if (!other.getParentDisplayName().isEmpty()) {
parentDisplayName_ = other.parentDisplayName_;
bitField0_ |= 0x00000040;
onChanged();
}
if (foldersBuilder_ == null) {
if (!other.folders_.isEmpty()) {
if (folders_.isEmpty()) {
folders_ = other.folders_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureFoldersIsMutable();
folders_.addAll(other.folders_);
}
onChanged();
}
} else {
if (!other.folders_.isEmpty()) {
if (foldersBuilder_.isEmpty()) {
foldersBuilder_.dispose();
foldersBuilder_ = null;
folders_ = other.folders_;
bitField0_ = (bitField0_ & ~0x00000080);
foldersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getFoldersFieldBuilder()
: null;
} else {
foldersBuilder_.addAllMessages(other.folders_);
}
}
}
if (other.cloudProvider_ != 0) {
setCloudProviderValue(other.getCloudProviderValue());
}
if (!other.getOrganization().isEmpty()) {
organization_ = other.organization_;
bitField0_ |= 0x00000200;
onChanged();
}
if (!other.getService().isEmpty()) {
service_ = other.service_;
bitField0_ |= 0x00000400;
onChanged();
}
if (!other.getLocation().isEmpty()) {
location_ = other.location_;
bitField0_ |= 0x00000800;
onChanged();
}
if (other.hasResourcePath()) {
mergeResourcePath(other.getResourcePath());
}
if (!other.getResourcePathString().isEmpty()) {
resourcePathString_ = other.resourcePathString_;
bitField0_ |= 0x00008000;
onChanged();
}
switch (other.getCloudProviderMetadataCase()) {
case AWS_METADATA:
{
mergeAwsMetadata(other.getAwsMetadata());
break;
}
case AZURE_METADATA:
{
mergeAzureMetadata(other.getAzureMetadata());
break;
}
case CLOUDPROVIDERMETADATA_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
project_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 18
case 26:
{
projectDisplayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 26
case 34:
{
parent_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 34
case 42:
{
parentDisplayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 42
case 50:
{
type_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 50
case 58:
{
com.google.cloud.securitycenter.v1.Folder m =
input.readMessage(
com.google.cloud.securitycenter.v1.Folder.parser(), extensionRegistry);
if (foldersBuilder_ == null) {
ensureFoldersIsMutable();
folders_.add(m);
} else {
foldersBuilder_.addMessage(m);
}
break;
} // case 58
case 66:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 66
case 72:
{
cloudProvider_ = input.readEnum();
bitField0_ |= 0x00000100;
break;
} // case 72
case 82:
{
organization_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000200;
break;
} // case 82
case 90:
{
service_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000400;
break;
} // case 90
case 98:
{
location_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000800;
break;
} // case 98
case 130:
{
input.readMessage(getAwsMetadataFieldBuilder().getBuilder(), extensionRegistry);
cloudProviderMetadataCase_ = 16;
break;
} // case 130
case 138:
{
input.readMessage(getAzureMetadataFieldBuilder().getBuilder(), extensionRegistry);
cloudProviderMetadataCase_ = 17;
break;
} // case 138
case 146:
{
input.readMessage(getResourcePathFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00004000;
break;
} // case 146
case 154:
{
resourcePathString_ = input.readStringRequireUtf8();
bitField0_ |= 0x00008000;
break;
} // case 154
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int cloudProviderMetadataCase_ = 0;
private java.lang.Object cloudProviderMetadata_;
public CloudProviderMetadataCase getCloudProviderMetadataCase() {
return CloudProviderMetadataCase.forNumber(cloudProviderMetadataCase_);
}
public Builder clearCloudProviderMetadata() {
cloudProviderMetadataCase_ = 0;
cloudProviderMetadata_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* The full resource name of the resource. See:
* https://cloud.google.com/apis/design/resource_names#full_resource_name
*
*
* 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 resource name of the resource. See:
* https://cloud.google.com/apis/design/resource_names#full_resource_name
*
*
* 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 resource name of the resource. See:
* https://cloud.google.com/apis/design/resource_names#full_resource_name
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The full resource name of the resource. See:
* https://cloud.google.com/apis/design/resource_names#full_resource_name
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The full resource name of the resource. See:
* https://cloud.google.com/apis/design/resource_names#full_resource_name
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
* The human readable name of the resource.
*
*
* string display_name = 8;
*
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The human readable name of the resource.
*
*
* string display_name = 8;
*
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The human readable name of the resource.
*
*
* string display_name = 8;
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The human readable name of the resource.
*
*
* string display_name = 8;
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The human readable name of the resource.
*
*
* string display_name = 8;
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object type_ = "";
/**
*
*
*
* The full resource type of the resource.
*
*
* string type = 6;
*
* @return The type.
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
type_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The full resource type of the resource.
*
*
* string type = 6;
*
* @return The bytes for type.
*/
public com.google.protobuf.ByteString getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The full resource type of the resource.
*
*
* string type = 6;
*
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The full resource type of the resource.
*
*
* string type = 6;
*
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = getDefaultInstance().getType();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* The full resource type of the resource.
*
*
* string type = 6;
*
* @param value The bytes for type to set.
* @return This builder for chaining.
*/
public Builder setTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
type_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object project_ = "";
/**
*
*
*
* The full resource name of project that the resource belongs to.
*
*
* string project = 2;
*
* @return The project.
*/
public java.lang.String getProject() {
java.lang.Object ref = project_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
project_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The full resource name of project that the resource belongs to.
*
*
* string project = 2;
*
* @return The bytes for project.
*/
public com.google.protobuf.ByteString getProjectBytes() {
java.lang.Object ref = project_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
project_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The full resource name of project that the resource belongs to.
*
*
* string project = 2;
*
* @param value The project to set.
* @return This builder for chaining.
*/
public Builder setProject(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
project_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The full resource name of project that the resource belongs to.
*
*
* string project = 2;
*
* @return This builder for chaining.
*/
public Builder clearProject() {
project_ = getDefaultInstance().getProject();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* The full resource name of project that the resource belongs to.
*
*
* string project = 2;
*
* @param value The bytes for project to set.
* @return This builder for chaining.
*/
public Builder setProjectBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
project_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object projectDisplayName_ = "";
/**
*
*
*
* The project ID that the resource belongs to.
*
*
* string project_display_name = 3;
*
* @return The projectDisplayName.
*/
public java.lang.String getProjectDisplayName() {
java.lang.Object ref = projectDisplayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
projectDisplayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The project ID that the resource belongs to.
*
*
* string project_display_name = 3;
*
* @return The bytes for projectDisplayName.
*/
public com.google.protobuf.ByteString getProjectDisplayNameBytes() {
java.lang.Object ref = projectDisplayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
projectDisplayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The project ID that the resource belongs to.
*
*
* string project_display_name = 3;
*
* @param value The projectDisplayName to set.
* @return This builder for chaining.
*/
public Builder setProjectDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
projectDisplayName_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The project ID that the resource belongs to.
*
*
* string project_display_name = 3;
*
* @return This builder for chaining.
*/
public Builder clearProjectDisplayName() {
projectDisplayName_ = getDefaultInstance().getProjectDisplayName();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* The project ID that the resource belongs to.
*
*
* string project_display_name = 3;
*
* @param value The bytes for projectDisplayName to set.
* @return This builder for chaining.
*/
public Builder setProjectDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
projectDisplayName_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private java.lang.Object parent_ = "";
/**
*
*
*
* The full resource name of resource's parent.
*
*
* string parent = 4;
*
* @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 resource name of resource's parent.
*
*
* string parent = 4;
*
* @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 resource name of resource's parent.
*
*
* string parent = 4;
*
* @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;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The full resource name of resource's parent.
*
*
* string parent = 4;
*
* @return This builder for chaining.
*/
public Builder clearParent() {
parent_ = getDefaultInstance().getParent();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*
*
* The full resource name of resource's parent.
*
*
* string parent = 4;
*
* @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;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
private java.lang.Object parentDisplayName_ = "";
/**
*
*
*
* The human readable name of resource's parent.
*
*
* string parent_display_name = 5;
*
* @return The parentDisplayName.
*/
public java.lang.String getParentDisplayName() {
java.lang.Object ref = parentDisplayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
parentDisplayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The human readable name of resource's parent.
*
*
* string parent_display_name = 5;
*
* @return The bytes for parentDisplayName.
*/
public com.google.protobuf.ByteString getParentDisplayNameBytes() {
java.lang.Object ref = parentDisplayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
parentDisplayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The human readable name of resource's parent.
*
*
* string parent_display_name = 5;
*
* @param value The parentDisplayName to set.
* @return This builder for chaining.
*/
public Builder setParentDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
parentDisplayName_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* The human readable name of resource's parent.
*
*
* string parent_display_name = 5;
*
* @return This builder for chaining.
*/
public Builder clearParentDisplayName() {
parentDisplayName_ = getDefaultInstance().getParentDisplayName();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
*
*
* The human readable name of resource's parent.
*
*
* string parent_display_name = 5;
*
* @param value The bytes for parentDisplayName to set.
* @return This builder for chaining.
*/
public Builder setParentDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
parentDisplayName_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private java.util.List folders_ =
java.util.Collections.emptyList();
private void ensureFoldersIsMutable() {
if (!((bitField0_ & 0x00000080) != 0)) {
folders_ = new java.util.ArrayList(folders_);
bitField0_ |= 0x00000080;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.securitycenter.v1.Folder,
com.google.cloud.securitycenter.v1.Folder.Builder,
com.google.cloud.securitycenter.v1.FolderOrBuilder>
foldersBuilder_;
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public java.util.List getFoldersList() {
if (foldersBuilder_ == null) {
return java.util.Collections.unmodifiableList(folders_);
} else {
return foldersBuilder_.getMessageList();
}
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public int getFoldersCount() {
if (foldersBuilder_ == null) {
return folders_.size();
} else {
return foldersBuilder_.getCount();
}
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.securitycenter.v1.Folder getFolders(int index) {
if (foldersBuilder_ == null) {
return folders_.get(index);
} else {
return foldersBuilder_.getMessage(index);
}
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setFolders(int index, com.google.cloud.securitycenter.v1.Folder value) {
if (foldersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFoldersIsMutable();
folders_.set(index, value);
onChanged();
} else {
foldersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setFolders(
int index, com.google.cloud.securitycenter.v1.Folder.Builder builderForValue) {
if (foldersBuilder_ == null) {
ensureFoldersIsMutable();
folders_.set(index, builderForValue.build());
onChanged();
} else {
foldersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addFolders(com.google.cloud.securitycenter.v1.Folder value) {
if (foldersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFoldersIsMutable();
folders_.add(value);
onChanged();
} else {
foldersBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addFolders(int index, com.google.cloud.securitycenter.v1.Folder value) {
if (foldersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFoldersIsMutable();
folders_.add(index, value);
onChanged();
} else {
foldersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addFolders(com.google.cloud.securitycenter.v1.Folder.Builder builderForValue) {
if (foldersBuilder_ == null) {
ensureFoldersIsMutable();
folders_.add(builderForValue.build());
onChanged();
} else {
foldersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addFolders(
int index, com.google.cloud.securitycenter.v1.Folder.Builder builderForValue) {
if (foldersBuilder_ == null) {
ensureFoldersIsMutable();
folders_.add(index, builderForValue.build());
onChanged();
} else {
foldersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addAllFolders(
java.lang.Iterable extends com.google.cloud.securitycenter.v1.Folder> values) {
if (foldersBuilder_ == null) {
ensureFoldersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, folders_);
onChanged();
} else {
foldersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearFolders() {
if (foldersBuilder_ == null) {
folders_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
} else {
foldersBuilder_.clear();
}
return this;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder removeFolders(int index) {
if (foldersBuilder_ == null) {
ensureFoldersIsMutable();
folders_.remove(index);
onChanged();
} else {
foldersBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.securitycenter.v1.Folder.Builder getFoldersBuilder(int index) {
return getFoldersFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.securitycenter.v1.FolderOrBuilder getFoldersOrBuilder(int index) {
if (foldersBuilder_ == null) {
return folders_.get(index);
} else {
return foldersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public java.util.List extends com.google.cloud.securitycenter.v1.FolderOrBuilder>
getFoldersOrBuilderList() {
if (foldersBuilder_ != null) {
return foldersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(folders_);
}
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.securitycenter.v1.Folder.Builder addFoldersBuilder() {
return getFoldersFieldBuilder()
.addBuilder(com.google.cloud.securitycenter.v1.Folder.getDefaultInstance());
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.securitycenter.v1.Folder.Builder addFoldersBuilder(int index) {
return getFoldersFieldBuilder()
.addBuilder(index, com.google.cloud.securitycenter.v1.Folder.getDefaultInstance());
}
/**
*
*
*
* Output only. Contains a Folder message for each folder in the assets
* ancestry. The first folder is the deepest nested folder, and the last
* folder is the folder directly under the Organization.
*
*
*
* repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public java.util.List
getFoldersBuilderList() {
return getFoldersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.securitycenter.v1.Folder,
com.google.cloud.securitycenter.v1.Folder.Builder,
com.google.cloud.securitycenter.v1.FolderOrBuilder>
getFoldersFieldBuilder() {
if (foldersBuilder_ == null) {
foldersBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.securitycenter.v1.Folder,
com.google.cloud.securitycenter.v1.Folder.Builder,
com.google.cloud.securitycenter.v1.FolderOrBuilder>(
folders_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean());
folders_ = null;
}
return foldersBuilder_;
}
private int cloudProvider_ = 0;
/**
*
*
*
* Indicates which cloud provider the resource resides in.
*
*
* .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 9;
*
* @return The enum numeric value on the wire for cloudProvider.
*/
@java.lang.Override
public int getCloudProviderValue() {
return cloudProvider_;
}
/**
*
*
*
* Indicates which cloud provider the resource resides in.
*
*
* .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 9;
*
* @param value The enum numeric value on the wire for cloudProvider to set.
* @return This builder for chaining.
*/
public Builder setCloudProviderValue(int value) {
cloudProvider_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Indicates which cloud provider the resource resides in.
*
*
* .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 9;
*
* @return The cloudProvider.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.CloudProvider getCloudProvider() {
com.google.cloud.securitycenter.v1.CloudProvider result =
com.google.cloud.securitycenter.v1.CloudProvider.forNumber(cloudProvider_);
return result == null
? com.google.cloud.securitycenter.v1.CloudProvider.UNRECOGNIZED
: result;
}
/**
*
*
*
* Indicates which cloud provider the resource resides in.
*
*
* .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 9;
*
* @param value The cloudProvider to set.
* @return This builder for chaining.
*/
public Builder setCloudProvider(com.google.cloud.securitycenter.v1.CloudProvider value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000100;
cloudProvider_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Indicates which cloud provider the resource resides in.
*
*
* .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 9;
*
* @return This builder for chaining.
*/
public Builder clearCloudProvider() {
bitField0_ = (bitField0_ & ~0x00000100);
cloudProvider_ = 0;
onChanged();
return this;
}
private java.lang.Object organization_ = "";
/**
*
*
*
* Indicates which organization or tenant in the cloud provider the finding
* applies to.
*
*
* string organization = 10;
*
* @return The organization.
*/
public java.lang.String getOrganization() {
java.lang.Object ref = organization_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
organization_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Indicates which organization or tenant in the cloud provider the finding
* applies to.
*
*
* string organization = 10;
*
* @return The bytes for organization.
*/
public com.google.protobuf.ByteString getOrganizationBytes() {
java.lang.Object ref = organization_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
organization_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Indicates which organization or tenant in the cloud provider the finding
* applies to.
*
*
* string organization = 10;
*
* @param value The organization to set.
* @return This builder for chaining.
*/
public Builder setOrganization(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
organization_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Indicates which organization or tenant in the cloud provider the finding
* applies to.
*
*
* string organization = 10;
*
* @return This builder for chaining.
*/
public Builder clearOrganization() {
organization_ = getDefaultInstance().getOrganization();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
*
*
*
* Indicates which organization or tenant in the cloud provider the finding
* applies to.
*
*
* string organization = 10;
*
* @param value The bytes for organization to set.
* @return This builder for chaining.
*/
public Builder setOrganizationBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
organization_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
private java.lang.Object service_ = "";
/**
*
*
*
* The parent service or product from which the resource is provided, for
* example, GKE or SNS.
*
*
* string service = 11;
*
* @return The service.
*/
public java.lang.String getService() {
java.lang.Object ref = service_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
service_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The parent service or product from which the resource is provided, for
* example, GKE or SNS.
*
*
* string service = 11;
*
* @return The bytes for service.
*/
public com.google.protobuf.ByteString getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The parent service or product from which the resource is provided, for
* example, GKE or SNS.
*
*
* string service = 11;
*
* @param value The service to set.
* @return This builder for chaining.
*/
public Builder setService(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
service_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* The parent service or product from which the resource is provided, for
* example, GKE or SNS.
*
*
* string service = 11;
*
* @return This builder for chaining.
*/
public Builder clearService() {
service_ = getDefaultInstance().getService();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
/**
*
*
*
* The parent service or product from which the resource is provided, for
* example, GKE or SNS.
*
*
* string service = 11;
*
* @param value The bytes for service to set.
* @return This builder for chaining.
*/
public Builder setServiceBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
service_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
private java.lang.Object location_ = "";
/**
*
*
*
* The region or location of the service (if applicable).
*
*
* string location = 12;
*
* @return The location.
*/
public java.lang.String getLocation() {
java.lang.Object ref = location_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
location_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The region or location of the service (if applicable).
*
*
* string location = 12;
*
* @return The bytes for location.
*/
public com.google.protobuf.ByteString getLocationBytes() {
java.lang.Object ref = location_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
location_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The region or location of the service (if applicable).
*
*
* string location = 12;
*
* @param value The location to set.
* @return This builder for chaining.
*/
public Builder setLocation(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
location_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* The region or location of the service (if applicable).
*
*
* string location = 12;
*
* @return This builder for chaining.
*/
public Builder clearLocation() {
location_ = getDefaultInstance().getLocation();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
return this;
}
/**
*
*
*
* The region or location of the service (if applicable).
*
*
* string location = 12;
*
* @param value The bytes for location to set.
* @return This builder for chaining.
*/
public Builder setLocationBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
location_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v1.AwsMetadata,
com.google.cloud.securitycenter.v1.AwsMetadata.Builder,
com.google.cloud.securitycenter.v1.AwsMetadataOrBuilder>
awsMetadataBuilder_;
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*
* @return Whether the awsMetadata field is set.
*/
@java.lang.Override
public boolean hasAwsMetadata() {
return cloudProviderMetadataCase_ == 16;
}
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*
* @return The awsMetadata.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.AwsMetadata getAwsMetadata() {
if (awsMetadataBuilder_ == null) {
if (cloudProviderMetadataCase_ == 16) {
return (com.google.cloud.securitycenter.v1.AwsMetadata) cloudProviderMetadata_;
}
return com.google.cloud.securitycenter.v1.AwsMetadata.getDefaultInstance();
} else {
if (cloudProviderMetadataCase_ == 16) {
return awsMetadataBuilder_.getMessage();
}
return com.google.cloud.securitycenter.v1.AwsMetadata.getDefaultInstance();
}
}
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*/
public Builder setAwsMetadata(com.google.cloud.securitycenter.v1.AwsMetadata value) {
if (awsMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cloudProviderMetadata_ = value;
onChanged();
} else {
awsMetadataBuilder_.setMessage(value);
}
cloudProviderMetadataCase_ = 16;
return this;
}
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*/
public Builder setAwsMetadata(
com.google.cloud.securitycenter.v1.AwsMetadata.Builder builderForValue) {
if (awsMetadataBuilder_ == null) {
cloudProviderMetadata_ = builderForValue.build();
onChanged();
} else {
awsMetadataBuilder_.setMessage(builderForValue.build());
}
cloudProviderMetadataCase_ = 16;
return this;
}
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*/
public Builder mergeAwsMetadata(com.google.cloud.securitycenter.v1.AwsMetadata value) {
if (awsMetadataBuilder_ == null) {
if (cloudProviderMetadataCase_ == 16
&& cloudProviderMetadata_
!= com.google.cloud.securitycenter.v1.AwsMetadata.getDefaultInstance()) {
cloudProviderMetadata_ =
com.google.cloud.securitycenter.v1.AwsMetadata.newBuilder(
(com.google.cloud.securitycenter.v1.AwsMetadata) cloudProviderMetadata_)
.mergeFrom(value)
.buildPartial();
} else {
cloudProviderMetadata_ = value;
}
onChanged();
} else {
if (cloudProviderMetadataCase_ == 16) {
awsMetadataBuilder_.mergeFrom(value);
} else {
awsMetadataBuilder_.setMessage(value);
}
}
cloudProviderMetadataCase_ = 16;
return this;
}
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*/
public Builder clearAwsMetadata() {
if (awsMetadataBuilder_ == null) {
if (cloudProviderMetadataCase_ == 16) {
cloudProviderMetadataCase_ = 0;
cloudProviderMetadata_ = null;
onChanged();
}
} else {
if (cloudProviderMetadataCase_ == 16) {
cloudProviderMetadataCase_ = 0;
cloudProviderMetadata_ = null;
}
awsMetadataBuilder_.clear();
}
return this;
}
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*/
public com.google.cloud.securitycenter.v1.AwsMetadata.Builder getAwsMetadataBuilder() {
return getAwsMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.AwsMetadataOrBuilder getAwsMetadataOrBuilder() {
if ((cloudProviderMetadataCase_ == 16) && (awsMetadataBuilder_ != null)) {
return awsMetadataBuilder_.getMessageOrBuilder();
} else {
if (cloudProviderMetadataCase_ == 16) {
return (com.google.cloud.securitycenter.v1.AwsMetadata) cloudProviderMetadata_;
}
return com.google.cloud.securitycenter.v1.AwsMetadata.getDefaultInstance();
}
}
/**
*
*
*
* The AWS metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AwsMetadata aws_metadata = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v1.AwsMetadata,
com.google.cloud.securitycenter.v1.AwsMetadata.Builder,
com.google.cloud.securitycenter.v1.AwsMetadataOrBuilder>
getAwsMetadataFieldBuilder() {
if (awsMetadataBuilder_ == null) {
if (!(cloudProviderMetadataCase_ == 16)) {
cloudProviderMetadata_ =
com.google.cloud.securitycenter.v1.AwsMetadata.getDefaultInstance();
}
awsMetadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v1.AwsMetadata,
com.google.cloud.securitycenter.v1.AwsMetadata.Builder,
com.google.cloud.securitycenter.v1.AwsMetadataOrBuilder>(
(com.google.cloud.securitycenter.v1.AwsMetadata) cloudProviderMetadata_,
getParentForChildren(),
isClean());
cloudProviderMetadata_ = null;
}
cloudProviderMetadataCase_ = 16;
onChanged();
return awsMetadataBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v1.AzureMetadata,
com.google.cloud.securitycenter.v1.AzureMetadata.Builder,
com.google.cloud.securitycenter.v1.AzureMetadataOrBuilder>
azureMetadataBuilder_;
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*
* @return Whether the azureMetadata field is set.
*/
@java.lang.Override
public boolean hasAzureMetadata() {
return cloudProviderMetadataCase_ == 17;
}
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*
* @return The azureMetadata.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.AzureMetadata getAzureMetadata() {
if (azureMetadataBuilder_ == null) {
if (cloudProviderMetadataCase_ == 17) {
return (com.google.cloud.securitycenter.v1.AzureMetadata) cloudProviderMetadata_;
}
return com.google.cloud.securitycenter.v1.AzureMetadata.getDefaultInstance();
} else {
if (cloudProviderMetadataCase_ == 17) {
return azureMetadataBuilder_.getMessage();
}
return com.google.cloud.securitycenter.v1.AzureMetadata.getDefaultInstance();
}
}
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*/
public Builder setAzureMetadata(com.google.cloud.securitycenter.v1.AzureMetadata value) {
if (azureMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cloudProviderMetadata_ = value;
onChanged();
} else {
azureMetadataBuilder_.setMessage(value);
}
cloudProviderMetadataCase_ = 17;
return this;
}
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*/
public Builder setAzureMetadata(
com.google.cloud.securitycenter.v1.AzureMetadata.Builder builderForValue) {
if (azureMetadataBuilder_ == null) {
cloudProviderMetadata_ = builderForValue.build();
onChanged();
} else {
azureMetadataBuilder_.setMessage(builderForValue.build());
}
cloudProviderMetadataCase_ = 17;
return this;
}
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*/
public Builder mergeAzureMetadata(com.google.cloud.securitycenter.v1.AzureMetadata value) {
if (azureMetadataBuilder_ == null) {
if (cloudProviderMetadataCase_ == 17
&& cloudProviderMetadata_
!= com.google.cloud.securitycenter.v1.AzureMetadata.getDefaultInstance()) {
cloudProviderMetadata_ =
com.google.cloud.securitycenter.v1.AzureMetadata.newBuilder(
(com.google.cloud.securitycenter.v1.AzureMetadata) cloudProviderMetadata_)
.mergeFrom(value)
.buildPartial();
} else {
cloudProviderMetadata_ = value;
}
onChanged();
} else {
if (cloudProviderMetadataCase_ == 17) {
azureMetadataBuilder_.mergeFrom(value);
} else {
azureMetadataBuilder_.setMessage(value);
}
}
cloudProviderMetadataCase_ = 17;
return this;
}
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*/
public Builder clearAzureMetadata() {
if (azureMetadataBuilder_ == null) {
if (cloudProviderMetadataCase_ == 17) {
cloudProviderMetadataCase_ = 0;
cloudProviderMetadata_ = null;
onChanged();
}
} else {
if (cloudProviderMetadataCase_ == 17) {
cloudProviderMetadataCase_ = 0;
cloudProviderMetadata_ = null;
}
azureMetadataBuilder_.clear();
}
return this;
}
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*/
public com.google.cloud.securitycenter.v1.AzureMetadata.Builder getAzureMetadataBuilder() {
return getAzureMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*/
@java.lang.Override
public com.google.cloud.securitycenter.v1.AzureMetadataOrBuilder getAzureMetadataOrBuilder() {
if ((cloudProviderMetadataCase_ == 17) && (azureMetadataBuilder_ != null)) {
return azureMetadataBuilder_.getMessageOrBuilder();
} else {
if (cloudProviderMetadataCase_ == 17) {
return (com.google.cloud.securitycenter.v1.AzureMetadata) cloudProviderMetadata_;
}
return com.google.cloud.securitycenter.v1.AzureMetadata.getDefaultInstance();
}
}
/**
*
*
*
* The Azure metadata associated with the finding.
*
*
* .google.cloud.securitycenter.v1.AzureMetadata azure_metadata = 17;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v1.AzureMetadata,
com.google.cloud.securitycenter.v1.AzureMetadata.Builder,
com.google.cloud.securitycenter.v1.AzureMetadataOrBuilder>
getAzureMetadataFieldBuilder() {
if (azureMetadataBuilder_ == null) {
if (!(cloudProviderMetadataCase_ == 17)) {
cloudProviderMetadata_ =
com.google.cloud.securitycenter.v1.AzureMetadata.getDefaultInstance();
}
azureMetadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v1.AzureMetadata,
com.google.cloud.securitycenter.v1.AzureMetadata.Builder,
com.google.cloud.securitycenter.v1.AzureMetadataOrBuilder>(
(com.google.cloud.securitycenter.v1.AzureMetadata) cloudProviderMetadata_,
getParentForChildren(),
isClean());
cloudProviderMetadata_ = null;
}
cloudProviderMetadataCase_ = 17;
onChanged();
return azureMetadataBuilder_;
}
private com.google.cloud.securitycenter.v1.ResourcePath resourcePath_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v1.ResourcePath,
com.google.cloud.securitycenter.v1.ResourcePath.Builder,
com.google.cloud.securitycenter.v1.ResourcePathOrBuilder>
resourcePathBuilder_;
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*
* @return Whether the resourcePath field is set.
*/
public boolean hasResourcePath() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*
* @return The resourcePath.
*/
public com.google.cloud.securitycenter.v1.ResourcePath getResourcePath() {
if (resourcePathBuilder_ == null) {
return resourcePath_ == null
? com.google.cloud.securitycenter.v1.ResourcePath.getDefaultInstance()
: resourcePath_;
} else {
return resourcePathBuilder_.getMessage();
}
}
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*/
public Builder setResourcePath(com.google.cloud.securitycenter.v1.ResourcePath value) {
if (resourcePathBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
resourcePath_ = value;
} else {
resourcePathBuilder_.setMessage(value);
}
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*/
public Builder setResourcePath(
com.google.cloud.securitycenter.v1.ResourcePath.Builder builderForValue) {
if (resourcePathBuilder_ == null) {
resourcePath_ = builderForValue.build();
} else {
resourcePathBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*/
public Builder mergeResourcePath(com.google.cloud.securitycenter.v1.ResourcePath value) {
if (resourcePathBuilder_ == null) {
if (((bitField0_ & 0x00004000) != 0)
&& resourcePath_ != null
&& resourcePath_
!= com.google.cloud.securitycenter.v1.ResourcePath.getDefaultInstance()) {
getResourcePathBuilder().mergeFrom(value);
} else {
resourcePath_ = value;
}
} else {
resourcePathBuilder_.mergeFrom(value);
}
if (resourcePath_ != null) {
bitField0_ |= 0x00004000;
onChanged();
}
return this;
}
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*/
public Builder clearResourcePath() {
bitField0_ = (bitField0_ & ~0x00004000);
resourcePath_ = null;
if (resourcePathBuilder_ != null) {
resourcePathBuilder_.dispose();
resourcePathBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*/
public com.google.cloud.securitycenter.v1.ResourcePath.Builder getResourcePathBuilder() {
bitField0_ |= 0x00004000;
onChanged();
return getResourcePathFieldBuilder().getBuilder();
}
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*/
public com.google.cloud.securitycenter.v1.ResourcePathOrBuilder getResourcePathOrBuilder() {
if (resourcePathBuilder_ != null) {
return resourcePathBuilder_.getMessageOrBuilder();
} else {
return resourcePath_ == null
? com.google.cloud.securitycenter.v1.ResourcePath.getDefaultInstance()
: resourcePath_;
}
}
/**
*
*
*
* Provides the path to the resource within the resource hierarchy.
*
*
* .google.cloud.securitycenter.v1.ResourcePath resource_path = 18;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v1.ResourcePath,
com.google.cloud.securitycenter.v1.ResourcePath.Builder,
com.google.cloud.securitycenter.v1.ResourcePathOrBuilder>
getResourcePathFieldBuilder() {
if (resourcePathBuilder_ == null) {
resourcePathBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v1.ResourcePath,
com.google.cloud.securitycenter.v1.ResourcePath.Builder,
com.google.cloud.securitycenter.v1.ResourcePathOrBuilder>(
getResourcePath(), getParentForChildren(), isClean());
resourcePath_ = null;
}
return resourcePathBuilder_;
}
private java.lang.Object resourcePathString_ = "";
/**
*
*
*
* A string representation of the resource path.
* For Google Cloud, it has the format of
* `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
* where there can be any number of folders.
* For AWS, it has the format of
* `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
* where there can be any number of organizational units.
* For Azure, it has the format of
* `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
* where there can be any number of management groups.
*
*
* string resource_path_string = 19;
*
* @return The resourcePathString.
*/
public java.lang.String getResourcePathString() {
java.lang.Object ref = resourcePathString_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourcePathString_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* A string representation of the resource path.
* For Google Cloud, it has the format of
* `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
* where there can be any number of folders.
* For AWS, it has the format of
* `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
* where there can be any number of organizational units.
* For Azure, it has the format of
* `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
* where there can be any number of management groups.
*
*
* string resource_path_string = 19;
*
* @return The bytes for resourcePathString.
*/
public com.google.protobuf.ByteString getResourcePathStringBytes() {
java.lang.Object ref = resourcePathString_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
resourcePathString_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* A string representation of the resource path.
* For Google Cloud, it has the format of
* `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
* where there can be any number of folders.
* For AWS, it has the format of
* `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
* where there can be any number of organizational units.
* For Azure, it has the format of
* `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
* where there can be any number of management groups.
*
*
* string resource_path_string = 19;
*
* @param value The resourcePathString to set.
* @return This builder for chaining.
*/
public Builder setResourcePathString(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
resourcePathString_ = value;
bitField0_ |= 0x00008000;
onChanged();
return this;
}
/**
*
*
*
* A string representation of the resource path.
* For Google Cloud, it has the format of
* `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
* where there can be any number of folders.
* For AWS, it has the format of
* `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
* where there can be any number of organizational units.
* For Azure, it has the format of
* `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
* where there can be any number of management groups.
*
*
* string resource_path_string = 19;
*
* @return This builder for chaining.
*/
public Builder clearResourcePathString() {
resourcePathString_ = getDefaultInstance().getResourcePathString();
bitField0_ = (bitField0_ & ~0x00008000);
onChanged();
return this;
}
/**
*
*
*
* A string representation of the resource path.
* For Google Cloud, it has the format of
* `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
* where there can be any number of folders.
* For AWS, it has the format of
* `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
* where there can be any number of organizational units.
* For Azure, it has the format of
* `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
* where there can be any number of management groups.
*
*
* string resource_path_string = 19;
*
* @param value The bytes for resourcePathString to set.
* @return This builder for chaining.
*/
public Builder setResourcePathStringBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
resourcePathString_ = value;
bitField0_ |= 0x00008000;
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.securitycenter.v1.Resource)
}
// @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Resource)
private static final com.google.cloud.securitycenter.v1.Resource DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Resource();
}
public static com.google.cloud.securitycenter.v1.Resource getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Resource parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.securitycenter.v1.Resource getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy