Class SafetySetting (3.36.0)

public final class SafetySetting extends GeneratedMessageV3 implements SafetySettingOrBuilder

Safety settings.

Protobuf type google.cloud.aiplatform.v1.SafetySetting

Static Fields

CATEGORY_FIELD_NUMBER

public static final int CATEGORY_FIELD_NUMBER
Field Value
TypeDescription
int

THRESHOLD_FIELD_NUMBER

public static final int THRESHOLD_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static SafetySetting getDefaultInstance()
Returns
TypeDescription
SafetySetting

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static SafetySetting.Builder newBuilder()
Returns
TypeDescription
SafetySetting.Builder

newBuilder(SafetySetting prototype)

public static SafetySetting.Builder newBuilder(SafetySetting prototype)
Parameter
NameDescription
prototypeSafetySetting
Returns
TypeDescription
SafetySetting.Builder

parseDelimitedFrom(InputStream input)

public static SafetySetting parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SafetySetting parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static SafetySetting parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SafetySetting parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SafetySetting parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SafetySetting parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SafetySetting parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SafetySetting parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static SafetySetting parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SafetySetting parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static SafetySetting parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SafetySetting parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SafetySetting
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<SafetySetting> parser()
Returns
TypeDescription
Parser<SafetySetting>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCategory()

public HarmCategory getCategory()

Required. Harm category.

.google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
HarmCategory

The category.

getCategoryValue()

public int getCategoryValue()

Required. Harm category.

.google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The enum numeric value on the wire for category.

getDefaultInstanceForType()

public SafetySetting getDefaultInstanceForType()
Returns
TypeDescription
SafetySetting

getParserForType()

public Parser<SafetySetting> getParserForType()
Returns
TypeDescription
Parser<SafetySetting>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getThreshold()

public SafetySetting.HarmBlockThreshold getThreshold()

Required. The harm block threshold.

.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SafetySetting.HarmBlockThreshold

The threshold.

getThresholdValue()

public int getThresholdValue()

Required. The harm block threshold.

.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The enum numeric value on the wire for threshold.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public SafetySetting.Builder newBuilderForType()
Returns
TypeDescription
SafetySetting.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SafetySetting.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
SafetySetting.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public SafetySetting.Builder toBuilder()
Returns
TypeDescription
SafetySetting.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException