Class Subscription (0.37.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
TypeDescription
int

DATA_EXCHANGE_FIELD_NUMBER

public static final int DATA_EXCHANGE_FIELD_NUMBER
Field Value
TypeDescription
int

LAST_MODIFY_TIME_FIELD_NUMBER

public static final int LAST_MODIFY_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

LINKED_DATASET_MAP_FIELD_NUMBER

public static final int LINKED_DATASET_MAP_FIELD_NUMBER
Field Value
TypeDescription
int

LISTING_FIELD_NUMBER

public static final int LISTING_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ORGANIZATION_DISPLAY_NAME_FIELD_NUMBER

public static final int ORGANIZATION_DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ORGANIZATION_ID_FIELD_NUMBER

public static final int ORGANIZATION_ID_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
TypeDescription
int

SUBSCRIBER_CONTACT_FIELD_NUMBER

public static final int SUBSCRIBER_CONTACT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Subscription getDefaultInstance()
Returns
TypeDescription
Subscription

getDescriptor()

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

newBuilder()

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

newBuilder(Subscription prototype)

public static Subscription.Builder newBuilder(Subscription prototype)
Parameter
NameDescription
prototypeSubscription
Returns
TypeDescription
Subscription.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<Subscription> parser()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for dataExchange.

getDefaultInstanceForType()

public Subscription getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getLinkedDatasetMap() (deprecated)

public Map<String,Subscription.LinkedResource> getLinkedDatasetMap()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueSubscription.LinkedResource
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for organizationId.

getParserForType()

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

getResourceNameCase()

public Subscription.ResourceNameCase getResourceNameCase()
Returns
TypeDescription
Subscription.ResourceNameCase

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
String

The subscriberContact.

getSubscriberContactBytes()

public ByteString getSubscriberContactBytes()

Output only. Email of the subscriber.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the listing field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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