Class Location (3.4.0) 
  
      
     
  
  
  
   
  
    
  
  
    
    
    
  Version 3.4.0keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   final   class  Location   extends   GeneratedMessageV3   implements   LocationOrBuilder  
   
   Specifies the location of the finding.
 Protobuf type google.privacy.dlp.v2.Location
 
  
  
  
  Static Fields
   
  BYTE_RANGE_FIELD_NUMBER 
  
    
public   static   final   int   BYTE_RANGE_FIELD_NUMBER  
   
  Field Value 
  
  CODEPOINT_RANGE_FIELD_NUMBER 
  
    
public   static   final   int   CODEPOINT_RANGE_FIELD_NUMBER  
   
  Field Value 
  
  CONTAINER_FIELD_NUMBER 
  
    
public   static   final   int   CONTAINER_FIELD_NUMBER  
   
  Field Value 
  
  CONTENT_LOCATIONS_FIELD_NUMBER 
  
    
public   static   final   int   CONTENT_LOCATIONS_FIELD_NUMBER  
   
  Field Value 
  
  Static Methods
   
   
  getDefaultInstance() 
  
    
public   static   Location   getDefaultInstance ()  
   
  Returns 
  
   
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
   
  Returns 
  
   
  newBuilder() 
  
    
public   static   Location . Builder   newBuilder ()  
   
  Returns 
  
   
  newBuilder(Location prototype) 
  
    
public   static   Location . Builder   newBuilder ( Location   prototype )  
   
  Parameter 
  
  Returns 
  
   
  
  
    
public   static   Location   parseDelimitedFrom ( InputStream   input )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  
  
    
public   static   Location   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(byte[] data) 
  
    
public   static   Location   parseFrom ( byte []   data )  
   
  Parameter 
  
    
      
        Name  
        Description  
       
      
        data  
        byte [] 
       
     
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Location   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteString data) 
  
    
public   static   Location   parseFrom ( ByteString   data )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Location   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  
  
    
public   static   Location   parseFrom ( CodedInputStream   input )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  
  
    
public   static   Location   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  
  
    
public   static   Location   parseFrom ( InputStream   input )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  
  
    
public   static   Location   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteBuffer data) 
  
    
public   static   Location   parseFrom ( ByteBuffer   data )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Location   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parser() 
  
    
public   static   Parser<Location>   parser ()  
   
  Returns 
  
  Methods
   
   
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  getByteRange() 
  
    
public   Range   getByteRange ()  
   
   Zero-based byte offsets delimiting the finding.
 These are relative to the finding's containing element.
 Note that when the content is not textual, this references
 the UTF-8 encoded textual representation of the content.
 Omitted if content is an image.
 .google.privacy.dlp.v2.Range byte_range = 1;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        Range  
        The byteRange.
 
       
     
  
   
  getByteRangeOrBuilder() 
  
    
public   RangeOrBuilder   getByteRangeOrBuilder ()  
   
   Zero-based byte offsets delimiting the finding.
 These are relative to the finding's containing element.
 Note that when the content is not textual, this references
 the UTF-8 encoded textual representation of the content.
 Omitted if content is an image.
 .google.privacy.dlp.v2.Range byte_range = 1;
 
  Returns 
  
   
  getCodepointRange() 
  
    
public   Range   getCodepointRange ()  
   
   Unicode character offsets delimiting the finding.
 These are relative to the finding's containing element.
 Provided when the content is text.
 .google.privacy.dlp.v2.Range codepoint_range = 2;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        Range  
        The codepointRange.
 
       
     
  
   
  getCodepointRangeOrBuilder() 
  
    
public   RangeOrBuilder   getCodepointRangeOrBuilder ()  
   
   Unicode character offsets delimiting the finding.
 These are relative to the finding's containing element.
 Provided when the content is text.
 .google.privacy.dlp.v2.Range codepoint_range = 2;
 
  Returns 
  
   
  getContainer() 
  
    
public   Container   getContainer ()  
   
   Information about the container where this finding occurred, if available.
 .google.privacy.dlp.v2.Container container = 8;
 
  Returns 
  
   
  getContainerOrBuilder() 
  
    
public   ContainerOrBuilder   getContainerOrBuilder ()  
   
   Information about the container where this finding occurred, if available.
 .google.privacy.dlp.v2.Container container = 8;
 
  Returns 
  
   
  getContentLocations(int index) 
  
    
public   ContentLocation   getContentLocations ( int   index )  
   
   List of nested objects pointing to the precise location of the finding
 within the file or record.
 repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        index  
        int  
       
     
  
  Returns 
  
   
  getContentLocationsCount() 
  
    
public   int   getContentLocationsCount ()  
   
   List of nested objects pointing to the precise location of the finding
 within the file or record.
 repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;
 
  Returns 
  
   
  getContentLocationsList() 
  
    
public   List<ContentLocation>   getContentLocationsList ()  
   
   List of nested objects pointing to the precise location of the finding
 within the file or record.
 repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;
 
  Returns 
  
   
  getContentLocationsOrBuilder(int index) 
  
    
public   ContentLocationOrBuilder   getContentLocationsOrBuilder ( int   index )  
   
   List of nested objects pointing to the precise location of the finding
 within the file or record.
 repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        index  
        int  
       
     
  
  Returns 
  
   
  getContentLocationsOrBuilderList() 
  
    
public   List <?   extends   ContentLocationOrBuilder >  getContentLocationsOrBuilderList ()  
   
   List of nested objects pointing to the precise location of the finding
 within the file or record.
 repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        List <? extends com.google.privacy.dlp.v2.ContentLocationOrBuilder > 
         
       
     
  
   
  getDefaultInstanceForType() 
  
    
public   Location   getDefaultInstanceForType ()  
   
  Returns 
  
   
  getParserForType() 
  
    
public   Parser<Location>   getParserForType ()  
   
  Returns 
  
  Overrides 
  
   
  getSerializedSize() 
  
    
public   int   getSerializedSize ()  
   
  Returns 
  
  Overrides 
  
   
  getUnknownFields() 
  
    
public   final   UnknownFieldSet   getUnknownFields ()  
   
  Returns 
  
  Overrides 
  
   
  hasByteRange() 
  
    
public   boolean   hasByteRange ()  
   
   Zero-based byte offsets delimiting the finding.
 These are relative to the finding's containing element.
 Note that when the content is not textual, this references
 the UTF-8 encoded textual representation of the content.
 Omitted if content is an image.
 .google.privacy.dlp.v2.Range byte_range = 1;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        boolean  
        Whether the byteRange field is set.
 
       
     
  
   
  hasCodepointRange() 
  
    
public   boolean   hasCodepointRange ()  
   
   Unicode character offsets delimiting the finding.
 These are relative to the finding's containing element.
 Provided when the content is text.
 .google.privacy.dlp.v2.Range codepoint_range = 2;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        boolean  
        Whether the codepointRange field is set.
 
       
     
  
   
  hasContainer() 
  
    
public   boolean   hasContainer ()  
   
   Information about the container where this finding occurred, if available.
 .google.privacy.dlp.v2.Container container = 8;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        boolean  
        Whether the container field is set.
 
       
     
  
   
  hashCode() 
  
  Returns 
  
  Overrides 
  
   
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
   
  Returns 
  
  Overrides 
  
   
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
   
  Returns 
  
  Overrides 
  
   
  newBuilderForType() 
  
    
public   Location . Builder   newBuilderForType ()  
   
  Returns 
  
   
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   Location . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  toBuilder() 
  
    
public   Location . 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-30 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-30 UTC."],[],[]]