Class BaseGoogleAdsException.Factory<T extends BaseGoogleAdsException,U extends com.google.protobuf.Message>
java.lang.Object
com.google.ads.googleads.lib.stubs.exceptions.BaseGoogleAdsException.Factory<T,U>
- Enclosing class:
- BaseGoogleAdsException
public abstract static class BaseGoogleAdsException.Factory<T extends BaseGoogleAdsException,U extends com.google.protobuf.Message>
extends Object
Optionally create a GoogleAdsException from a ApiException.
Returns an Optional containing the underlying GoogleAdsException if the ApiException contains the appropriate metadata.
Returns an empty Optional if the required metadata is not present or is not parsable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TcreateException(com.google.api.gax.rpc.ApiException source, byte[] protoData, io.grpc.Metadata metadata) createGoogleAdsException(com.google.api.gax.rpc.ApiException source) abstract UCreate an empty GoogleAdsFailure instance for this version.abstract UcreateGoogleAdsFailure(byte[] serializedBytes) protected static io.grpc.Metadata.Key<byte[]>abstract io.grpc.Metadata.Key<byte[]>Returns a Metadata.Key representing the key which the GoogleAdsFailure is returned in the metadata.
-
Constructor Details
-
Factory
public Factory()
-
-
Method Details
-
createKey
-
createGoogleAdsException
-
createException
protected abstract T createException(com.google.api.gax.rpc.ApiException source, byte[] protoData, io.grpc.Metadata metadata) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
getTrailerKey
public abstract io.grpc.Metadata.Key<byte[]> getTrailerKey()Returns a Metadata.Key representing the key which the GoogleAdsFailure is returned in the metadata. -
createGoogleAdsFailure
Create an empty GoogleAdsFailure instance for this version. -
createGoogleAdsFailure
public abstract U createGoogleAdsFailure(byte[] serializedBytes) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-