Package com.google.cloud.vision.v1
Class SafeSearchAnnotation.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SafeSearchAnnotation.Builder>
com.google.cloud.vision.v1.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.GeneratedMessage.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.v1.SafeSearchAnnotation-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Represents the adult content likelihood for the image.Likelihood that this is a medical image.Likelihood that the request image contains racy content.Spoof likelihood.Likelihood that this image contains violent content.getAdult()Represents the adult content likelihood for the image.intRepresents the adult content likelihood for the image.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorLikelihood that this is a medical image.intLikelihood that this is a medical image.getRacy()Likelihood that the request image contains racy content.intLikelihood that the request image contains racy content.getSpoof()Spoof likelihood.intSpoof likelihood.Likelihood that this image contains violent content.intLikelihood that this image contains violent content.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(SafeSearchAnnotation other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setAdult(Likelihood value) Represents the adult content likelihood for the image.setAdultValue(int value) Represents the adult content likelihood for the image.setMedical(Likelihood value) Likelihood that this is a medical image.setMedicalValue(int value) Likelihood that this is a medical image.setRacy(Likelihood value) Likelihood that the request image contains racy content.setRacyValue(int value) Likelihood that the request image contains racy content.setSpoof(Likelihood value) Spoof likelihood.setSpoofValue(int value) Spoof likelihood.setViolence(Likelihood value) Likelihood that this image contains violent content.setViolenceValue(int value) Likelihood that this image contains violent content.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<SafeSearchAnnotation.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<SafeSearchAnnotation.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<SafeSearchAnnotation.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SafeSearchAnnotation.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<SafeSearchAnnotation.Builder>
-
mergeFrom
public SafeSearchAnnotation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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.v1.Likelihood adult = 1;- Specified by:
getAdultValuein interfaceSafeSearchAnnotationOrBuilder- Returns:
- The enum numeric value on the wire for adult.
-
setAdultValue
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;- Parameters:
value- The enum numeric value on the wire for adult to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getAdultin interfaceSafeSearchAnnotationOrBuilder- Returns:
- The adult.
-
setAdult
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;- Parameters:
value- The adult to set.- Returns:
- This builder for chaining.
-
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.v1.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.v1.Likelihood spoof = 2;- Specified by:
getSpoofValuein interfaceSafeSearchAnnotationOrBuilder- Returns:
- The enum numeric value on the wire for spoof.
-
setSpoofValue
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;- Parameters:
value- The enum numeric value on the wire for spoof to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getSpoofin interfaceSafeSearchAnnotationOrBuilder- Returns:
- The spoof.
-
setSpoof
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;- Parameters:
value- The spoof to set.- Returns:
- This builder for chaining.
-
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.v1.Likelihood spoof = 2;- Returns:
- This builder for chaining.
-
getMedicalValue
public int getMedicalValue()Likelihood that this is a medical image.
.google.cloud.vision.v1.Likelihood medical = 3;- Specified by:
getMedicalValuein interfaceSafeSearchAnnotationOrBuilder- Returns:
- The enum numeric value on the wire for medical.
-
setMedicalValue
Likelihood that this is a medical image.
.google.cloud.vision.v1.Likelihood medical = 3;- Parameters:
value- The enum numeric value on the wire for medical to set.- Returns:
- This builder for chaining.
-
getMedical
Likelihood that this is a medical image.
.google.cloud.vision.v1.Likelihood medical = 3;- Specified by:
getMedicalin interfaceSafeSearchAnnotationOrBuilder- Returns:
- The medical.
-
setMedical
Likelihood that this is a medical image.
.google.cloud.vision.v1.Likelihood medical = 3;- Parameters:
value- The medical to set.- Returns:
- This builder for chaining.
-
clearMedical
Likelihood that this is a medical image.
.google.cloud.vision.v1.Likelihood medical = 3;- Returns:
- This builder for chaining.
-
getViolenceValue
public int getViolenceValue()Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.
.google.cloud.vision.v1.Likelihood violence = 4;- Specified by:
getViolenceValuein interfaceSafeSearchAnnotationOrBuilder- Returns:
- The enum numeric value on the wire for violence.
-
setViolenceValue
Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.
.google.cloud.vision.v1.Likelihood violence = 4;- Parameters:
value- The enum numeric value on the wire for violence to set.- Returns:
- This builder for chaining.
-
getViolence
Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.
.google.cloud.vision.v1.Likelihood violence = 4;- Specified by:
getViolencein interfaceSafeSearchAnnotationOrBuilder- Returns:
- The violence.
-
setViolence
Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.
.google.cloud.vision.v1.Likelihood violence = 4;- Parameters:
value- The violence to set.- Returns:
- This builder for chaining.
-
clearViolence
Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.
.google.cloud.vision.v1.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.v1.Likelihood racy = 9;- Specified by:
getRacyValuein interfaceSafeSearchAnnotationOrBuilder- Returns:
- The enum numeric value on the wire for racy.
-
setRacyValue
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;- Parameters:
value- The enum numeric value on the wire for racy to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getRacyin interfaceSafeSearchAnnotationOrBuilder- Returns:
- The racy.
-
setRacy
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;- Parameters:
value- The racy to set.- Returns:
- This builder for chaining.
-
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.v1.Likelihood racy = 9;- Returns:
- This builder for chaining.
-