All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.securitycenter.v2.ValuedResource Maven / Gradle / Ivy

There is a newer version: 2.62.0
Show 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/v2/valued_resource.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.securitycenter.v2;

/**
 *
 *
 * 
 * A resource that is determined to have value to a user's system
 * 
* * Protobuf type {@code google.cloud.securitycenter.v2.ValuedResource} */ public final class ValuedResource extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.ValuedResource) ValuedResourceOrBuilder { private static final long serialVersionUID = 0L; // Use ValuedResource.newBuilder() to construct. private ValuedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ValuedResource() { name_ = ""; resource_ = ""; resourceType_ = ""; displayName_ = ""; resourceValue_ = 0; resourceValueConfigsUsed_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ValuedResource(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v2.ValuedResourceProto .internal_static_google_cloud_securitycenter_v2_ValuedResource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v2.ValuedResourceProto .internal_static_google_cloud_securitycenter_v2_ValuedResource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v2.ValuedResource.class, com.google.cloud.securitycenter.v2.ValuedResource.Builder.class); } /** * * *
   * How valuable the resource is.
   * 
* * Protobuf enum {@code google.cloud.securitycenter.v2.ValuedResource.ResourceValue} */ public enum ResourceValue implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * The resource value isn't specified.
     * 
* * RESOURCE_VALUE_UNSPECIFIED = 0; */ RESOURCE_VALUE_UNSPECIFIED(0), /** * * *
     * This is a low-value resource.
     * 
* * RESOURCE_VALUE_LOW = 1; */ RESOURCE_VALUE_LOW(1), /** * * *
     * This is a medium-value resource.
     * 
* * RESOURCE_VALUE_MEDIUM = 2; */ RESOURCE_VALUE_MEDIUM(2), /** * * *
     * This is a high-value resource.
     * 
* * RESOURCE_VALUE_HIGH = 3; */ RESOURCE_VALUE_HIGH(3), UNRECOGNIZED(-1), ; /** * * *
     * The resource value isn't specified.
     * 
* * RESOURCE_VALUE_UNSPECIFIED = 0; */ public static final int RESOURCE_VALUE_UNSPECIFIED_VALUE = 0; /** * * *
     * This is a low-value resource.
     * 
* * RESOURCE_VALUE_LOW = 1; */ public static final int RESOURCE_VALUE_LOW_VALUE = 1; /** * * *
     * This is a medium-value resource.
     * 
* * RESOURCE_VALUE_MEDIUM = 2; */ public static final int RESOURCE_VALUE_MEDIUM_VALUE = 2; /** * * *
     * This is a high-value resource.
     * 
* * RESOURCE_VALUE_HIGH = 3; */ public static final int RESOURCE_VALUE_HIGH_VALUE = 3; 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 ResourceValue 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 ResourceValue forNumber(int value) { switch (value) { case 0: return RESOURCE_VALUE_UNSPECIFIED; case 1: return RESOURCE_VALUE_LOW; case 2: return RESOURCE_VALUE_MEDIUM; case 3: return RESOURCE_VALUE_HIGH; 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 ResourceValue findValueByNumber(int number) { return ResourceValue.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.ValuedResource.getDescriptor() .getEnumTypes() .get(0); } private static final ResourceValue[] VALUES = values(); public static ResourceValue 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 ResourceValue(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.ValuedResource.ResourceValue) } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Valued resource name, for example,
   *  e.g.:
   *  `organizations/123/simulations/456/valuedResources/789`
   * 
* * 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; } } /** * * *
   * Valued resource name, for example,
   *  e.g.:
   *  `organizations/123/simulations/456/valuedResources/789`
   * 
* * 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 RESOURCE_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object resource_ = ""; /** * * *
   * The
   * [full resource
   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
   * of the valued resource.
   * 
* * string resource = 2; * * @return The resource. */ @java.lang.Override public java.lang.String getResource() { java.lang.Object ref = resource_; 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(); resource_ = s; return s; } } /** * * *
   * The
   * [full resource
   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
   * of the valued resource.
   * 
* * string resource = 2; * * @return The bytes for resource. */ @java.lang.Override public com.google.protobuf.ByteString getResourceBytes() { java.lang.Object ref = resource_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); resource_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RESOURCE_TYPE_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object resourceType_ = ""; /** * * *
   * The [resource
   * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
   * of the valued resource.
   * 
* * string resource_type = 3; * * @return The resourceType. */ @java.lang.Override public java.lang.String getResourceType() { java.lang.Object ref = resourceType_; 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(); resourceType_ = s; return s; } } /** * * *
   * The [resource
   * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
   * of the valued resource.
   * 
* * string resource_type = 3; * * @return The bytes for resourceType. */ @java.lang.Override public com.google.protobuf.ByteString getResourceTypeBytes() { java.lang.Object ref = resourceType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); resourceType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DISPLAY_NAME_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object displayName_ = ""; /** * * *
   * Human-readable name of the valued resource.
   * 
* * string display_name = 4; * * @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; } } /** * * *
   * Human-readable name of the valued resource.
   * 
* * string display_name = 4; * * @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 RESOURCE_VALUE_FIELD_NUMBER = 5; private int resourceValue_ = 0; /** * * *
   * How valuable this resource is.
   * 
* * .google.cloud.securitycenter.v2.ValuedResource.ResourceValue resource_value = 5; * * @return The enum numeric value on the wire for resourceValue. */ @java.lang.Override public int getResourceValueValue() { return resourceValue_; } /** * * *
   * How valuable this resource is.
   * 
* * .google.cloud.securitycenter.v2.ValuedResource.ResourceValue resource_value = 5; * * @return The resourceValue. */ @java.lang.Override public com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue getResourceValue() { com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue result = com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue.forNumber(resourceValue_); return result == null ? com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue.UNRECOGNIZED : result; } public static final int EXPOSED_SCORE_FIELD_NUMBER = 6; private double exposedScore_ = 0D; /** * * *
   * Exposed score for this valued resource. A value of 0 means no exposure was
   * detected exposure.
   * 
* * double exposed_score = 6; * * @return The exposedScore. */ @java.lang.Override public double getExposedScore() { return exposedScore_; } public static final int RESOURCE_VALUE_CONFIGS_USED_FIELD_NUMBER = 7; @SuppressWarnings("serial") private java.util.List resourceValueConfigsUsed_; /** * * *
   * List of resource value configurations' metadata used to determine the value
   * of this resource. Maximum of 100.
   * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ @java.lang.Override public java.util.List getResourceValueConfigsUsedList() { return resourceValueConfigsUsed_; } /** * * *
   * List of resource value configurations' metadata used to determine the value
   * of this resource. Maximum of 100.
   * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ @java.lang.Override public java.util.List< ? extends com.google.cloud.securitycenter.v2.ResourceValueConfigMetadataOrBuilder> getResourceValueConfigsUsedOrBuilderList() { return resourceValueConfigsUsed_; } /** * * *
   * List of resource value configurations' metadata used to determine the value
   * of this resource. Maximum of 100.
   * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ @java.lang.Override public int getResourceValueConfigsUsedCount() { return resourceValueConfigsUsed_.size(); } /** * * *
   * List of resource value configurations' metadata used to determine the value
   * of this resource. Maximum of 100.
   * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ @java.lang.Override public com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata getResourceValueConfigsUsed( int index) { return resourceValueConfigsUsed_.get(index); } /** * * *
   * List of resource value configurations' metadata used to determine the value
   * of this resource. Maximum of 100.
   * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ @java.lang.Override public com.google.cloud.securitycenter.v2.ResourceValueConfigMetadataOrBuilder getResourceValueConfigsUsedOrBuilder(int index) { return resourceValueConfigsUsed_.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 { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resource_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); } if (resourceValue_ != com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue .RESOURCE_VALUE_UNSPECIFIED .getNumber()) { output.writeEnum(5, resourceValue_); } if (java.lang.Double.doubleToRawLongBits(exposedScore_) != 0) { output.writeDouble(6, exposedScore_); } for (int i = 0; i < resourceValueConfigsUsed_.size(); i++) { output.writeMessage(7, resourceValueConfigsUsed_.get(i)); } 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(resource_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resource_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resourceType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); } if (resourceValue_ != com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue .RESOURCE_VALUE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, resourceValue_); } if (java.lang.Double.doubleToRawLongBits(exposedScore_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, exposedScore_); } for (int i = 0; i < resourceValueConfigsUsed_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 7, resourceValueConfigsUsed_.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.ValuedResource)) { return super.equals(obj); } com.google.cloud.securitycenter.v2.ValuedResource other = (com.google.cloud.securitycenter.v2.ValuedResource) obj; if (!getName().equals(other.getName())) return false; if (!getResource().equals(other.getResource())) return false; if (!getResourceType().equals(other.getResourceType())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (resourceValue_ != other.resourceValue_) return false; if (java.lang.Double.doubleToLongBits(getExposedScore()) != java.lang.Double.doubleToLongBits(other.getExposedScore())) return false; if (!getResourceValueConfigsUsedList().equals(other.getResourceValueConfigsUsedList())) 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; hash = (53 * hash) + getResourceType().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + RESOURCE_VALUE_FIELD_NUMBER; hash = (53 * hash) + resourceValue_; hash = (37 * hash) + EXPOSED_SCORE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getExposedScore())); if (getResourceValueConfigsUsedCount() > 0) { hash = (37 * hash) + RESOURCE_VALUE_CONFIGS_USED_FIELD_NUMBER; hash = (53 * hash) + getResourceValueConfigsUsedList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.securitycenter.v2.ValuedResource parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v2.ValuedResource 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.ValuedResource parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v2.ValuedResource 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.ValuedResource parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v2.ValuedResource 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.ValuedResource parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v2.ValuedResource 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.ValuedResource parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v2.ValuedResource 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.ValuedResource 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.ValuedResource 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.ValuedResource 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 resource that is determined to have value to a user's system
   * 
* * Protobuf type {@code google.cloud.securitycenter.v2.ValuedResource} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.ValuedResource) com.google.cloud.securitycenter.v2.ValuedResourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v2.ValuedResourceProto .internal_static_google_cloud_securitycenter_v2_ValuedResource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v2.ValuedResourceProto .internal_static_google_cloud_securitycenter_v2_ValuedResource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v2.ValuedResource.class, com.google.cloud.securitycenter.v2.ValuedResource.Builder.class); } // Construct using com.google.cloud.securitycenter.v2.ValuedResource.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; resource_ = ""; resourceType_ = ""; displayName_ = ""; resourceValue_ = 0; exposedScore_ = 0D; if (resourceValueConfigsUsedBuilder_ == null) { resourceValueConfigsUsed_ = java.util.Collections.emptyList(); } else { resourceValueConfigsUsed_ = null; resourceValueConfigsUsedBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.securitycenter.v2.ValuedResourceProto .internal_static_google_cloud_securitycenter_v2_ValuedResource_descriptor; } @java.lang.Override public com.google.cloud.securitycenter.v2.ValuedResource getDefaultInstanceForType() { return com.google.cloud.securitycenter.v2.ValuedResource.getDefaultInstance(); } @java.lang.Override public com.google.cloud.securitycenter.v2.ValuedResource build() { com.google.cloud.securitycenter.v2.ValuedResource result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.securitycenter.v2.ValuedResource buildPartial() { com.google.cloud.securitycenter.v2.ValuedResource result = new com.google.cloud.securitycenter.v2.ValuedResource(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.securitycenter.v2.ValuedResource result) { if (resourceValueConfigsUsedBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0)) { resourceValueConfigsUsed_ = java.util.Collections.unmodifiableList(resourceValueConfigsUsed_); bitField0_ = (bitField0_ & ~0x00000040); } result.resourceValueConfigsUsed_ = resourceValueConfigsUsed_; } else { result.resourceValueConfigsUsed_ = resourceValueConfigsUsedBuilder_.build(); } } private void buildPartial0(com.google.cloud.securitycenter.v2.ValuedResource result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.resource_ = resource_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.resourceType_ = resourceType_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.displayName_ = displayName_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.resourceValue_ = resourceValue_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.exposedScore_ = exposedScore_; } } @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.ValuedResource) { return mergeFrom((com.google.cloud.securitycenter.v2.ValuedResource) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.securitycenter.v2.ValuedResource other) { if (other == com.google.cloud.securitycenter.v2.ValuedResource.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getResource().isEmpty()) { resource_ = other.resource_; bitField0_ |= 0x00000002; onChanged(); } if (!other.getResourceType().isEmpty()) { resourceType_ = other.resourceType_; bitField0_ |= 0x00000004; onChanged(); } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; bitField0_ |= 0x00000008; onChanged(); } if (other.resourceValue_ != 0) { setResourceValueValue(other.getResourceValueValue()); } if (other.getExposedScore() != 0D) { setExposedScore(other.getExposedScore()); } if (resourceValueConfigsUsedBuilder_ == null) { if (!other.resourceValueConfigsUsed_.isEmpty()) { if (resourceValueConfigsUsed_.isEmpty()) { resourceValueConfigsUsed_ = other.resourceValueConfigsUsed_; bitField0_ = (bitField0_ & ~0x00000040); } else { ensureResourceValueConfigsUsedIsMutable(); resourceValueConfigsUsed_.addAll(other.resourceValueConfigsUsed_); } onChanged(); } } else { if (!other.resourceValueConfigsUsed_.isEmpty()) { if (resourceValueConfigsUsedBuilder_.isEmpty()) { resourceValueConfigsUsedBuilder_.dispose(); resourceValueConfigsUsedBuilder_ = null; resourceValueConfigsUsed_ = other.resourceValueConfigsUsed_; bitField0_ = (bitField0_ & ~0x00000040); resourceValueConfigsUsedBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getResourceValueConfigsUsedFieldBuilder() : null; } else { resourceValueConfigsUsedBuilder_.addAllMessages(other.resourceValueConfigsUsed_); } } } 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: { resource_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { resourceType_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { displayName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 case 40: { resourceValue_ = input.readEnum(); bitField0_ |= 0x00000010; break; } // case 40 case 49: { exposedScore_ = input.readDouble(); bitField0_ |= 0x00000020; break; } // case 49 case 58: { com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata m = input.readMessage( com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.parser(), extensionRegistry); if (resourceValueConfigsUsedBuilder_ == null) { ensureResourceValueConfigsUsedIsMutable(); resourceValueConfigsUsed_.add(m); } else { resourceValueConfigsUsedBuilder_.addMessage(m); } break; } // case 58 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.lang.Object name_ = ""; /** * * *
     * Valued resource name, for example,
     *  e.g.:
     *  `organizations/123/simulations/456/valuedResources/789`
     * 
* * 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; } } /** * * *
     * Valued resource name, for example,
     *  e.g.:
     *  `organizations/123/simulations/456/valuedResources/789`
     * 
* * 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; } } /** * * *
     * Valued resource name, for example,
     *  e.g.:
     *  `organizations/123/simulations/456/valuedResources/789`
     * 
* * 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; } /** * * *
     * Valued resource name, for example,
     *  e.g.:
     *  `organizations/123/simulations/456/valuedResources/789`
     * 
* * string name = 1; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Valued resource name, for example,
     *  e.g.:
     *  `organizations/123/simulations/456/valuedResources/789`
     * 
* * 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 resource_ = ""; /** * * *
     * The
     * [full resource
     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
     * of the valued resource.
     * 
* * string resource = 2; * * @return The resource. */ public java.lang.String getResource() { java.lang.Object ref = resource_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resource_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The
     * [full resource
     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
     * of the valued resource.
     * 
* * string resource = 2; * * @return The bytes for resource. */ public com.google.protobuf.ByteString getResourceBytes() { java.lang.Object ref = resource_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); resource_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The
     * [full resource
     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
     * of the valued resource.
     * 
* * string resource = 2; * * @param value The resource to set. * @return This builder for chaining. */ public Builder setResource(java.lang.String value) { if (value == null) { throw new NullPointerException(); } resource_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The
     * [full resource
     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
     * of the valued resource.
     * 
* * string resource = 2; * * @return This builder for chaining. */ public Builder clearResource() { resource_ = getDefaultInstance().getResource(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * The
     * [full resource
     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
     * of the valued resource.
     * 
* * string resource = 2; * * @param value The bytes for resource to set. * @return This builder for chaining. */ public Builder setResourceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); resource_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object resourceType_ = ""; /** * * *
     * The [resource
     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
     * of the valued resource.
     * 
* * string resource_type = 3; * * @return The resourceType. */ public java.lang.String getResourceType() { java.lang.Object ref = resourceType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resourceType_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The [resource
     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
     * of the valued resource.
     * 
* * string resource_type = 3; * * @return The bytes for resourceType. */ public com.google.protobuf.ByteString getResourceTypeBytes() { java.lang.Object ref = resourceType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); resourceType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The [resource
     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
     * of the valued resource.
     * 
* * string resource_type = 3; * * @param value The resourceType to set. * @return This builder for chaining. */ public Builder setResourceType(java.lang.String value) { if (value == null) { throw new NullPointerException(); } resourceType_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The [resource
     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
     * of the valued resource.
     * 
* * string resource_type = 3; * * @return This builder for chaining. */ public Builder clearResourceType() { resourceType_ = getDefaultInstance().getResourceType(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
     * The [resource
     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
     * of the valued resource.
     * 
* * string resource_type = 3; * * @param value The bytes for resourceType to set. * @return This builder for chaining. */ public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); resourceType_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private java.lang.Object displayName_ = ""; /** * * *
     * Human-readable name of the valued resource.
     * 
* * string display_name = 4; * * @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; } } /** * * *
     * Human-readable name of the valued resource.
     * 
* * string display_name = 4; * * @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; } } /** * * *
     * Human-readable name of the valued resource.
     * 
* * string display_name = 4; * * @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_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Human-readable name of the valued resource.
     * 
* * string display_name = 4; * * @return This builder for chaining. */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * * *
     * Human-readable name of the valued resource.
     * 
* * string display_name = 4; * * @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_ |= 0x00000008; onChanged(); return this; } private int resourceValue_ = 0; /** * * *
     * How valuable this resource is.
     * 
* * .google.cloud.securitycenter.v2.ValuedResource.ResourceValue resource_value = 5; * * @return The enum numeric value on the wire for resourceValue. */ @java.lang.Override public int getResourceValueValue() { return resourceValue_; } /** * * *
     * How valuable this resource is.
     * 
* * .google.cloud.securitycenter.v2.ValuedResource.ResourceValue resource_value = 5; * * @param value The enum numeric value on the wire for resourceValue to set. * @return This builder for chaining. */ public Builder setResourceValueValue(int value) { resourceValue_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * How valuable this resource is.
     * 
* * .google.cloud.securitycenter.v2.ValuedResource.ResourceValue resource_value = 5; * * @return The resourceValue. */ @java.lang.Override public com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue getResourceValue() { com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue result = com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue.forNumber(resourceValue_); return result == null ? com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue.UNRECOGNIZED : result; } /** * * *
     * How valuable this resource is.
     * 
* * .google.cloud.securitycenter.v2.ValuedResource.ResourceValue resource_value = 5; * * @param value The resourceValue to set. * @return This builder for chaining. */ public Builder setResourceValue( com.google.cloud.securitycenter.v2.ValuedResource.ResourceValue value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; resourceValue_ = value.getNumber(); onChanged(); return this; } /** * * *
     * How valuable this resource is.
     * 
* * .google.cloud.securitycenter.v2.ValuedResource.ResourceValue resource_value = 5; * * @return This builder for chaining. */ public Builder clearResourceValue() { bitField0_ = (bitField0_ & ~0x00000010); resourceValue_ = 0; onChanged(); return this; } private double exposedScore_; /** * * *
     * Exposed score for this valued resource. A value of 0 means no exposure was
     * detected exposure.
     * 
* * double exposed_score = 6; * * @return The exposedScore. */ @java.lang.Override public double getExposedScore() { return exposedScore_; } /** * * *
     * Exposed score for this valued resource. A value of 0 means no exposure was
     * detected exposure.
     * 
* * double exposed_score = 6; * * @param value The exposedScore to set. * @return This builder for chaining. */ public Builder setExposedScore(double value) { exposedScore_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Exposed score for this valued resource. A value of 0 means no exposure was
     * detected exposure.
     * 
* * double exposed_score = 6; * * @return This builder for chaining. */ public Builder clearExposedScore() { bitField0_ = (bitField0_ & ~0x00000020); exposedScore_ = 0D; onChanged(); return this; } private java.util.List resourceValueConfigsUsed_ = java.util.Collections.emptyList(); private void ensureResourceValueConfigsUsedIsMutable() { if (!((bitField0_ & 0x00000040) != 0)) { resourceValueConfigsUsed_ = new java.util.ArrayList( resourceValueConfigsUsed_); bitField0_ |= 0x00000040; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.Builder, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadataOrBuilder> resourceValueConfigsUsedBuilder_; /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public java.util.List getResourceValueConfigsUsedList() { if (resourceValueConfigsUsedBuilder_ == null) { return java.util.Collections.unmodifiableList(resourceValueConfigsUsed_); } else { return resourceValueConfigsUsedBuilder_.getMessageList(); } } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public int getResourceValueConfigsUsedCount() { if (resourceValueConfigsUsedBuilder_ == null) { return resourceValueConfigsUsed_.size(); } else { return resourceValueConfigsUsedBuilder_.getCount(); } } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata getResourceValueConfigsUsed(int index) { if (resourceValueConfigsUsedBuilder_ == null) { return resourceValueConfigsUsed_.get(index); } else { return resourceValueConfigsUsedBuilder_.getMessage(index); } } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public Builder setResourceValueConfigsUsed( int index, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata value) { if (resourceValueConfigsUsedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResourceValueConfigsUsedIsMutable(); resourceValueConfigsUsed_.set(index, value); onChanged(); } else { resourceValueConfigsUsedBuilder_.setMessage(index, value); } return this; } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public Builder setResourceValueConfigsUsed( int index, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.Builder builderForValue) { if (resourceValueConfigsUsedBuilder_ == null) { ensureResourceValueConfigsUsedIsMutable(); resourceValueConfigsUsed_.set(index, builderForValue.build()); onChanged(); } else { resourceValueConfigsUsedBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public Builder addResourceValueConfigsUsed( com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata value) { if (resourceValueConfigsUsedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResourceValueConfigsUsedIsMutable(); resourceValueConfigsUsed_.add(value); onChanged(); } else { resourceValueConfigsUsedBuilder_.addMessage(value); } return this; } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public Builder addResourceValueConfigsUsed( int index, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata value) { if (resourceValueConfigsUsedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResourceValueConfigsUsedIsMutable(); resourceValueConfigsUsed_.add(index, value); onChanged(); } else { resourceValueConfigsUsedBuilder_.addMessage(index, value); } return this; } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public Builder addResourceValueConfigsUsed( com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.Builder builderForValue) { if (resourceValueConfigsUsedBuilder_ == null) { ensureResourceValueConfigsUsedIsMutable(); resourceValueConfigsUsed_.add(builderForValue.build()); onChanged(); } else { resourceValueConfigsUsedBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public Builder addResourceValueConfigsUsed( int index, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.Builder builderForValue) { if (resourceValueConfigsUsedBuilder_ == null) { ensureResourceValueConfigsUsedIsMutable(); resourceValueConfigsUsed_.add(index, builderForValue.build()); onChanged(); } else { resourceValueConfigsUsedBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public Builder addAllResourceValueConfigsUsed( java.lang.Iterable values) { if (resourceValueConfigsUsedBuilder_ == null) { ensureResourceValueConfigsUsedIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceValueConfigsUsed_); onChanged(); } else { resourceValueConfigsUsedBuilder_.addAllMessages(values); } return this; } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public Builder clearResourceValueConfigsUsed() { if (resourceValueConfigsUsedBuilder_ == null) { resourceValueConfigsUsed_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { resourceValueConfigsUsedBuilder_.clear(); } return this; } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public Builder removeResourceValueConfigsUsed(int index) { if (resourceValueConfigsUsedBuilder_ == null) { ensureResourceValueConfigsUsedIsMutable(); resourceValueConfigsUsed_.remove(index); onChanged(); } else { resourceValueConfigsUsedBuilder_.remove(index); } return this; } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.Builder getResourceValueConfigsUsedBuilder(int index) { return getResourceValueConfigsUsedFieldBuilder().getBuilder(index); } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public com.google.cloud.securitycenter.v2.ResourceValueConfigMetadataOrBuilder getResourceValueConfigsUsedOrBuilder(int index) { if (resourceValueConfigsUsedBuilder_ == null) { return resourceValueConfigsUsed_.get(index); } else { return resourceValueConfigsUsedBuilder_.getMessageOrBuilder(index); } } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public java.util.List< ? extends com.google.cloud.securitycenter.v2.ResourceValueConfigMetadataOrBuilder> getResourceValueConfigsUsedOrBuilderList() { if (resourceValueConfigsUsedBuilder_ != null) { return resourceValueConfigsUsedBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(resourceValueConfigsUsed_); } } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.Builder addResourceValueConfigsUsedBuilder() { return getResourceValueConfigsUsedFieldBuilder() .addBuilder( com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.getDefaultInstance()); } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.Builder addResourceValueConfigsUsedBuilder(int index) { return getResourceValueConfigsUsedFieldBuilder() .addBuilder( index, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.getDefaultInstance()); } /** * * *
     * List of resource value configurations' metadata used to determine the value
     * of this resource. Maximum of 100.
     * 
* * * repeated .google.cloud.securitycenter.v2.ResourceValueConfigMetadata resource_value_configs_used = 7; * */ public java.util.List getResourceValueConfigsUsedBuilderList() { return getResourceValueConfigsUsedFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.Builder, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadataOrBuilder> getResourceValueConfigsUsedFieldBuilder() { if (resourceValueConfigsUsedBuilder_ == null) { resourceValueConfigsUsedBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.Builder, com.google.cloud.securitycenter.v2.ResourceValueConfigMetadataOrBuilder>( resourceValueConfigsUsed_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); resourceValueConfigsUsed_ = null; } return resourceValueConfigsUsedBuilder_; } @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.ValuedResource) } // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.ValuedResource) private static final com.google.cloud.securitycenter.v2.ValuedResource DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.ValuedResource(); } public static com.google.cloud.securitycenter.v2.ValuedResource getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ValuedResource 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.ValuedResource getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy