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

com.google.cloud.securitycenter.v1.Simulation Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/securitycenter/v1/simulation.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.securitycenter.v1;

/**
 *
 *
 * 
 * Attack path simulation
 * 
* * Protobuf type {@code google.cloud.securitycenter.v1.Simulation} */ public final class Simulation extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Simulation) SimulationOrBuilder { private static final long serialVersionUID = 0L; // Use Simulation.newBuilder() to construct. private Simulation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Simulation() { name_ = ""; resourceValueConfigsMetadata_ = java.util.Collections.emptyList(); cloudProvider_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Simulation(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v1.SimulationProto .internal_static_google_cloud_securitycenter_v1_Simulation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v1.SimulationProto .internal_static_google_cloud_securitycenter_v1_Simulation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v1.Simulation.class, com.google.cloud.securitycenter.v1.Simulation.Builder.class); } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Full resource name of the Simulation:
   * `organizations/123/simulations/456`
   * 
* * 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; } } /** * * *
   * Full resource name of the Simulation:
   * `organizations/123/simulations/456`
   * 
* * 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 CREATE_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp createTime_; /** * * *
   * Output only. Time simulation was created
   * 
* * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the createTime field is set. */ @java.lang.Override public boolean hasCreateTime() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Output only. Time simulation was created
   * 
* * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The createTime. */ @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** * * *
   * Output only. Time simulation was created
   * 
* * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } public static final int RESOURCE_VALUE_CONFIGS_METADATA_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List resourceValueConfigsMetadata_; /** * * *
   * Resource value configurations' metadata used in this simulation. Maximum of
   * 100.
   * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ @java.lang.Override public java.util.List getResourceValueConfigsMetadataList() { return resourceValueConfigsMetadata_; } /** * * *
   * Resource value configurations' metadata used in this simulation. Maximum of
   * 100.
   * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ @java.lang.Override public java.util.List< ? extends com.google.cloud.securitycenter.v1.ResourceValueConfigMetadataOrBuilder> getResourceValueConfigsMetadataOrBuilderList() { return resourceValueConfigsMetadata_; } /** * * *
   * Resource value configurations' metadata used in this simulation. Maximum of
   * 100.
   * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ @java.lang.Override public int getResourceValueConfigsMetadataCount() { return resourceValueConfigsMetadata_.size(); } /** * * *
   * Resource value configurations' metadata used in this simulation. Maximum of
   * 100.
   * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ @java.lang.Override public com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata getResourceValueConfigsMetadata(int index) { return resourceValueConfigsMetadata_.get(index); } /** * * *
   * Resource value configurations' metadata used in this simulation. Maximum of
   * 100.
   * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ @java.lang.Override public com.google.cloud.securitycenter.v1.ResourceValueConfigMetadataOrBuilder getResourceValueConfigsMetadataOrBuilder(int index) { return resourceValueConfigsMetadata_.get(index); } public static final int CLOUD_PROVIDER_FIELD_NUMBER = 4; private int cloudProvider_ = 0; /** * * *
   * Indicates which cloud provider was used in this simulation.
   * 
* * .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 4; * * @return The enum numeric value on the wire for cloudProvider. */ @java.lang.Override public int getCloudProviderValue() { return cloudProvider_; } /** * * *
   * Indicates which cloud provider was used in this simulation.
   * 
* * .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 4; * * @return The cloudProvider. */ @java.lang.Override public com.google.cloud.securitycenter.v1.CloudProvider getCloudProvider() { com.google.cloud.securitycenter.v1.CloudProvider result = com.google.cloud.securitycenter.v1.CloudProvider.forNumber(cloudProvider_); return result == null ? com.google.cloud.securitycenter.v1.CloudProvider.UNRECOGNIZED : result; } 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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getCreateTime()); } for (int i = 0; i < resourceValueConfigsMetadata_.size(); i++) { output.writeMessage(3, resourceValueConfigsMetadata_.get(i)); } if (cloudProvider_ != com.google.cloud.securitycenter.v1.CloudProvider.CLOUD_PROVIDER_UNSPECIFIED .getNumber()) { output.writeEnum(4, cloudProvider_); } 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 (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); } for (int i = 0; i < resourceValueConfigsMetadata_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 3, resourceValueConfigsMetadata_.get(i)); } if (cloudProvider_ != com.google.cloud.securitycenter.v1.CloudProvider.CLOUD_PROVIDER_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, cloudProvider_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.securitycenter.v1.Simulation)) { return super.equals(obj); } com.google.cloud.securitycenter.v1.Simulation other = (com.google.cloud.securitycenter.v1.Simulation) obj; if (!getName().equals(other.getName())) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } if (!getResourceValueConfigsMetadataList().equals(other.getResourceValueConfigsMetadataList())) return false; if (cloudProvider_ != other.cloudProvider_) 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(); if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } if (getResourceValueConfigsMetadataCount() > 0) { hash = (37 * hash) + RESOURCE_VALUE_CONFIGS_METADATA_FIELD_NUMBER; hash = (53 * hash) + getResourceValueConfigsMetadataList().hashCode(); } hash = (37 * hash) + CLOUD_PROVIDER_FIELD_NUMBER; hash = (53 * hash) + cloudProvider_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.securitycenter.v1.Simulation parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1.Simulation parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v1.Simulation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1.Simulation parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v1.Simulation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1.Simulation parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v1.Simulation parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1.Simulation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.securitycenter.v1.Simulation parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1.Simulation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.securitycenter.v1.Simulation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1.Simulation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.securitycenter.v1.Simulation 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; } /** * * *
   * Attack path simulation
   * 
* * Protobuf type {@code google.cloud.securitycenter.v1.Simulation} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Simulation) com.google.cloud.securitycenter.v1.SimulationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v1.SimulationProto .internal_static_google_cloud_securitycenter_v1_Simulation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v1.SimulationProto .internal_static_google_cloud_securitycenter_v1_Simulation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v1.Simulation.class, com.google.cloud.securitycenter.v1.Simulation.Builder.class); } // Construct using com.google.cloud.securitycenter.v1.Simulation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getCreateTimeFieldBuilder(); getResourceValueConfigsMetadataFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } if (resourceValueConfigsMetadataBuilder_ == null) { resourceValueConfigsMetadata_ = java.util.Collections.emptyList(); } else { resourceValueConfigsMetadata_ = null; resourceValueConfigsMetadataBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); cloudProvider_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.securitycenter.v1.SimulationProto .internal_static_google_cloud_securitycenter_v1_Simulation_descriptor; } @java.lang.Override public com.google.cloud.securitycenter.v1.Simulation getDefaultInstanceForType() { return com.google.cloud.securitycenter.v1.Simulation.getDefaultInstance(); } @java.lang.Override public com.google.cloud.securitycenter.v1.Simulation build() { com.google.cloud.securitycenter.v1.Simulation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.securitycenter.v1.Simulation buildPartial() { com.google.cloud.securitycenter.v1.Simulation result = new com.google.cloud.securitycenter.v1.Simulation(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.cloud.securitycenter.v1.Simulation result) { if (resourceValueConfigsMetadataBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { resourceValueConfigsMetadata_ = java.util.Collections.unmodifiableList(resourceValueConfigsMetadata_); bitField0_ = (bitField0_ & ~0x00000004); } result.resourceValueConfigsMetadata_ = resourceValueConfigsMetadata_; } else { result.resourceValueConfigsMetadata_ = resourceValueConfigsMetadataBuilder_.build(); } } private void buildPartial0(com.google.cloud.securitycenter.v1.Simulation result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { result.cloudProvider_ = cloudProvider_; } result.bitField0_ |= to_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.v1.Simulation) { return mergeFrom((com.google.cloud.securitycenter.v1.Simulation) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.securitycenter.v1.Simulation other) { if (other == com.google.cloud.securitycenter.v1.Simulation.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } if (resourceValueConfigsMetadataBuilder_ == null) { if (!other.resourceValueConfigsMetadata_.isEmpty()) { if (resourceValueConfigsMetadata_.isEmpty()) { resourceValueConfigsMetadata_ = other.resourceValueConfigsMetadata_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureResourceValueConfigsMetadataIsMutable(); resourceValueConfigsMetadata_.addAll(other.resourceValueConfigsMetadata_); } onChanged(); } } else { if (!other.resourceValueConfigsMetadata_.isEmpty()) { if (resourceValueConfigsMetadataBuilder_.isEmpty()) { resourceValueConfigsMetadataBuilder_.dispose(); resourceValueConfigsMetadataBuilder_ = null; resourceValueConfigsMetadata_ = other.resourceValueConfigsMetadata_; bitField0_ = (bitField0_ & ~0x00000004); resourceValueConfigsMetadataBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getResourceValueConfigsMetadataFieldBuilder() : null; } else { resourceValueConfigsMetadataBuilder_.addAllMessages( other.resourceValueConfigsMetadata_); } } } if (other.cloudProvider_ != 0) { setCloudProviderValue(other.getCloudProviderValue()); } 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: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata m = input.readMessage( com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.parser(), extensionRegistry); if (resourceValueConfigsMetadataBuilder_ == null) { ensureResourceValueConfigsMetadataIsMutable(); resourceValueConfigsMetadata_.add(m); } else { resourceValueConfigsMetadataBuilder_.addMessage(m); } break; } // case 26 case 32: { cloudProvider_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 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_ = ""; /** * * *
     * Full resource name of the Simulation:
     * `organizations/123/simulations/456`
     * 
* * 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; } } /** * * *
     * Full resource name of the Simulation:
     * `organizations/123/simulations/456`
     * 
* * 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; } } /** * * *
     * Full resource name of the Simulation:
     * `organizations/123/simulations/456`
     * 
* * 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; } /** * * *
     * Full resource name of the Simulation:
     * `organizations/123/simulations/456`
     * 
* * string name = 1; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Full resource name of the Simulation:
     * `organizations/123/simulations/456`
     * 
* * 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 com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; /** * * *
     * Output only. Time simulation was created
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * Output only. Time simulation was created
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** * * *
     * Output only. Time simulation was created
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } createTime_ = value; } else { createTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Output only. Time simulation was created
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); } else { createTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Output only. Time simulation was created
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); } else { createTime_ = value; } } else { createTimeBuilder_.mergeFrom(value); } if (createTime_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
     * Output only. Time simulation was created
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearCreateTime() { bitField0_ = (bitField0_ & ~0x00000002); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. Time simulation was created
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. Time simulation was created
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** * * *
     * Output only. Time simulation was created
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getCreateTime(), getParentForChildren(), isClean()); createTime_ = null; } return createTimeBuilder_; } private java.util.List resourceValueConfigsMetadata_ = java.util.Collections.emptyList(); private void ensureResourceValueConfigsMetadataIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { resourceValueConfigsMetadata_ = new java.util.ArrayList( resourceValueConfigsMetadata_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.Builder, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadataOrBuilder> resourceValueConfigsMetadataBuilder_; /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public java.util.List getResourceValueConfigsMetadataList() { if (resourceValueConfigsMetadataBuilder_ == null) { return java.util.Collections.unmodifiableList(resourceValueConfigsMetadata_); } else { return resourceValueConfigsMetadataBuilder_.getMessageList(); } } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public int getResourceValueConfigsMetadataCount() { if (resourceValueConfigsMetadataBuilder_ == null) { return resourceValueConfigsMetadata_.size(); } else { return resourceValueConfigsMetadataBuilder_.getCount(); } } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata getResourceValueConfigsMetadata(int index) { if (resourceValueConfigsMetadataBuilder_ == null) { return resourceValueConfigsMetadata_.get(index); } else { return resourceValueConfigsMetadataBuilder_.getMessage(index); } } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public Builder setResourceValueConfigsMetadata( int index, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata value) { if (resourceValueConfigsMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResourceValueConfigsMetadataIsMutable(); resourceValueConfigsMetadata_.set(index, value); onChanged(); } else { resourceValueConfigsMetadataBuilder_.setMessage(index, value); } return this; } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public Builder setResourceValueConfigsMetadata( int index, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.Builder builderForValue) { if (resourceValueConfigsMetadataBuilder_ == null) { ensureResourceValueConfigsMetadataIsMutable(); resourceValueConfigsMetadata_.set(index, builderForValue.build()); onChanged(); } else { resourceValueConfigsMetadataBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public Builder addResourceValueConfigsMetadata( com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata value) { if (resourceValueConfigsMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResourceValueConfigsMetadataIsMutable(); resourceValueConfigsMetadata_.add(value); onChanged(); } else { resourceValueConfigsMetadataBuilder_.addMessage(value); } return this; } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public Builder addResourceValueConfigsMetadata( int index, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata value) { if (resourceValueConfigsMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResourceValueConfigsMetadataIsMutable(); resourceValueConfigsMetadata_.add(index, value); onChanged(); } else { resourceValueConfigsMetadataBuilder_.addMessage(index, value); } return this; } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public Builder addResourceValueConfigsMetadata( com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.Builder builderForValue) { if (resourceValueConfigsMetadataBuilder_ == null) { ensureResourceValueConfigsMetadataIsMutable(); resourceValueConfigsMetadata_.add(builderForValue.build()); onChanged(); } else { resourceValueConfigsMetadataBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public Builder addResourceValueConfigsMetadata( int index, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.Builder builderForValue) { if (resourceValueConfigsMetadataBuilder_ == null) { ensureResourceValueConfigsMetadataIsMutable(); resourceValueConfigsMetadata_.add(index, builderForValue.build()); onChanged(); } else { resourceValueConfigsMetadataBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public Builder addAllResourceValueConfigsMetadata( java.lang.Iterable values) { if (resourceValueConfigsMetadataBuilder_ == null) { ensureResourceValueConfigsMetadataIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, resourceValueConfigsMetadata_); onChanged(); } else { resourceValueConfigsMetadataBuilder_.addAllMessages(values); } return this; } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public Builder clearResourceValueConfigsMetadata() { if (resourceValueConfigsMetadataBuilder_ == null) { resourceValueConfigsMetadata_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { resourceValueConfigsMetadataBuilder_.clear(); } return this; } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public Builder removeResourceValueConfigsMetadata(int index) { if (resourceValueConfigsMetadataBuilder_ == null) { ensureResourceValueConfigsMetadataIsMutable(); resourceValueConfigsMetadata_.remove(index); onChanged(); } else { resourceValueConfigsMetadataBuilder_.remove(index); } return this; } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.Builder getResourceValueConfigsMetadataBuilder(int index) { return getResourceValueConfigsMetadataFieldBuilder().getBuilder(index); } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public com.google.cloud.securitycenter.v1.ResourceValueConfigMetadataOrBuilder getResourceValueConfigsMetadataOrBuilder(int index) { if (resourceValueConfigsMetadataBuilder_ == null) { return resourceValueConfigsMetadata_.get(index); } else { return resourceValueConfigsMetadataBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public java.util.List< ? extends com.google.cloud.securitycenter.v1.ResourceValueConfigMetadataOrBuilder> getResourceValueConfigsMetadataOrBuilderList() { if (resourceValueConfigsMetadataBuilder_ != null) { return resourceValueConfigsMetadataBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(resourceValueConfigsMetadata_); } } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.Builder addResourceValueConfigsMetadataBuilder() { return getResourceValueConfigsMetadataFieldBuilder() .addBuilder( com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.getDefaultInstance()); } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.Builder addResourceValueConfigsMetadataBuilder(int index) { return getResourceValueConfigsMetadataFieldBuilder() .addBuilder( index, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.getDefaultInstance()); } /** * * *
     * Resource value configurations' metadata used in this simulation. Maximum of
     * 100.
     * 
* * * repeated .google.cloud.securitycenter.v1.ResourceValueConfigMetadata resource_value_configs_metadata = 3; * */ public java.util.List getResourceValueConfigsMetadataBuilderList() { return getResourceValueConfigsMetadataFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.Builder, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadataOrBuilder> getResourceValueConfigsMetadataFieldBuilder() { if (resourceValueConfigsMetadataBuilder_ == null) { resourceValueConfigsMetadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.Builder, com.google.cloud.securitycenter.v1.ResourceValueConfigMetadataOrBuilder>( resourceValueConfigsMetadata_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); resourceValueConfigsMetadata_ = null; } return resourceValueConfigsMetadataBuilder_; } private int cloudProvider_ = 0; /** * * *
     * Indicates which cloud provider was used in this simulation.
     * 
* * .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 4; * * @return The enum numeric value on the wire for cloudProvider. */ @java.lang.Override public int getCloudProviderValue() { return cloudProvider_; } /** * * *
     * Indicates which cloud provider was used in this simulation.
     * 
* * .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 4; * * @param value The enum numeric value on the wire for cloudProvider to set. * @return This builder for chaining. */ public Builder setCloudProviderValue(int value) { cloudProvider_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Indicates which cloud provider was used in this simulation.
     * 
* * .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 4; * * @return The cloudProvider. */ @java.lang.Override public com.google.cloud.securitycenter.v1.CloudProvider getCloudProvider() { com.google.cloud.securitycenter.v1.CloudProvider result = com.google.cloud.securitycenter.v1.CloudProvider.forNumber(cloudProvider_); return result == null ? com.google.cloud.securitycenter.v1.CloudProvider.UNRECOGNIZED : result; } /** * * *
     * Indicates which cloud provider was used in this simulation.
     * 
* * .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 4; * * @param value The cloudProvider to set. * @return This builder for chaining. */ public Builder setCloudProvider(com.google.cloud.securitycenter.v1.CloudProvider value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; cloudProvider_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Indicates which cloud provider was used in this simulation.
     * 
* * .google.cloud.securitycenter.v1.CloudProvider cloud_provider = 4; * * @return This builder for chaining. */ public Builder clearCloudProvider() { bitField0_ = (bitField0_ & ~0x00000008); cloudProvider_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Simulation) } // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Simulation) private static final com.google.cloud.securitycenter.v1.Simulation DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Simulation(); } public static com.google.cloud.securitycenter.v1.Simulation getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Simulation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.securitycenter.v1.Simulation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy