Class EndpointAuthorization (0.2.0)

public final class EndpointAuthorization extends GeneratedMessage implements EndpointAuthorizationOrBuilder

Authorization mechanism for a subscriber endpoint. For all requests sent by the Webhooks service, the JSON payload is cryptographically signed. The signature is delivered in the X-HEALTHAPI-SIGNATURE HTTP header. This is an ECDSA (NIST P256) signature of the JSON payload. Clients must verify this signature using Google Health API's public key to confirm the payload was sent by the Health API.

Protobuf type google.devicesandservices.health.v4.EndpointAuthorization

Static Fields

SECRET_FIELD_NUMBER

public static final int SECRET_FIELD_NUMBER
Field Value
Type Description
int

SECRET_SET_FIELD_NUMBER

public static final int SECRET_SET_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static EndpointAuthorization getDefaultInstance()
Returns
Type Description
EndpointAuthorization

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static EndpointAuthorization.Builder newBuilder()
Returns
Type Description
EndpointAuthorization.Builder

newBuilder(EndpointAuthorization prototype)

public static EndpointAuthorization.Builder newBuilder(EndpointAuthorization prototype)
Parameter
Name Description
prototype EndpointAuthorization
Returns
Type Description
EndpointAuthorization.Builder

parseDelimitedFrom(InputStream input)

public static EndpointAuthorization parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EndpointAuthorization parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static EndpointAuthorization parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static EndpointAuthorization parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static EndpointAuthorization parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static EndpointAuthorization parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static EndpointAuthorization parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static EndpointAuthorization parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static EndpointAuthorization parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EndpointAuthorization parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static EndpointAuthorization parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static EndpointAuthorization parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointAuthorization
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<EndpointAuthorization> parser()
Returns
Type Description
Parser<EndpointAuthorization>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public EndpointAuthorization getDefaultInstanceForType()
Returns
Type Description
EndpointAuthorization

getParserForType()

public Parser<EndpointAuthorization> getParserForType()
Returns
Type Description
Parser<EndpointAuthorization>
Overrides

getSecret()

public String getSecret()

Required. Input only. Provides a client-provided secret that will be sent with each notification to the subscriber endpoint using the "Authorization" header. The value must include the authorization scheme, e.g., "Bearer <token>" or "Basic <credentials>", as it will be used as the full Authorization header value. This secret is used by the API to test the endpoint during CreateSubscriber and UpdateSubscriber calls, and will be sent in the Authorization header for all subsequent webhook notifications to this endpoint.

string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
String

The secret.

getSecretBytes()

public ByteString getSecretBytes()

Required. Input only. Provides a client-provided secret that will be sent with each notification to the subscriber endpoint using the "Authorization" header. The value must include the authorization scheme, e.g., "Bearer <token>" or "Basic <credentials>", as it will be used as the full Authorization header value. This secret is used by the API to test the endpoint during CreateSubscriber and UpdateSubscriber calls, and will be sent in the Authorization header for all subsequent webhook notifications to this endpoint.

string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
ByteString

The bytes for secret.

getSecretSet()

public boolean getSecretSet()

Output only. Whether the secret is set.

bool secret_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The secretSet.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public EndpointAuthorization.Builder newBuilderForType()
Returns
Type Description
EndpointAuthorization.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected EndpointAuthorization.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
EndpointAuthorization.Builder
Overrides

toBuilder()

public EndpointAuthorization.Builder toBuilder()
Returns
Type Description
EndpointAuthorization.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException