Class WebhookNotification (0.52.0)

public final class WebhookNotification extends GeneratedMessageV3 implements WebhookNotificationOrBuilder

Configures a long-running operation resource to send a webhook notification from the Google Analytics Data API to your webhook server when the resource updates.

Notification configurations contain private values & are only visible to your GCP project. Different GCP projects may attach different webhook notifications to the same long-running operation resource.

Protobuf type google.analytics.data.v1alpha.WebhookNotification

Static Fields

CHANNEL_TOKEN_FIELD_NUMBER

public static final int CHANNEL_TOKEN_FIELD_NUMBER
Field Value
TypeDescription
int

URI_FIELD_NUMBER

public static final int URI_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static WebhookNotification getDefaultInstance()
Returns
TypeDescription
WebhookNotification

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static WebhookNotification.Builder newBuilder()
Returns
TypeDescription
WebhookNotification.Builder

newBuilder(WebhookNotification prototype)

public static WebhookNotification.Builder newBuilder(WebhookNotification prototype)
Parameter
NameDescription
prototypeWebhookNotification
Returns
TypeDescription
WebhookNotification.Builder

parseDelimitedFrom(InputStream input)

public static WebhookNotification parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WebhookNotification parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static WebhookNotification parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static WebhookNotification parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static WebhookNotification parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static WebhookNotification parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static WebhookNotification parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static WebhookNotification parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static WebhookNotification parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WebhookNotification parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static WebhookNotification parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static WebhookNotification parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WebhookNotification
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<WebhookNotification> parser()
Returns
TypeDescription
Parser<WebhookNotification>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getChannelToken()

public String getChannelToken()

Optional. The channel token is an arbitrary string value and must have a maximum string length of 64 characters. Channel tokens allow you to verify the source of a webhook notification. This guards against the message being spoofed. The channel token will be specified in the X-Goog-Channel-Token HTTP header of the webhook POST request.

A channel token is not required to use webhook notifications.

optional string channel_token = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The channelToken.

getChannelTokenBytes()

public ByteString getChannelTokenBytes()

Optional. The channel token is an arbitrary string value and must have a maximum string length of 64 characters. Channel tokens allow you to verify the source of a webhook notification. This guards against the message being spoofed. The channel token will be specified in the X-Goog-Channel-Token HTTP header of the webhook POST request.

A channel token is not required to use webhook notifications.

optional string channel_token = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for channelToken.

getDefaultInstanceForType()

public WebhookNotification getDefaultInstanceForType()
Returns
TypeDescription
WebhookNotification

getParserForType()

public Parser<WebhookNotification> getParserForType()
Returns
TypeDescription
Parser<WebhookNotification>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUri()

public String getUri()

Optional. The web address that will receive the webhook notification. This address will receive POST requests as the state of the long running operation resource changes. The POST request will contain both a JSON version of the long running operation resource in the body and a sentTimestamp field. The sent timestamp will specify the unix microseconds since the epoch that the request was sent; this lets you identify replayed notifications.

An example URI is https://us-central1-example-project-id.cloudfunctions.net/example-function-1.

The URI must use HTTPS and point to a site with a valid SSL certificate on the web server. The URI must have a maximum string length of 128 characters & use only the allowlisted characters from RFC 1738.

When your webhook server receives a notification, it is expected to reply with an HTTP response status code of 200 within 5 seconds.

A URI is required to use webhook notifications.

Requests to this webhook server will contain an ID token authenticating the service account google-analytics-audience-export@system.gserviceaccount.com. To learn more about ID tokens, see https://cloud.google.com/docs/authentication/token-types#id. For Google Cloud Functions, this lets you configure your function to require authentication. In Cloud IAM, you will need to grant the service account permissions to the Cloud Run Invoker (roles/run.invoker) & Cloud Functions Invoker (roles/cloudfunctions.invoker) roles for the webhook post request to pass Google Cloud Functions authentication. This API can send webhook notifications to arbitrary URIs; for webhook servers other than Google Cloud Functions, this ID token in the authorization bearer header should be ignored if it is not needed.

optional string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Optional. The web address that will receive the webhook notification. This address will receive POST requests as the state of the long running operation resource changes. The POST request will contain both a JSON version of the long running operation resource in the body and a sentTimestamp field. The sent timestamp will specify the unix microseconds since the epoch that the request was sent; this lets you identify replayed notifications.

An example URI is https://us-central1-example-project-id.cloudfunctions.net/example-function-1.

The URI must use HTTPS and point to a site with a valid SSL certificate on the web server. The URI must have a maximum string length of 128 characters & use only the allowlisted characters from RFC 1738.

When your webhook server receives a notification, it is expected to reply with an HTTP response status code of 200 within 5 seconds.

A URI is required to use webhook notifications.

Requests to this webhook server will contain an ID token authenticating the service account google-analytics-audience-export@system.gserviceaccount.com. To learn more about ID tokens, see https://cloud.google.com/docs/authentication/token-types#id. For Google Cloud Functions, this lets you configure your function to require authentication. In Cloud IAM, you will need to grant the service account permissions to the Cloud Run Invoker (roles/run.invoker) & Cloud Functions Invoker (roles/cloudfunctions.invoker) roles for the webhook post request to pass Google Cloud Functions authentication. This API can send webhook notifications to arbitrary URIs; for webhook servers other than Google Cloud Functions, this ID token in the authorization bearer header should be ignored if it is not needed.

optional string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for uri.

hasChannelToken()

public boolean hasChannelToken()

Optional. The channel token is an arbitrary string value and must have a maximum string length of 64 characters. Channel tokens allow you to verify the source of a webhook notification. This guards against the message being spoofed. The channel token will be specified in the X-Goog-Channel-Token HTTP header of the webhook POST request.

A channel token is not required to use webhook notifications.

optional string channel_token = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the channelToken field is set.

hasUri()

public boolean hasUri()

Optional. The web address that will receive the webhook notification. This address will receive POST requests as the state of the long running operation resource changes. The POST request will contain both a JSON version of the long running operation resource in the body and a sentTimestamp field. The sent timestamp will specify the unix microseconds since the epoch that the request was sent; this lets you identify replayed notifications.

An example URI is https://us-central1-example-project-id.cloudfunctions.net/example-function-1.

The URI must use HTTPS and point to a site with a valid SSL certificate on the web server. The URI must have a maximum string length of 128 characters & use only the allowlisted characters from RFC 1738.

When your webhook server receives a notification, it is expected to reply with an HTTP response status code of 200 within 5 seconds.

A URI is required to use webhook notifications.

Requests to this webhook server will contain an ID token authenticating the service account google-analytics-audience-export@system.gserviceaccount.com. To learn more about ID tokens, see https://cloud.google.com/docs/authentication/token-types#id. For Google Cloud Functions, this lets you configure your function to require authentication. In Cloud IAM, you will need to grant the service account permissions to the Cloud Run Invoker (roles/run.invoker) & Cloud Functions Invoker (roles/cloudfunctions.invoker) roles for the webhook post request to pass Google Cloud Functions authentication. This API can send webhook notifications to arbitrary URIs; for webhook servers other than Google Cloud Functions, this ID token in the authorization bearer header should be ignored if it is not needed.

optional string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the uri field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public WebhookNotification.Builder newBuilderForType()
Returns
TypeDescription
WebhookNotification.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected WebhookNotification.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
WebhookNotification.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public WebhookNotification.Builder toBuilder()
Returns
TypeDescription
WebhookNotification.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException