Class SafeSearchAnnotation (2.0.29)

public final class SafeSearchAnnotation extends GeneratedMessageV3 implements SafeSearchAnnotationOrBuilder

Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).

Protobuf type google.cloud.vision.v1.SafeSearchAnnotation

Static Fields

ADULT_CONFIDENCE_FIELD_NUMBER

public static final int ADULT_CONFIDENCE_FIELD_NUMBER
Field Value
TypeDescription
int

ADULT_FIELD_NUMBER

public static final int ADULT_FIELD_NUMBER
Field Value
TypeDescription
int

MEDICAL_CONFIDENCE_FIELD_NUMBER

public static final int MEDICAL_CONFIDENCE_FIELD_NUMBER
Field Value
TypeDescription
int

MEDICAL_FIELD_NUMBER

public static final int MEDICAL_FIELD_NUMBER
Field Value
TypeDescription
int

NSFW_CONFIDENCE_FIELD_NUMBER

public static final int NSFW_CONFIDENCE_FIELD_NUMBER
Field Value
TypeDescription
int

RACY_CONFIDENCE_FIELD_NUMBER

public static final int RACY_CONFIDENCE_FIELD_NUMBER
Field Value
TypeDescription
int

RACY_FIELD_NUMBER

public static final int RACY_FIELD_NUMBER
Field Value
TypeDescription
int

SPOOF_CONFIDENCE_FIELD_NUMBER

public static final int SPOOF_CONFIDENCE_FIELD_NUMBER
Field Value
TypeDescription
int

SPOOF_FIELD_NUMBER

public static final int SPOOF_FIELD_NUMBER
Field Value
TypeDescription
int

VIOLENCE_CONFIDENCE_FIELD_NUMBER

public static final int VIOLENCE_CONFIDENCE_FIELD_NUMBER
Field Value
TypeDescription
int

VIOLENCE_FIELD_NUMBER

public static final int VIOLENCE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static SafeSearchAnnotation getDefaultInstance()
Returns
TypeDescription
SafeSearchAnnotation

getDescriptor()

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

newBuilder()

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

newBuilder(SafeSearchAnnotation prototype)

public static SafeSearchAnnotation.Builder newBuilder(SafeSearchAnnotation prototype)
Parameter
NameDescription
prototypeSafeSearchAnnotation
Returns
TypeDescription
SafeSearchAnnotation.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAdult()

public Likelihood getAdult()

Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.

.google.cloud.vision.v1.Likelihood adult = 1;

Returns
TypeDescription
Likelihood

The adult.

getAdultConfidence() (deprecated)

public float getAdultConfidence()

Deprecated. google.cloud.vision.v1.SafeSearchAnnotation.adult_confidence is deprecated. See google/cloud/vision/v1/image_annotator.proto;l=582

Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means very confident.

float adult_confidence = 16 [deprecated = true];

Returns
TypeDescription
float

The adultConfidence.

getAdultValue()

public int getAdultValue()

Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.

.google.cloud.vision.v1.Likelihood adult = 1;

Returns
TypeDescription
int

The enum numeric value on the wire for adult.

getDefaultInstanceForType()

public SafeSearchAnnotation getDefaultInstanceForType()
Returns
TypeDescription
SafeSearchAnnotation

getMedical()

public Likelihood getMedical()

Likelihood that this is a medical image.

.google.cloud.vision.v1.Likelihood medical = 3;

Returns
TypeDescription
Likelihood

The medical.

getMedicalConfidence() (deprecated)

public float getMedicalConfidence()

Deprecated. google.cloud.vision.v1.SafeSearchAnnotation.medical_confidence is deprecated. See google/cloud/vision/v1/image_annotator.proto;l=590

Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means very confident.

float medical_confidence = 20 [deprecated = true];

Returns
TypeDescription
float

The medicalConfidence.

getMedicalValue()

public int getMedicalValue()

Likelihood that this is a medical image.

.google.cloud.vision.v1.Likelihood medical = 3;

Returns
TypeDescription
int

The enum numeric value on the wire for medical.

getNsfwConfidence() (deprecated)

public float getNsfwConfidence()

Deprecated. google.cloud.vision.v1.SafeSearchAnnotation.nsfw_confidence is deprecated. See google/cloud/vision/v1/image_annotator.proto;l=602

Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very confident.

float nsfw_confidence = 26 [deprecated = true];

Returns
TypeDescription
float

The nsfwConfidence.

getParserForType()

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

getRacy()

public Likelihood getRacy()

Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.

.google.cloud.vision.v1.Likelihood racy = 9;

Returns
TypeDescription
Likelihood

The racy.

getRacyConfidence() (deprecated)

public float getRacyConfidence()

Deprecated. google.cloud.vision.v1.SafeSearchAnnotation.racy_confidence is deprecated. See google/cloud/vision/v1/image_annotator.proto;l=598

Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very confident.

float racy_confidence = 24 [deprecated = true];

Returns
TypeDescription
float

The racyConfidence.

getRacyValue()

public int getRacyValue()

Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.

.google.cloud.vision.v1.Likelihood racy = 9;

Returns
TypeDescription
int

The enum numeric value on the wire for racy.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSpoof()

public Likelihood getSpoof()

Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.

.google.cloud.vision.v1.Likelihood spoof = 2;

Returns
TypeDescription
Likelihood

The spoof.

getSpoofConfidence() (deprecated)

public float getSpoofConfidence()

Deprecated. google.cloud.vision.v1.SafeSearchAnnotation.spoof_confidence is deprecated. See google/cloud/vision/v1/image_annotator.proto;l=586

Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means very confident.

float spoof_confidence = 18 [deprecated = true];

Returns
TypeDescription
float

The spoofConfidence.

getSpoofValue()

public int getSpoofValue()

Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.

.google.cloud.vision.v1.Likelihood spoof = 2;

Returns
TypeDescription
int

The enum numeric value on the wire for spoof.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getViolence()

public Likelihood getViolence()

Likelihood that this image contains violent content.

.google.cloud.vision.v1.Likelihood violence = 4;

Returns
TypeDescription
Likelihood

The violence.

getViolenceConfidence() (deprecated)

public float getViolenceConfidence()

Deprecated. google.cloud.vision.v1.SafeSearchAnnotation.violence_confidence is deprecated. See google/cloud/vision/v1/image_annotator.proto;l=594

Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means very confident.

float violence_confidence = 22 [deprecated = true];

Returns
TypeDescription
float

The violenceConfidence.

getViolenceValue()

public int getViolenceValue()

Likelihood that this image contains violent content.

.google.cloud.vision.v1.Likelihood violence = 4;

Returns
TypeDescription
int

The enum numeric value on the wire for violence.

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 SafeSearchAnnotation.Builder newBuilderForType()
Returns
TypeDescription
SafeSearchAnnotation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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