Class SafeSearchAnnotation (3.6.0) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 3.6.0keyboard_arrow_down  
  
 
    
    
    
      
  
  
  
    
public   final   class  SafeSearchAnnotation   extends   GeneratedMessageV3   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.v1p2beta1.SafeSearchAnnotation
Static Fields
   
  ADULT_FIELD_NUMBER 
  
    
public   static   final   int   ADULT_FIELD_NUMBER  
  Field Value 
  
  MEDICAL_FIELD_NUMBER 
  
    
public   static   final   int   MEDICAL_FIELD_NUMBER  
  Field Value 
  
  RACY_FIELD_NUMBER 
  
    
public   static   final   int   RACY_FIELD_NUMBER  
  Field Value 
  
  SPOOF_FIELD_NUMBER 
  
    
public   static   final   int   SPOOF_FIELD_NUMBER  
  Field Value 
  
  VIOLENCE_FIELD_NUMBER 
  
    
public   static   final   int   VIOLENCE_FIELD_NUMBER  
  Field Value 
  
  Static Methods
   
  getDefaultInstance() 
  
    
public   static   SafeSearchAnnotation   getDefaultInstance ()  
  Returns 
  
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  Returns 
  
  newBuilder() 
  
    
public   static   SafeSearchAnnotation . Builder   newBuilder ()  
  Returns 
  
  newBuilder(SafeSearchAnnotation prototype) 
  
    
public   static   SafeSearchAnnotation . Builder   newBuilder ( SafeSearchAnnotation   prototype )  
  Parameter 
  
  Returns 
  
  
    
public   static   SafeSearchAnnotation   parseDelimitedFrom ( InputStream   input )  
  Parameter 
  
  Returns 
  
  Exceptions 
  
  
    
public   static   SafeSearchAnnotation   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  parseFrom(byte[] data) 
  
    
public   static   SafeSearchAnnotation   parseFrom ( byte []   data )  
  Parameter 
  
    
      
        Name Description  
      
        data byte [] 
     
  
  Returns 
  
  Exceptions 
  
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   SafeSearchAnnotation   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  parseFrom(ByteString data) 
  
    
public   static   SafeSearchAnnotation   parseFrom ( ByteString   data )  
  Parameter 
  
  Returns 
  
  Exceptions 
  
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   SafeSearchAnnotation   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  
    
public   static   SafeSearchAnnotation   parseFrom ( CodedInputStream   input )  
  Parameter 
  
  Returns 
  
  Exceptions 
  
  
    
public   static   SafeSearchAnnotation   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  
    
public   static   SafeSearchAnnotation   parseFrom ( InputStream   input )  
  Parameter 
  
  Returns 
  
  Exceptions 
  
  
    
public   static   SafeSearchAnnotation   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  parseFrom(ByteBuffer data) 
  
    
public   static   SafeSearchAnnotation   parseFrom ( ByteBuffer   data )  
  Parameter 
  
  Returns 
  
  Exceptions 
  
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   SafeSearchAnnotation   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  parser() 
  
    
public   static   Parser<SafeSearchAnnotation>   parser ()  
  Returns 
  
  Methods
   
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  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.v1p2beta1.Likelihood adult = 1;
Returns 
  
  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.v1p2beta1.Likelihood adult = 1;
Returns 
  
    
      
        Type Description  
      
        int The enum numeric value on the wire for adult.
 
     
  
  getDefaultInstanceForType() 
  
    
public   SafeSearchAnnotation   getDefaultInstanceForType ()  
  Returns 
  
  getMedical() 
  
    
public   Likelihood   getMedical ()  
   Likelihood that this is a medical image.
 .google.cloud.vision.v1p2beta1.Likelihood medical = 3;
Returns 
  
  getMedicalValue() 
  
    
public   int   getMedicalValue ()  
   Likelihood that this is a medical image.
 .google.cloud.vision.v1p2beta1.Likelihood medical = 3;
Returns 
  
    
      
        Type Description  
      
        int The enum numeric value on the wire for medical.
 
     
  
  getParserForType() 
  
    
public   Parser<SafeSearchAnnotation>   getParserForType ()  
  Returns 
  
  Overrides 
  
  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.v1p2beta1.Likelihood racy = 9;
Returns 
  
  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.v1p2beta1.Likelihood racy = 9;
Returns 
  
    
      
        Type Description  
      
        int The enum numeric value on the wire for racy.
 
     
  
  getSerializedSize() 
  
    
public   int   getSerializedSize ()  
  Returns 
  
  Overrides 
  
  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.v1p2beta1.Likelihood spoof = 2;
Returns 
  
  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.v1p2beta1.Likelihood spoof = 2;
Returns 
  
    
      
        Type Description  
      
        int The enum numeric value on the wire for spoof.
 
     
  
  getUnknownFields() 
  
    
public   final   UnknownFieldSet   getUnknownFields ()  
  Returns 
  
  Overrides 
  
  getViolence() 
  
    
public   Likelihood   getViolence ()  
   Likelihood that this image contains violent content.
 .google.cloud.vision.v1p2beta1.Likelihood violence = 4;
Returns 
  
  getViolenceValue() 
  
    
public   int   getViolenceValue ()  
   Likelihood that this image contains violent content.
 .google.cloud.vision.v1p2beta1.Likelihood violence = 4;
Returns 
  
    
      
        Type Description  
      
        int The enum numeric value on the wire for violence.
 
     
  
  hashCode() 
  
  Returns 
  
  Overrides 
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  Returns 
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  Returns 
  
  Overrides 
  
  newBuilderForType() 
  
    
public   SafeSearchAnnotation . Builder   newBuilderForType ()  
  Returns 
  
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   SafeSearchAnnotation . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  toBuilder() 
  
    
public   SafeSearchAnnotation . Builder   toBuilder ()  
  Returns 
  
  writeTo(CodedOutputStream output) 
  
    
public   void   writeTo ( CodedOutputStream   output )  
  Parameter 
  
  Overrides 
  
  Exceptions 
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-29 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-29 UTC."],[],[]]