Class AbstractErrorUtils.ErrorPath<GoogleAdsErrorType extends com.google.protobuf.Message>

  • Enclosing class:
    AbstractErrorUtils<GoogleAdsFailureT extends com.google.protobuf.Message,​GoogleAdsErrorT extends com.google.protobuf.Message,​FieldPathElementT extends com.google.protobuf.Message>

    protected static class AbstractErrorUtils.ErrorPath<GoogleAdsErrorType extends com.google.protobuf.Message>
    extends java.lang.Object
    Wrapper around a (@link GoogleAdsErrorT} specifying the location the error occurred, if available.

    Although multiple field paths are possible in a GoogleAdsError, this object only contains the first FieldPathElement. Currently this is the only element required to identify which operation caused the failure, though future updates may expand on this class to provide additional information from the FieldPathElements.

    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorPath​(GoogleAdsErrorType error, java.lang.String fieldName, java.util.Optional<java.lang.Long> index)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      GoogleAdsErrorType getError()  
      java.lang.String getFieldName()  
      java.util.Optional<java.lang.Long> getIndex()
      Returns the index portion of this error path element.
      boolean isOperationIndex()
      Returns if the field represents the portion of the error path that identifies the index of an operation in a request.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ErrorPath

        public ErrorPath​(GoogleAdsErrorType error,
                         java.lang.String fieldName,
                         java.util.Optional<java.lang.Long> index)
    • Method Detail

      • getFieldName

        public java.lang.String getFieldName()
      • getIndex

        public java.util.Optional<java.lang.Long> getIndex()
        Returns the index portion of this error path element.
      • isOperationIndex

        public boolean isOperationIndex()
        Returns if the field represents the portion of the error path that identifies the index of an operation in a request.