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 Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<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.GeneratedMessage.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.GeneratedMessage.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
    • mergeFrom

      public SafeSearchAnnotation.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SafeSearchAnnotation.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      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.v1.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.v1.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.v1.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.v1.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.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:
      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.v1.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.v1.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.v1.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.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:
      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.v1.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.v1.Likelihood medical = 3;
      Specified by:
      getMedical in interface SafeSearchAnnotationOrBuilder
      Returns:
      The medical.
    • setMedical

      public SafeSearchAnnotation.Builder setMedical(Likelihood value)
       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

      public SafeSearchAnnotation.Builder 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:
      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. 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

      public Likelihood 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:
      getViolence in interface SafeSearchAnnotationOrBuilder
      Returns:
      The violence.
    • setViolence

      public SafeSearchAnnotation.Builder setViolence(Likelihood value)
       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

      public SafeSearchAnnotation.Builder 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:
      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.v1.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.v1.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.v1.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.v1.Likelihood racy = 9;
      Returns:
      This builder for chaining.