Class 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 type google.cloud.vision.v1p4beta1.SafeSearchAnnotation
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
      • clear

        public SafeSearchAnnotation.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
      • getDefaultInstanceForType

        public SafeSearchAnnotation getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public SafeSearchAnnotation build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public SafeSearchAnnotation buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public SafeSearchAnnotation.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
      • setField

        public SafeSearchAnnotation.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
      • clearField

        public SafeSearchAnnotation.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
      • clearOneof

        public SafeSearchAnnotation.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.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 interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
      • addRepeatedField

        public SafeSearchAnnotation.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.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 interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.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 interface SafeSearchAnnotationOrBuilder
        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 interface SafeSearchAnnotationOrBuilder
        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 interface SafeSearchAnnotationOrBuilder
        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 interface SafeSearchAnnotationOrBuilder
        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 interface SafeSearchAnnotationOrBuilder
        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.
      • 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 interface SafeSearchAnnotationOrBuilder
        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 interface SafeSearchAnnotationOrBuilder
        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 interface SafeSearchAnnotationOrBuilder
        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 interface SafeSearchAnnotationOrBuilder
        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 interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>
      • mergeUnknownFields

        public final SafeSearchAnnotation.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SafeSearchAnnotation.Builder>