Class EndpointAuthorization.Builder (0.2.0)

public static final class EndpointAuthorization.Builder extends GeneratedMessage.Builder<EndpointAuthorization.Builder> 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 Methods

getDescriptor()

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

Methods

build()

public EndpointAuthorization build()
Returns
Type Description
EndpointAuthorization

buildPartial()

public EndpointAuthorization buildPartial()
Returns
Type Description
EndpointAuthorization

clear()

public EndpointAuthorization.Builder clear()
Returns
Type Description
EndpointAuthorization.Builder
Overrides

clearSecret()

public EndpointAuthorization.Builder clearSecret()

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
EndpointAuthorization.Builder

This builder for chaining.

clearSecretSet()

public EndpointAuthorization.Builder clearSecretSet()

Output only. Whether the secret is set.

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

Returns
Type Description
EndpointAuthorization.Builder

This builder for chaining.

getDefaultInstanceForType()

public EndpointAuthorization getDefaultInstanceForType()
Returns
Type Description
EndpointAuthorization

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(EndpointAuthorization other)

public EndpointAuthorization.Builder mergeFrom(EndpointAuthorization other)
Parameter
Name Description
other EndpointAuthorization
Returns
Type Description
EndpointAuthorization.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public EndpointAuthorization.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointAuthorization.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public EndpointAuthorization.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
EndpointAuthorization.Builder
Overrides

setSecret(String value)

public EndpointAuthorization.Builder setSecret(String value)

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];

Parameter
Name Description
value String

The secret to set.

Returns
Type Description
EndpointAuthorization.Builder

This builder for chaining.

setSecretBytes(ByteString value)

public EndpointAuthorization.Builder setSecretBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for secret to set.

Returns
Type Description
EndpointAuthorization.Builder

This builder for chaining.

setSecretSet(boolean value)

public EndpointAuthorization.Builder setSecretSet(boolean value)

Output only. Whether the secret is set.

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

Parameter
Name Description
value boolean

The secretSet to set.

Returns
Type Description
EndpointAuthorization.Builder

This builder for chaining.