Class Subscription (0.41.0)

public final class Subscription extends GeneratedMessageV3 implements SubscriptionOrBuilder

A subscription represents a subscribers' access to a particular set of published data. It contains references to associated listings, data exchanges, and linked datasets.

Protobuf type google.cloud.bigquery.analyticshub.v1.Subscription

Static Fields

CREATION_TIME_FIELD_NUMBER

public static final int CREATION_TIME_FIELD_NUMBER
Field Value
Type Description
int

DATA_EXCHANGE_FIELD_NUMBER

public static final int DATA_EXCHANGE_FIELD_NUMBER
Field Value
Type Description
int

LAST_MODIFY_TIME_FIELD_NUMBER

public static final int LAST_MODIFY_TIME_FIELD_NUMBER
Field Value
Type Description
int

LINKED_DATASET_MAP_FIELD_NUMBER

public static final int LINKED_DATASET_MAP_FIELD_NUMBER
Field Value
Type Description
int

LISTING_FIELD_NUMBER

public static final int LISTING_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

ORGANIZATION_DISPLAY_NAME_FIELD_NUMBER

public static final int ORGANIZATION_DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

ORGANIZATION_ID_FIELD_NUMBER

public static final int ORGANIZATION_ID_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

SUBSCRIBER_CONTACT_FIELD_NUMBER

public static final int SUBSCRIBER_CONTACT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Subscription getDefaultInstance()
Returns
Type Description
Subscription

getDescriptor()

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

newBuilder()

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

newBuilder(Subscription prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

containsLinkedDatasetMap(String key)

public boolean containsLinkedDatasetMap(String key)

Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/US/dataExchanges/456/listings/789 -> projects/123/datasets/my_dataset

For listing-level subscriptions, this is a map of size 1. Only contains values if state == STATE_ACTIVE.

map<string, .google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource> linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

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

getCreationTime()

public Timestamp getCreationTime()

Output only. Timestamp when the subscription was created.

.google.protobuf.Timestamp creation_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The creationTime.

getCreationTimeOrBuilder()

public TimestampOrBuilder getCreationTimeOrBuilder()

Output only. Timestamp when the subscription was created.

.google.protobuf.Timestamp creation_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDataExchange()

public String getDataExchange()

Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/US/dataExchanges/456

string data_exchange = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The dataExchange.

getDataExchangeBytes()

public ByteString getDataExchangeBytes()

Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/US/dataExchanges/456

string data_exchange = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for dataExchange.

getDefaultInstanceForType()

public Subscription getDefaultInstanceForType()
Returns
Type Description
Subscription

getLastModifyTime()

public Timestamp getLastModifyTime()

Output only. Timestamp when the subscription was last modified.

.google.protobuf.Timestamp last_modify_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The lastModifyTime.

getLastModifyTimeOrBuilder()

public TimestampOrBuilder getLastModifyTimeOrBuilder()

Output only. Timestamp when the subscription was last modified.

.google.protobuf.Timestamp last_modify_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getLinkedDatasetMap() (deprecated)

public Map<String,Subscription.LinkedResource> getLinkedDatasetMap()
Returns
Type Description
Map<String,LinkedResource>

getLinkedDatasetMapCount()

public int getLinkedDatasetMapCount()

Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/US/dataExchanges/456/listings/789 -> projects/123/datasets/my_dataset

For listing-level subscriptions, this is a map of size 1. Only contains values if state == STATE_ACTIVE.

map<string, .google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource> linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getLinkedDatasetMapMap()

public Map<String,Subscription.LinkedResource> getLinkedDatasetMapMap()

Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/US/dataExchanges/456/listings/789 -> projects/123/datasets/my_dataset

For listing-level subscriptions, this is a map of size 1. Only contains values if state == STATE_ACTIVE.

map<string, .google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource> linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Map<String,LinkedResource>

getLinkedDatasetMapOrDefault(String key, Subscription.LinkedResource defaultValue)

public Subscription.LinkedResource getLinkedDatasetMapOrDefault(String key, Subscription.LinkedResource defaultValue)

Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/US/dataExchanges/456/listings/789 -> projects/123/datasets/my_dataset

For listing-level subscriptions, this is a map of size 1. Only contains values if state == STATE_ACTIVE.

map<string, .google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource> linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
key String
defaultValue Subscription.LinkedResource
Returns
Type Description
Subscription.LinkedResource

getLinkedDatasetMapOrThrow(String key)

public Subscription.LinkedResource getLinkedDatasetMapOrThrow(String key)

Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/US/dataExchanges/456/listings/789 -> projects/123/datasets/my_dataset

For listing-level subscriptions, this is a map of size 1. Only contains values if state == STATE_ACTIVE.

map<string, .google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource> linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
key String
Returns
Type Description
Subscription.LinkedResource

getListing()

public String getListing()

Output only. Resource name of the source Listing. e.g. projects/123/locations/US/dataExchanges/456/listings/789

string listing = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The listing.

getListingBytes()

public ByteString getListingBytes()

Output only. Resource name of the source Listing. e.g. projects/123/locations/US/dataExchanges/456/listings/789

string listing = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for listing.

getName()

public String getName()

Output only. The resource name of the subscription. e.g. projects/myproject/locations/US/subscriptions/123.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name of the subscription. e.g. projects/myproject/locations/US/subscriptions/123.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getOrganizationDisplayName()

public String getOrganizationDisplayName()

Output only. Display name of the project of this subscription.

string organization_display_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The organizationDisplayName.

getOrganizationDisplayNameBytes()

public ByteString getOrganizationDisplayNameBytes()

Output only. Display name of the project of this subscription.

string organization_display_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for organizationDisplayName.

getOrganizationId()

public String getOrganizationId()

Output only. Organization of the project this subscription belongs to.

string organization_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The organizationId.

getOrganizationIdBytes()

public ByteString getOrganizationIdBytes()

Output only. Organization of the project this subscription belongs to.

string organization_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for organizationId.

getParserForType()

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

getResourceNameCase()

public Subscription.ResourceNameCase getResourceNameCase()
Returns
Type Description
Subscription.ResourceNameCase

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getState()

public Subscription.State getState()

Output only. Current state of the subscription.

.google.cloud.bigquery.analyticshub.v1.Subscription.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Subscription.State

The state.

getStateValue()

public int getStateValue()

Output only. Current state of the subscription.

.google.cloud.bigquery.analyticshub.v1.Subscription.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getSubscriberContact()

public String getSubscriberContact()

Output only. Email of the subscriber.

string subscriber_contact = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The subscriberContact.

getSubscriberContactBytes()

public ByteString getSubscriberContactBytes()

Output only. Email of the subscriber.

string subscriber_contact = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for subscriberContact.

hasCreationTime()

public boolean hasCreationTime()

Output only. Timestamp when the subscription was created.

.google.protobuf.Timestamp creation_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the creationTime field is set.

hasDataExchange()

public boolean hasDataExchange()

Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/US/dataExchanges/456

string data_exchange = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the dataExchange field is set.

hasLastModifyTime()

public boolean hasLastModifyTime()

Output only. Timestamp when the subscription was last modified.

.google.protobuf.Timestamp last_modify_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the lastModifyTime field is set.

hasListing()

public boolean hasListing()

Output only. Resource name of the source Listing. e.g. projects/123/locations/US/dataExchanges/456/listings/789

string listing = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the listing field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Subscription.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Subscription.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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