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.v1p1beta1.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.v1p1beta1.SafeSearchAnnotation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SafeSearchAnnotation.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)SafeSearchAnnotationbuild()SafeSearchAnnotationbuildPartial()SafeSearchAnnotation.Builderclear()SafeSearchAnnotation.BuilderclearAdult()Represents the adult content likelihood for the image.SafeSearchAnnotation.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)SafeSearchAnnotation.BuilderclearMedical()Likelihood that this is a medical image.SafeSearchAnnotation.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)SafeSearchAnnotation.BuilderclearRacy()Likelihood that the request image contains racy content.SafeSearchAnnotation.BuilderclearSpoof()Spoof likelihood.SafeSearchAnnotation.BuilderclearViolence()Likelihood that this image contains violent content.SafeSearchAnnotation.Builderclone()LikelihoodgetAdult()Represents the adult content likelihood for the image.intgetAdultValue()Represents the adult content likelihood for the image.SafeSearchAnnotationgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()LikelihoodgetMedical()Likelihood that this is a medical image.intgetMedicalValue()Likelihood that this is a medical image.LikelihoodgetRacy()Likelihood that the request image contains racy content.intgetRacyValue()Likelihood that the request image contains racy content.LikelihoodgetSpoof()Spoof likelihood.intgetSpoofValue()Spoof likelihood.LikelihoodgetViolence()Likelihood that this image contains violent content.intgetViolenceValue()Likelihood that this image contains violent content.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()SafeSearchAnnotation.BuildermergeFrom(SafeSearchAnnotation other)SafeSearchAnnotation.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)SafeSearchAnnotation.BuildermergeFrom(com.google.protobuf.Message other)SafeSearchAnnotation.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)SafeSearchAnnotation.BuildersetAdult(Likelihood value)Represents the adult content likelihood for the image.SafeSearchAnnotation.BuildersetAdultValue(int value)Represents the adult content likelihood for the image.SafeSearchAnnotation.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)SafeSearchAnnotation.BuildersetMedical(Likelihood value)Likelihood that this is a medical image.SafeSearchAnnotation.BuildersetMedicalValue(int value)Likelihood that this is a medical image.SafeSearchAnnotation.BuildersetRacy(Likelihood value)Likelihood that the request image contains racy content.SafeSearchAnnotation.BuildersetRacyValue(int value)Likelihood that the request image contains racy content.SafeSearchAnnotation.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)SafeSearchAnnotation.BuildersetSpoof(Likelihood value)Spoof likelihood.SafeSearchAnnotation.BuildersetSpoofValue(int value)Spoof likelihood.SafeSearchAnnotation.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)SafeSearchAnnotation.BuildersetViolence(Likelihood value)Likelihood that this image contains violent content.SafeSearchAnnotation.BuildersetViolenceValue(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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
clear
public SafeSearchAnnotation.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
getDefaultInstanceForType
public SafeSearchAnnotation getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public SafeSearchAnnotation build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SafeSearchAnnotation buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SafeSearchAnnotation.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
setField
public SafeSearchAnnotation.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
clearField
public SafeSearchAnnotation.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
clearOneof
public SafeSearchAnnotation.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
setRepeatedField
public SafeSearchAnnotation.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
addRepeatedField
public SafeSearchAnnotation.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
mergeFrom
public SafeSearchAnnotation.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SafeSearchAnnotation.Builder>
-
mergeFrom
public SafeSearchAnnotation.Builder mergeFrom(SafeSearchAnnotation other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
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.v1p1beta1.Likelihood adult = 1;- Specified by:
getAdultValuein 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.v1p1beta1.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.v1p1beta1.Likelihood adult = 1;- Specified by:
getAdultin 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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.Likelihood spoof = 2;- Specified by:
getSpoofValuein 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.v1p1beta1.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.v1p1beta1.Likelihood spoof = 2;- Specified by:
getSpoofin 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.v1p1beta1.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.v1p1beta1.Likelihood spoof = 2;- Returns:
- This builder for chaining.
-
getMedicalValue
public int getMedicalValue()
Likelihood that this is a medical image.
.google.cloud.vision.v1p1beta1.Likelihood medical = 3;- Specified by:
getMedicalValuein 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.v1p1beta1.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.v1p1beta1.Likelihood medical = 3;- Specified by:
getMedicalin interfaceSafeSearchAnnotationOrBuilder- Returns:
- The medical.
-
setMedical
public SafeSearchAnnotation.Builder setMedical(Likelihood value)
Likelihood that this is a medical image.
.google.cloud.vision.v1p1beta1.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.v1p1beta1.Likelihood medical = 3;- Returns:
- This builder for chaining.
-
getViolenceValue
public int getViolenceValue()
Likelihood that this image contains violent content.
.google.cloud.vision.v1p1beta1.Likelihood violence = 4;- Specified by:
getViolenceValuein 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.v1p1beta1.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.v1p1beta1.Likelihood violence = 4;- Specified by:
getViolencein interfaceSafeSearchAnnotationOrBuilder- Returns:
- The violence.
-
setViolence
public SafeSearchAnnotation.Builder setViolence(Likelihood value)
Likelihood that this image contains violent content.
.google.cloud.vision.v1p1beta1.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.v1p1beta1.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.v1p1beta1.Likelihood racy = 9;- Specified by:
getRacyValuein 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.v1p1beta1.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.v1p1beta1.Likelihood racy = 9;- Specified by:
getRacyin 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.v1p1beta1.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.v1p1beta1.Likelihood racy = 9;- Returns:
- This builder for chaining.
-
setUnknownFields
public final SafeSearchAnnotation.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
mergeUnknownFields
public final SafeSearchAnnotation.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
-
-