Class SafeSearchAnnotation.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
- com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder
-
- All Implemented Interfaces:
SafeSearchAnnotationOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- SafeSearchAnnotation
public static final class SafeSearchAnnotation.Builder extends com.google.protobuf.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 typegoogle.cloud.vision.v1p4beta1.SafeSearchAnnotation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SafeSearchAnnotation.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SafeSearchAnnotation
build()
SafeSearchAnnotation
buildPartial()
SafeSearchAnnotation.Builder
clear()
SafeSearchAnnotation.Builder
clearAdult()
Represents the adult content likelihood for the image.SafeSearchAnnotation.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
SafeSearchAnnotation.Builder
clearMedical()
Likelihood that this is a medical image.SafeSearchAnnotation.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
SafeSearchAnnotation.Builder
clearRacy()
Likelihood that the request image contains racy content.SafeSearchAnnotation.Builder
clearSpoof()
Spoof likelihood.SafeSearchAnnotation.Builder
clearViolence()
Likelihood that this image contains violent content.SafeSearchAnnotation.Builder
clone()
Likelihood
getAdult()
Represents the adult content likelihood for the image.int
getAdultValue()
Represents the adult content likelihood for the image.SafeSearchAnnotation
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
Likelihood
getMedical()
Likelihood that this is a medical image.int
getMedicalValue()
Likelihood that this is a medical image.Likelihood
getRacy()
Likelihood that the request image contains racy content.int
getRacyValue()
Likelihood that the request image contains racy content.Likelihood
getSpoof()
Spoof likelihood.int
getSpoofValue()
Spoof likelihood.Likelihood
getViolence()
Likelihood that this image contains violent content.int
getViolenceValue()
Likelihood that this image contains violent content.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
SafeSearchAnnotation.Builder
mergeFrom(SafeSearchAnnotation other)
SafeSearchAnnotation.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
SafeSearchAnnotation.Builder
mergeFrom(com.google.protobuf.Message other)
SafeSearchAnnotation.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
SafeSearchAnnotation.Builder
setAdult(Likelihood value)
Represents the adult content likelihood for the image.SafeSearchAnnotation.Builder
setAdultValue(int value)
Represents the adult content likelihood for the image.SafeSearchAnnotation.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SafeSearchAnnotation.Builder
setMedical(Likelihood value)
Likelihood that this is a medical image.SafeSearchAnnotation.Builder
setMedicalValue(int value)
Likelihood that this is a medical image.SafeSearchAnnotation.Builder
setRacy(Likelihood value)
Likelihood that the request image contains racy content.SafeSearchAnnotation.Builder
setRacyValue(int value)
Likelihood that the request image contains racy content.SafeSearchAnnotation.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
SafeSearchAnnotation.Builder
setSpoof(Likelihood value)
Spoof likelihood.SafeSearchAnnotation.Builder
setSpoofValue(int value)
Spoof likelihood.SafeSearchAnnotation.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
SafeSearchAnnotation.Builder
setViolence(Likelihood value)
Likelihood that this image contains violent content.SafeSearchAnnotation.Builder
setViolenceValue(int value)
Likelihood that this image contains violent content.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
clear
public SafeSearchAnnotation.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
getDefaultInstanceForType
public SafeSearchAnnotation getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public SafeSearchAnnotation build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SafeSearchAnnotation buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SafeSearchAnnotation.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
setField
public SafeSearchAnnotation.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
clearField
public SafeSearchAnnotation.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
clearOneof
public SafeSearchAnnotation.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
setRepeatedField
public SafeSearchAnnotation.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
addRepeatedField
public SafeSearchAnnotation.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
mergeFrom
public SafeSearchAnnotation.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SafeSearchAnnotation.Builder>
-
mergeFrom
public SafeSearchAnnotation.Builder mergeFrom(SafeSearchAnnotation other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
mergeFrom
public SafeSearchAnnotation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SafeSearchAnnotation.Builder>
- Throws:
IOException
-
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;
- Specified by:
getAdultValue
in interfaceSafeSearchAnnotationOrBuilder
- Returns:
- The enum numeric value on the wire for adult.
-
setAdultValue
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;
- Parameters:
value
- The enum numeric value on the wire for adult to set.- Returns:
- This builder for chaining.
-
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;
- Specified by:
getAdult
in interfaceSafeSearchAnnotationOrBuilder
- Returns:
- The adult.
-
setAdult
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;
- Parameters:
value
- The adult to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
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;
- Specified by:
getSpoofValue
in interfaceSafeSearchAnnotationOrBuilder
- Returns:
- The enum numeric value on the wire for spoof.
-
setSpoofValue
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;
- Parameters:
value
- The enum numeric value on the wire for spoof to set.- Returns:
- This builder for chaining.
-
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;
- Specified by:
getSpoof
in interfaceSafeSearchAnnotationOrBuilder
- Returns:
- The spoof.
-
setSpoof
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;
- Parameters:
value
- The spoof to set.- Returns:
- 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:
- This builder for chaining.
-
getMedicalValue
public int getMedicalValue()
Likelihood that this is a medical image.
.google.cloud.vision.v1p4beta1.Likelihood medical = 3;
- Specified by:
getMedicalValue
in interfaceSafeSearchAnnotationOrBuilder
- Returns:
- The enum numeric value on the wire for medical.
-
setMedicalValue
public SafeSearchAnnotation.Builder setMedicalValue(int value)
Likelihood that this is a medical image.
.google.cloud.vision.v1p4beta1.Likelihood medical = 3;
- Parameters:
value
- The enum numeric value on the wire for medical to set.- Returns:
- This builder for chaining.
-
getMedical
public Likelihood getMedical()
Likelihood that this is a medical image.
.google.cloud.vision.v1p4beta1.Likelihood medical = 3;
- Specified by:
getMedical
in interfaceSafeSearchAnnotationOrBuilder
- Returns:
- The medical.
-
setMedical
public SafeSearchAnnotation.Builder setMedical(Likelihood value)
Likelihood that this is a medical image.
.google.cloud.vision.v1p4beta1.Likelihood medical = 3;
- Parameters:
value
- The medical to set.- Returns:
- This builder for chaining.
-
clearMedical
public SafeSearchAnnotation.Builder clearMedical()
Likelihood that this is a medical image.
.google.cloud.vision.v1p4beta1.Likelihood medical = 3;
- Returns:
- This builder for chaining.
-
getViolenceValue
public int getViolenceValue()
Likelihood that this image contains violent content.
.google.cloud.vision.v1p4beta1.Likelihood violence = 4;
- Specified by:
getViolenceValue
in interfaceSafeSearchAnnotationOrBuilder
- Returns:
- The enum numeric value on the wire for violence.
-
setViolenceValue
public SafeSearchAnnotation.Builder setViolenceValue(int value)
Likelihood that this image contains violent content.
.google.cloud.vision.v1p4beta1.Likelihood violence = 4;
- Parameters:
value
- The enum numeric value on the wire for violence to set.- Returns:
- This builder for chaining.
-
getViolence
public Likelihood getViolence()
Likelihood that this image contains violent content.
.google.cloud.vision.v1p4beta1.Likelihood violence = 4;
- Specified by:
getViolence
in interfaceSafeSearchAnnotationOrBuilder
- Returns:
- The violence.
-
setViolence
public SafeSearchAnnotation.Builder setViolence(Likelihood value)
Likelihood that this image contains violent content.
.google.cloud.vision.v1p4beta1.Likelihood violence = 4;
- Parameters:
value
- The violence to set.- Returns:
- This builder for chaining.
-
clearViolence
public SafeSearchAnnotation.Builder clearViolence()
Likelihood that this image contains violent content.
.google.cloud.vision.v1p4beta1.Likelihood violence = 4;
- Returns:
- This builder for chaining.
-
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;
- Specified by:
getRacyValue
in interfaceSafeSearchAnnotationOrBuilder
- Returns:
- The enum numeric value on the wire for racy.
-
setRacyValue
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;
- Parameters:
value
- The enum numeric value on the wire for racy to set.- Returns:
- This builder for chaining.
-
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;
- Specified by:
getRacy
in interfaceSafeSearchAnnotationOrBuilder
- Returns:
- The racy.
-
setRacy
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;
- Parameters:
value
- The racy to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setUnknownFields
public final SafeSearchAnnotation.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
mergeUnknownFields
public final SafeSearchAnnotation.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
-