Class SafeSearchAnnotation.Builder (3.19.0)

public static final class SafeSearchAnnotation.Builder extends GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder> 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.v1p4beta1.SafeSearchAnnotation

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SafeSearchAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SafeSearchAnnotation.Builder
Overrides

build()

public SafeSearchAnnotation build()
Returns
TypeDescription
SafeSearchAnnotation

buildPartial()

public SafeSearchAnnotation buildPartial()
Returns
TypeDescription
SafeSearchAnnotation

clear()

public SafeSearchAnnotation.Builder clear()
Returns
TypeDescription
SafeSearchAnnotation.Builder
Overrides

clearAdult()

public SafeSearchAnnotation.Builder clearAdult()

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.v1p4beta1.Likelihood adult = 1;

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SafeSearchAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SafeSearchAnnotation.Builder
Overrides

clearMedical()

public SafeSearchAnnotation.Builder clearMedical()

Likelihood that this is a medical image.

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

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SafeSearchAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SafeSearchAnnotation.Builder
Overrides

clearRacy()

public SafeSearchAnnotation.Builder clearRacy()

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.v1p4beta1.Likelihood racy = 9;

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

clearSpoof()

public SafeSearchAnnotation.Builder clearSpoof()

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.v1p4beta1.Likelihood spoof = 2;

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

clearViolence()

public SafeSearchAnnotation.Builder clearViolence()

Likelihood that this image contains violent content.

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

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

clone()

public SafeSearchAnnotation.Builder clone()
Returns
TypeDescription
SafeSearchAnnotation.Builder
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.v1p4beta1.Likelihood adult = 1;

Returns
TypeDescription
Likelihood

The adult.

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.v1p4beta1.Likelihood adult = 1;

Returns
TypeDescription
int

The enum numeric value on the wire for adult.

getDefaultInstanceForType()

public SafeSearchAnnotation getDefaultInstanceForType()
Returns
TypeDescription
SafeSearchAnnotation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMedical()

public Likelihood getMedical()

Likelihood that this is a medical image.

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

Returns
TypeDescription
Likelihood

The medical.

getMedicalValue()

public int getMedicalValue()

Likelihood that this is a medical image.

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

Returns
TypeDescription
int

The enum numeric value on the wire for medical.

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.v1p4beta1.Likelihood racy = 9;

Returns
TypeDescription
Likelihood

The racy.

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.v1p4beta1.Likelihood racy = 9;

Returns
TypeDescription
int

The enum numeric value on the wire for racy.

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.v1p4beta1.Likelihood spoof = 2;

Returns
TypeDescription
Likelihood

The spoof.

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.v1p4beta1.Likelihood spoof = 2;

Returns
TypeDescription
int

The enum numeric value on the wire for spoof.

getViolence()

public Likelihood getViolence()

Likelihood that this image contains violent content.

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

Returns
TypeDescription
Likelihood

The violence.

getViolenceValue()

public int getViolenceValue()

Likelihood that this image contains violent content.

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

Returns
TypeDescription
int

The enum numeric value on the wire for violence.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SafeSearchAnnotation other)

public SafeSearchAnnotation.Builder mergeFrom(SafeSearchAnnotation other)
Parameter
NameDescription
otherSafeSearchAnnotation
Returns
TypeDescription
SafeSearchAnnotation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SafeSearchAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SafeSearchAnnotation.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SafeSearchAnnotation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SafeSearchAnnotation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SafeSearchAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SafeSearchAnnotation.Builder
Overrides

setAdult(Likelihood value)

public SafeSearchAnnotation.Builder setAdult(Likelihood value)

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.v1p4beta1.Likelihood adult = 1;

Parameter
NameDescription
valueLikelihood

The adult to set.

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

setAdultValue(int value)

public SafeSearchAnnotation.Builder setAdultValue(int value)

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.v1p4beta1.Likelihood adult = 1;

Parameter
NameDescription
valueint

The enum numeric value on the wire for adult to set.

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SafeSearchAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SafeSearchAnnotation.Builder
Overrides

setMedical(Likelihood value)

public SafeSearchAnnotation.Builder setMedical(Likelihood value)

Likelihood that this is a medical image.

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

Parameter
NameDescription
valueLikelihood

The medical to set.

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

setMedicalValue(int value)

public SafeSearchAnnotation.Builder setMedicalValue(int value)

Likelihood that this is a medical image.

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

Parameter
NameDescription
valueint

The enum numeric value on the wire for medical to set.

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

setRacy(Likelihood value)

public SafeSearchAnnotation.Builder setRacy(Likelihood value)

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.v1p4beta1.Likelihood racy = 9;

Parameter
NameDescription
valueLikelihood

The racy to set.

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

setRacyValue(int value)

public SafeSearchAnnotation.Builder setRacyValue(int value)

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.v1p4beta1.Likelihood racy = 9;

Parameter
NameDescription
valueint

The enum numeric value on the wire for racy to set.

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SafeSearchAnnotation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SafeSearchAnnotation.Builder
Overrides

setSpoof(Likelihood value)

public SafeSearchAnnotation.Builder setSpoof(Likelihood value)

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.v1p4beta1.Likelihood spoof = 2;

Parameter
NameDescription
valueLikelihood

The spoof to set.

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

setSpoofValue(int value)

public SafeSearchAnnotation.Builder setSpoofValue(int value)

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.v1p4beta1.Likelihood spoof = 2;

Parameter
NameDescription
valueint

The enum numeric value on the wire for spoof to set.

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SafeSearchAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SafeSearchAnnotation.Builder
Overrides

setViolence(Likelihood value)

public SafeSearchAnnotation.Builder setViolence(Likelihood value)

Likelihood that this image contains violent content.

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

Parameter
NameDescription
valueLikelihood

The violence to set.

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.

setViolenceValue(int value)

public SafeSearchAnnotation.Builder setViolenceValue(int value)

Likelihood that this image contains violent content.

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

Parameter
NameDescription
valueint

The enum numeric value on the wire for violence to set.

Returns
TypeDescription
SafeSearchAnnotation.Builder

This builder for chaining.