com.google.cloud.securitycenter.v2.ResourcePath 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-v2 Show documentation
Show all versions of proto-google-cloud-securitycenter-v2 Show documentation
Proto library for google-cloud-securitycenter
/*
* 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/v2/resource.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.securitycenter.v2;
/**
*
*
*
* Represents the path of resources leading up to the resource this finding is
* about.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.ResourcePath}
*/
public final class ResourcePath extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.ResourcePath)
ResourcePathOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResourcePath.newBuilder() to construct.
private ResourcePath(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResourcePath() {
nodes_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ResourcePath();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_ResourcePath_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_ResourcePath_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.ResourcePath.class,
com.google.cloud.securitycenter.v2.ResourcePath.Builder.class);
}
/**
*
*
*
* The type of resource the node represents.
*
*
* Protobuf enum {@code google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType}
*/
public enum ResourcePathNodeType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Node type is unspecified.
*
*
* RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0;
*/
RESOURCE_PATH_NODE_TYPE_UNSPECIFIED(0),
/**
*
*
*
* The node represents a Google Cloud organization.
*
*
* GCP_ORGANIZATION = 1;
*/
GCP_ORGANIZATION(1),
/**
*
*
*
* The node represents a Google Cloud folder.
*
*
* GCP_FOLDER = 2;
*/
GCP_FOLDER(2),
/**
*
*
*
* The node represents a Google Cloud project.
*
*
* GCP_PROJECT = 3;
*/
GCP_PROJECT(3),
/**
*
*
*
* The node represents an AWS organization.
*
*
* AWS_ORGANIZATION = 4;
*/
AWS_ORGANIZATION(4),
/**
*
*
*
* The node represents an AWS organizational unit.
*
*
* AWS_ORGANIZATIONAL_UNIT = 5;
*/
AWS_ORGANIZATIONAL_UNIT(5),
/**
*
*
*
* The node represents an AWS account.
*
*
* AWS_ACCOUNT = 6;
*/
AWS_ACCOUNT(6),
/**
*
*
*
* The node represents an Azure management group.
*
*
* AZURE_MANAGEMENT_GROUP = 7;
*/
AZURE_MANAGEMENT_GROUP(7),
/**
*
*
*
* The node represents an Azure subscription.
*
*
* AZURE_SUBSCRIPTION = 8;
*/
AZURE_SUBSCRIPTION(8),
/**
*
*
*
* The node represents an Azure resource group.
*
*
* AZURE_RESOURCE_GROUP = 9;
*/
AZURE_RESOURCE_GROUP(9),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Node type is unspecified.
*
*
* RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0;
*/
public static final int RESOURCE_PATH_NODE_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The node represents a Google Cloud organization.
*
*
* GCP_ORGANIZATION = 1;
*/
public static final int GCP_ORGANIZATION_VALUE = 1;
/**
*
*
*
* The node represents a Google Cloud folder.
*
*
* GCP_FOLDER = 2;
*/
public static final int GCP_FOLDER_VALUE = 2;
/**
*
*
*
* The node represents a Google Cloud project.
*
*
* GCP_PROJECT = 3;
*/
public static final int GCP_PROJECT_VALUE = 3;
/**
*
*
*
* The node represents an AWS organization.
*
*
* AWS_ORGANIZATION = 4;
*/
public static final int AWS_ORGANIZATION_VALUE = 4;
/**
*
*
*
* The node represents an AWS organizational unit.
*
*
* AWS_ORGANIZATIONAL_UNIT = 5;
*/
public static final int AWS_ORGANIZATIONAL_UNIT_VALUE = 5;
/**
*
*
*
* The node represents an AWS account.
*
*
* AWS_ACCOUNT = 6;
*/
public static final int AWS_ACCOUNT_VALUE = 6;
/**
*
*
*
* The node represents an Azure management group.
*
*
* AZURE_MANAGEMENT_GROUP = 7;
*/
public static final int AZURE_MANAGEMENT_GROUP_VALUE = 7;
/**
*
*
*
* The node represents an Azure subscription.
*
*
* AZURE_SUBSCRIPTION = 8;
*/
public static final int AZURE_SUBSCRIPTION_VALUE = 8;
/**
*
*
*
* The node represents an Azure resource group.
*
*
* AZURE_RESOURCE_GROUP = 9;
*/
public static final int AZURE_RESOURCE_GROUP_VALUE = 9;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ResourcePathNodeType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ResourcePathNodeType forNumber(int value) {
switch (value) {
case 0:
return RESOURCE_PATH_NODE_TYPE_UNSPECIFIED;
case 1:
return GCP_ORGANIZATION;
case 2:
return GCP_FOLDER;
case 3:
return GCP_PROJECT;
case 4:
return AWS_ORGANIZATION;
case 5:
return AWS_ORGANIZATIONAL_UNIT;
case 6:
return AWS_ACCOUNT;
case 7:
return AZURE_MANAGEMENT_GROUP;
case 8:
return AZURE_SUBSCRIPTION;
case 9:
return AZURE_RESOURCE_GROUP;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ResourcePathNodeType findValueByNumber(int number) {
return ResourcePathNodeType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourcePath.getDescriptor().getEnumTypes().get(0);
}
private static final ResourcePathNodeType[] VALUES = values();
public static ResourcePathNodeType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ResourcePathNodeType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType)
}
public interface ResourcePathNodeOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The type of resource this node represents.
*
*
* .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType node_type = 1;
*
* @return The enum numeric value on the wire for nodeType.
*/
int getNodeTypeValue();
/**
*
*
*
* The type of resource this node represents.
*
*
* .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType node_type = 1;
*
* @return The nodeType.
*/
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType getNodeType();
/**
*
*
*
* The ID of the resource this node represents.
*
*
* string id = 2;
*
* @return The id.
*/
java.lang.String getId();
/**
*
*
*
* The ID of the resource this node represents.
*
*
* string id = 2;
*
* @return The bytes for id.
*/
com.google.protobuf.ByteString getIdBytes();
/**
*
*
*
* The display name of the resource this node represents.
*
*
* string display_name = 3;
*
* @return The displayName.
*/
java.lang.String getDisplayName();
/**
*
*
*
* The display name of the resource this node represents.
*
*
* string display_name = 3;
*
* @return The bytes for displayName.
*/
com.google.protobuf.ByteString getDisplayNameBytes();
}
/**
*
*
*
* A node within the resource path. Each node represents a resource within the
* resource hierarchy.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode}
*/
public static final class ResourcePathNode extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode)
ResourcePathNodeOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResourcePathNode.newBuilder() to construct.
private ResourcePathNode(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResourcePathNode() {
nodeType_ = 0;
id_ = "";
displayName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ResourcePathNode();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_ResourcePath_ResourcePathNode_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_ResourcePath_ResourcePathNode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.class,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder.class);
}
public static final int NODE_TYPE_FIELD_NUMBER = 1;
private int nodeType_ = 0;
/**
*
*
*
* The type of resource this node represents.
*
*
* .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType node_type = 1;
*
* @return The enum numeric value on the wire for nodeType.
*/
@java.lang.Override
public int getNodeTypeValue() {
return nodeType_;
}
/**
*
*
*
* The type of resource this node represents.
*
*
* .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType node_type = 1;
*
* @return The nodeType.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType getNodeType() {
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType result =
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType.forNumber(nodeType_);
return result == null
? com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType.UNRECOGNIZED
: result;
}
public static final int ID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
*
*
* The ID of the resource this node represents.
*
*
* string id = 2;
*
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
*
*
*
* The ID of the resource this node represents.
*
*
* string id = 2;
*
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* The display name of the resource this node represents.
*
*
* string display_name = 3;
*
* @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 display name of the resource this node represents.
*
*
* string display_name = 3;
*
* @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;
}
}
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 (nodeType_
!= com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType
.RESOURCE_PATH_NODE_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, nodeType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (nodeType_
!= com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType
.RESOURCE_PATH_NODE_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, nodeType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_);
}
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.v2.ResourcePath.ResourcePathNode)) {
return super.equals(obj);
}
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode other =
(com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode) obj;
if (nodeType_ != other.nodeType_) return false;
if (!getId().equals(other.getId())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
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) + NODE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + nodeType_;
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode 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.v2.ResourcePath.ResourcePathNode parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode 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.v2.ResourcePath.ResourcePathNode parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode 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.v2.ResourcePath.ResourcePathNode
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode
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.v2.ResourcePath.ResourcePathNode parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode 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.v2.ResourcePath.ResourcePathNode 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;
}
/**
*
*
*
* A node within the resource path. Each node represents a resource within the
* resource hierarchy.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode)
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_ResourcePath_ResourcePathNode_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_ResourcePath_ResourcePathNode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.class,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder.class);
}
// Construct using
// com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
nodeType_ = 0;
id_ = "";
displayName_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_ResourcePath_ResourcePathNode_descriptor;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode
getDefaultInstanceForType() {
return com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode build() {
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode buildPartial() {
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode result =
new com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.nodeType_ = nodeType_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.displayName_ = displayName_;
}
}
@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.v2.ResourcePath.ResourcePathNode) {
return mergeFrom(
(com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode other) {
if (other
== com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode
.getDefaultInstance()) return this;
if (other.nodeType_ != 0) {
setNodeTypeValue(other.getNodeTypeValue());
}
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000004;
onChanged();
}
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 8:
{
nodeType_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
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 bitField0_;
private int nodeType_ = 0;
/**
*
*
*
* The type of resource this node represents.
*
*
* .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType node_type = 1;
*
*
* @return The enum numeric value on the wire for nodeType.
*/
@java.lang.Override
public int getNodeTypeValue() {
return nodeType_;
}
/**
*
*
*
* The type of resource this node represents.
*
*
* .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType node_type = 1;
*
*
* @param value The enum numeric value on the wire for nodeType to set.
* @return This builder for chaining.
*/
public Builder setNodeTypeValue(int value) {
nodeType_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The type of resource this node represents.
*
*
* .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType node_type = 1;
*
*
* @return The nodeType.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType getNodeType() {
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType result =
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType.forNumber(
nodeType_);
return result == null
? com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType.UNRECOGNIZED
: result;
}
/**
*
*
*
* The type of resource this node represents.
*
*
* .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType node_type = 1;
*
*
* @param value The nodeType to set.
* @return This builder for chaining.
*/
public Builder setNodeType(
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
nodeType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The type of resource this node represents.
*
*
* .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType node_type = 1;
*
*
* @return This builder for chaining.
*/
public Builder clearNodeType() {
bitField0_ = (bitField0_ & ~0x00000001);
nodeType_ = 0;
onChanged();
return this;
}
private java.lang.Object id_ = "";
/**
*
*
*
* The ID of the resource this node represents.
*
*
* string id = 2;
*
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The ID of the resource this node represents.
*
*
* string id = 2;
*
* @return The bytes for id.
*/
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The ID of the resource this node represents.
*
*
* string id = 2;
*
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The ID of the resource this node represents.
*
*
* string id = 2;
*
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The ID of the resource this node represents.
*
*
* string id = 2;
*
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
* The display name of the resource this node represents.
*
*
* string display_name = 3;
*
* @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 display name of the resource this node represents.
*
*
* string display_name = 3;
*
* @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 display name of the resource this node represents.
*
*
* string display_name = 3;
*
* @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_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The display name of the resource this node represents.
*
*
* string display_name = 3;
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* The display name of the resource this node represents.
*
*
* string display_name = 3;
*
* @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_ |= 0x00000004;
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.v2.ResourcePath.ResourcePathNode)
}
// @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode)
private static final com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode();
}
public static com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResourcePathNode 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.v2.ResourcePath.ResourcePathNode
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int NODES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List nodes_;
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*/
@java.lang.Override
public java.util.List
getNodesList() {
return nodes_;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeOrBuilder>
getNodesOrBuilderList() {
return nodes_;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*/
@java.lang.Override
public int getNodesCount() {
return nodes_.size();
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*/
@java.lang.Override
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode getNodes(int index) {
return nodes_.get(index);
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*/
@java.lang.Override
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeOrBuilder
getNodesOrBuilder(int index) {
return nodes_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < nodes_.size(); i++) {
output.writeMessage(1, nodes_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < nodes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, nodes_.get(i));
}
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.v2.ResourcePath)) {
return super.equals(obj);
}
com.google.cloud.securitycenter.v2.ResourcePath other =
(com.google.cloud.securitycenter.v2.ResourcePath) obj;
if (!getNodesList().equals(other.getNodesList())) return false;
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();
if (getNodesCount() > 0) {
hash = (37 * hash) + NODES_FIELD_NUMBER;
hash = (53 * hash) + getNodesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.securitycenter.v2.ResourcePath parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.ResourcePath 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.v2.ResourcePath parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.ResourcePath 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.v2.ResourcePath parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.ResourcePath parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.ResourcePath parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.ResourcePath 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.v2.ResourcePath parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.ResourcePath 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.v2.ResourcePath parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.ResourcePath 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.v2.ResourcePath 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;
}
/**
*
*
*
* Represents the path of resources leading up to the resource this finding is
* about.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.ResourcePath}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.ResourcePath)
com.google.cloud.securitycenter.v2.ResourcePathOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_ResourcePath_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_ResourcePath_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.ResourcePath.class,
com.google.cloud.securitycenter.v2.ResourcePath.Builder.class);
}
// Construct using com.google.cloud.securitycenter.v2.ResourcePath.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (nodesBuilder_ == null) {
nodes_ = java.util.Collections.emptyList();
} else {
nodes_ = null;
nodesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_ResourcePath_descriptor;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.ResourcePath getDefaultInstanceForType() {
return com.google.cloud.securitycenter.v2.ResourcePath.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.ResourcePath build() {
com.google.cloud.securitycenter.v2.ResourcePath result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.ResourcePath buildPartial() {
com.google.cloud.securitycenter.v2.ResourcePath result =
new com.google.cloud.securitycenter.v2.ResourcePath(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.securitycenter.v2.ResourcePath result) {
if (nodesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
nodes_ = java.util.Collections.unmodifiableList(nodes_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.nodes_ = nodes_;
} else {
result.nodes_ = nodesBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.securitycenter.v2.ResourcePath result) {
int from_bitField0_ = bitField0_;
}
@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.v2.ResourcePath) {
return mergeFrom((com.google.cloud.securitycenter.v2.ResourcePath) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.securitycenter.v2.ResourcePath other) {
if (other == com.google.cloud.securitycenter.v2.ResourcePath.getDefaultInstance())
return this;
if (nodesBuilder_ == null) {
if (!other.nodes_.isEmpty()) {
if (nodes_.isEmpty()) {
nodes_ = other.nodes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureNodesIsMutable();
nodes_.addAll(other.nodes_);
}
onChanged();
}
} else {
if (!other.nodes_.isEmpty()) {
if (nodesBuilder_.isEmpty()) {
nodesBuilder_.dispose();
nodesBuilder_ = null;
nodes_ = other.nodes_;
bitField0_ = (bitField0_ & ~0x00000001);
nodesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getNodesFieldBuilder()
: null;
} else {
nodesBuilder_.addAllMessages(other.nodes_);
}
}
}
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:
{
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode m =
input.readMessage(
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.parser(),
extensionRegistry);
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
nodes_.add(m);
} else {
nodesBuilder_.addMessage(m);
}
break;
} // case 10
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 bitField0_;
private java.util.List
nodes_ = java.util.Collections.emptyList();
private void ensureNodesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
nodes_ =
new java.util.ArrayList<
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode>(nodes_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeOrBuilder>
nodesBuilder_;
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public java.util.List
getNodesList() {
if (nodesBuilder_ == null) {
return java.util.Collections.unmodifiableList(nodes_);
} else {
return nodesBuilder_.getMessageList();
}
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public int getNodesCount() {
if (nodesBuilder_ == null) {
return nodes_.size();
} else {
return nodesBuilder_.getCount();
}
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode getNodes(int index) {
if (nodesBuilder_ == null) {
return nodes_.get(index);
} else {
return nodesBuilder_.getMessage(index);
}
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public Builder setNodes(
int index, com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode value) {
if (nodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodesIsMutable();
nodes_.set(index, value);
onChanged();
} else {
nodesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public Builder setNodes(
int index,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder builderForValue) {
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
nodes_.set(index, builderForValue.build());
onChanged();
} else {
nodesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public Builder addNodes(
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode value) {
if (nodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodesIsMutable();
nodes_.add(value);
onChanged();
} else {
nodesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public Builder addNodes(
int index, com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode value) {
if (nodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodesIsMutable();
nodes_.add(index, value);
onChanged();
} else {
nodesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public Builder addNodes(
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder builderForValue) {
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
nodes_.add(builderForValue.build());
onChanged();
} else {
nodesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public Builder addNodes(
int index,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder builderForValue) {
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
nodes_.add(index, builderForValue.build());
onChanged();
} else {
nodesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public Builder addAllNodes(
java.lang.Iterable<
? extends com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode>
values) {
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_);
onChanged();
} else {
nodesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public Builder clearNodes() {
if (nodesBuilder_ == null) {
nodes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
nodesBuilder_.clear();
}
return this;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public Builder removeNodes(int index) {
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
nodes_.remove(index);
onChanged();
} else {
nodesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder getNodesBuilder(
int index) {
return getNodesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeOrBuilder
getNodesOrBuilder(int index) {
if (nodesBuilder_ == null) {
return nodes_.get(index);
} else {
return nodesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public java.util.List<
? extends com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeOrBuilder>
getNodesOrBuilderList() {
if (nodesBuilder_ != null) {
return nodesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(nodes_);
}
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder
addNodesBuilder() {
return getNodesFieldBuilder()
.addBuilder(
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode
.getDefaultInstance());
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder addNodesBuilder(
int index) {
return getNodesFieldBuilder()
.addBuilder(
index,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode
.getDefaultInstance());
}
/**
*
*
*
* The list of nodes that make the up resource path, ordered from lowest
* level to highest level.
*
*
* repeated .google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode nodes = 1;
*
*/
public java.util.List
getNodesBuilderList() {
return getNodesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeOrBuilder>
getNodesFieldBuilder() {
if (nodesBuilder_ == null) {
nodesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.Builder,
com.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeOrBuilder>(
nodes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
nodes_ = null;
}
return nodesBuilder_;
}
@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.v2.ResourcePath)
}
// @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.ResourcePath)
private static final com.google.cloud.securitycenter.v2.ResourcePath DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.ResourcePath();
}
public static com.google.cloud.securitycenter.v2.ResourcePath getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResourcePath 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.v2.ResourcePath getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy