Class SafetyRating (0.2.0)

publicfinalclass SafetyRatingextendsGeneratedMessageV3implementsSafetyRatingOrBuilder

Safety rating corresponding to the generated content.

Protobuf type google.cloud.vertexai.v1beta1.SafetyRating

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

BLOCKED_FIELD_NUMBER

publicstaticfinalintBLOCKED_FIELD_NUMBER
Field Value
Type Description
int

CATEGORY_FIELD_NUMBER

publicstaticfinalintCATEGORY_FIELD_NUMBER
Field Value
Type Description
int

PROBABILITY_FIELD_NUMBER

publicstaticfinalintPROBABILITY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticSafetyRatinggetDefaultInstance()
Returns
Type Description
SafetyRating

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticSafetyRating.BuildernewBuilder()
Returns
Type Description
SafetyRating.Builder

newBuilder(SafetyRating prototype)

publicstaticSafetyRating.BuildernewBuilder(SafetyRatingprototype)
Parameter
Name Description
prototype SafetyRating
Returns
Type Description
SafetyRating.Builder

parseDelimitedFrom(InputStream input)

publicstaticSafetyRatingparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
SafetyRating
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticSafetyRatingparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SafetyRating
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticSafetyRatingparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
SafetyRating
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticSafetyRatingparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SafetyRating
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticSafetyRatingparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
SafetyRating
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticSafetyRatingparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SafetyRating
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticSafetyRatingparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
SafetyRating
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticSafetyRatingparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SafetyRating
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticSafetyRatingparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
SafetyRating
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticSafetyRatingparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SafetyRating
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticSafetyRatingparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
SafetyRating
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticSafetyRatingparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SafetyRating
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<SafetyRating>parser()
Returns
Type Description
Parser<SafetyRating>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBlocked()

publicbooleangetBlocked()

Output only. Indicates whether the content was filtered out because of this rating.

bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The blocked.

getCategory()

publicHarmCategorygetCategory()

Output only. Harm category.

.google.cloud.vertexai.v1beta1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
HarmCategory

The category.

getCategoryValue()

publicintgetCategoryValue()

Output only. Harm category.

.google.cloud.vertexai.v1beta1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for category.

getDefaultInstanceForType()

publicSafetyRatinggetDefaultInstanceForType()
Returns
Type Description
SafetyRating

getParserForType()

publicParser<SafetyRating>getParserForType()
Returns
Type Description
Parser<SafetyRating>
Overrides

getProbability()

publicSafetyRating.HarmProbabilitygetProbability()

Output only. Harm probability levels in the content.

.google.cloud.vertexai.v1beta1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SafetyRating.HarmProbability

The probability.

getProbabilityValue()

publicintgetProbabilityValue()

Output only. Harm probability levels in the content.

.google.cloud.vertexai.v1beta1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for probability.

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicSafetyRating.BuildernewBuilderForType()
Returns
Type Description
SafetyRating.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedSafetyRating.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
SafetyRating.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicSafetyRating.BuildertoBuilder()
Returns
Type Description
SafetyRating.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.