As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Bigquery v2 API

class google.cloud.bigquery_v2.types.DeleteModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

project_id

Required. Project ID of the model to delete.

Type

str

dataset_id

Required. Dataset ID of the model to delete.

Type

str

model_id

Required. Model ID of the model to delete.

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.EncryptionConfiguration(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

kms_key_name

Optional. Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.

Type

StringValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.GetModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

project_id

Required. Project ID of the requested model.

Type

str

dataset_id

Required. Dataset ID of the requested model.

Type

str

model_id

Required. Model ID of the requested model.

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.ListModelsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

project_id

Required. Project ID of the models to list.

Type

str

dataset_id

Required. Dataset ID of the models to list.

Type

str

max_results

The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.

Type

UInt32Value

page_token

Page token, returned by a previous call to request the next page of results

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.ListModelsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

models

Models in the requested dataset. Only the following fields are populated: model_reference, model_type, creation_time, last_modified_time and labels.

Type

Sequence[Model]

next_page_token

A token to request the next page of results.

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.Model(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

etag

Output only. A hash of this resource.

Type

str

model_reference

Required. Unique identifier for this model.

Type

ModelReference

creation_time

Output only. The time when this model was created, in millisecs since the epoch.

Type

int

last_modified_time

Output only. The time when this model was last modified, in millisecs since the epoch.

Type

int

description

Optional. A user-friendly description of this model.

Type

str

friendly_name

Optional. A descriptive name for this model.

Type

str

labels

The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.

Type

Sequence[LabelsEntry]

expiration_time

Optional. The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models.

Type

int

location

Output only. The geographic location where the model resides. This value is inherited from the dataset.

Type

str

encryption_configuration

Custom encryption configuration (e.g., Cloud KMS keys). This shows the encryption configuration of the model data while stored in BigQuery storage. This field can be used with PatchModel to update encryption key for an already encrypted model.

Type

EncryptionConfiguration

model_type

Output only. Type of the model resource.

Type

ModelType

training_runs

Output only. Information for all training runs in increasing order of start_time.

Type

Sequence[TrainingRun]

feature_columns

Output only. Input feature columns that were used to train this model.

Type

Sequence[StandardSqlField]

label_columns

Output only. Label columns that were used to train this model. The output of the model will have a predicted_ prefix to these columns.

Type

Sequence[StandardSqlField]

class AggregateClassificationMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows.

precision

Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.

Type

DoubleValue

recall

Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.

Type

DoubleValue

accuracy

Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.

Type

DoubleValue

threshold

Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.

Type

DoubleValue

f1_score

The F1 score is an average of recall and precision. For multiclass this is a macro- averaged metric.

Type

DoubleValue

log_loss

Logarithmic Loss. For multiclass this is a macro-averaged metric.

Type

DoubleValue

roc_auc

Area Under a ROC Curve. For multiclass this is a macro-averaged metric.

Type

DoubleValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ArimaFittingMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

ARIMA model fitting metrics.

log_likelihood

Log-likelihood.

Type

float

aic

AIC.

Type

float

variance

Variance.

Type

float

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ArimaForecastingMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Model evaluation metrics for ARIMA forecasting models.

non_seasonal_order

Non-seasonal order.

Type

Sequence[ArimaOrder]

arima_fitting_metrics

Arima model fitting metrics.

Type

Sequence[ArimaFittingMetrics]

seasonal_periods

Seasonal periods. Repeated because multiple periods are supported for one time series.

Type

Sequence[SeasonalPeriodType]

has_drift

Whether Arima model fitted with drift or not. It is always false when d is not 1.

Type

Sequence[bool]

time_series_id

Id to differentiate different time series for the large-scale case.

Type

Sequence[str]

arima_single_model_forecasting_metrics

Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.

Type

Sequence[ArimaSingleModelForecastingMetrics]

class ArimaSingleModelForecastingMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Model evaluation metrics for a single ARIMA forecasting model.

non_seasonal_order

Non-seasonal order.

Type

ArimaOrder

arima_fitting_metrics

Arima fitting metrics.

Type

ArimaFittingMetrics

has_drift

Is arima model fitted with drift or not. It is always false when d is not 1.

Type

bool

time_series_id

The id to indicate different time series.

Type

str

seasonal_periods

Seasonal periods. Repeated because multiple periods are supported for one time series.

Type

Sequence[SeasonalPeriodType]

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ArimaOrder(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Arima order, can be used for both non-seasonal and seasonal parts.

p

Order of the autoregressive part.

Type

int

d

Order of the differencing part.

Type

int

q

Order of the moving-average part.

Type

int

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class BinaryClassificationMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Evaluation metrics for binary classification/classifier models.

aggregate_classification_metrics

Aggregate classification metrics.

Type

AggregateClassificationMetrics

binary_confusion_matrix_list

Binary confusion matrix at multiple thresholds.

Type

Sequence[BinaryConfusionMatrix]

positive_label

Label representing the positive class.

Type

str

negative_label

Label representing the negative class.

Type

str

class BinaryConfusionMatrix(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Confusion matrix for binary classification models.

positive_class_threshold

Threshold value used when computing each of the following metric.

Type

DoubleValue

true_positives

Number of true samples predicted as true.

Type

Int64Value

false_positives

Number of false samples predicted as true.

Type

Int64Value

true_negatives

Number of true samples predicted as false.

Type

Int64Value

false_negatives

Number of false samples predicted as false.

Type

Int64Value

precision

The fraction of actual positive predictions that had positive actual labels.

Type

DoubleValue

recall

The fraction of actual positive labels that were given a positive prediction.

Type

DoubleValue

f1_score

The equally weighted average of recall and precision.

Type

DoubleValue

accuracy

The fraction of predictions given the correct label.

Type

DoubleValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ClusteringMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Evaluation metrics for clustering models.

davies_bouldin_index

Davies-Bouldin index.

Type

DoubleValue

mean_squared_distance

Mean of squared distances between each sample to its cluster centroid.

Type

DoubleValue

clusters

[Beta] Information for all clusters.

Type

Sequence[Cluster]

class Cluster(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message containing the information about one cluster.

centroid_id

Centroid id.

Type

int

feature_values

Values of highly variant features for this cluster.

Type

Sequence[FeatureValue]

count

Count of training data rows that were assigned to this cluster.

Type

Int64Value

class FeatureValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Representative value of a single feature within the cluster.

feature_column

The feature column name.

Type

str

numerical_value

The numerical feature value. This is the centroid value for this feature.

Type

DoubleValue

categorical_value

The categorical feature value.

Type

CategoricalValue

class CategoricalValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Representative value of a categorical feature.

category_counts

Counts of all categories for the categorical feature. If there are more than ten categories, we return top ten (by count) and return one more CategoryCount with category “OTHER” and count as aggregate counts of remaining categories.

Type

Sequence[CategoryCount]

class CategoryCount(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the count of a single category within the cluster.

category

The name of category.

Type

str

count

The count of training samples matching the category within the cluster.

Type

Int64Value

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class DataFrequency(value)[source]

Bases: proto.enums.Enum

Type of supported data frequency for time series forecasting models.

class DataSplitMethod(value)[source]

Bases: proto.enums.Enum

Indicates the method to split input data into multiple tables.

class DataSplitResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Data split result. This contains references to the training and evaluation data tables that were used to train the model.

training_table

Table reference of the training data after split.

Type

TableReference

evaluation_table

Table reference of the evaluation data after split.

Type

TableReference

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class DistanceType(value)[source]

Bases: proto.enums.Enum

Distance metric used to compute the distance between two points.

class EvaluationMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Evaluation metrics of a model. These are either computed on all training data or just the eval data based on whether eval data was used during training. These are not present for imported models.

regression_metrics

Populated for regression models and explicit feedback type matrix factorization models.

Type

RegressionMetrics

binary_classification_metrics

Populated for binary classification/classifier models.

Type

BinaryClassificationMetrics

multi_class_classification_metrics

Populated for multi-class classification/classifier models.

Type

MultiClassClassificationMetrics

clustering_metrics

Populated for clustering models.

Type

ClusteringMetrics

ranking_metrics

Populated for implicit feedback type matrix factorization models.

Type

RankingMetrics

arima_forecasting_metrics

Populated for ARIMA models.

Type

ArimaForecastingMetrics

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class FeedbackType(value)[source]

Bases: proto.enums.Enum

Indicates the training algorithm to use for matrix factorization models.

class GlobalExplanation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Global explanations containing the top most important features after training.

explanations

A list of the top global explanations. Sorted by absolute value of attribution in descending order.

Type

Sequence[Explanation]

class_label

Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.

Type

str

class Explanation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Explanation for a single feature.

feature_name

Full name of the feature. For non-numerical features, will be formatted like <column_name>.<encoded_feature_name>. Overall size of feature name will always be truncated to first 120 characters.

Type

str

attribution

Attribution of feature.

Type

DoubleValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class HolidayRegion(value)[source]

Bases: proto.enums.Enum

Type of supported holiday regions for time series forecasting models.

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class LearnRateStrategy(value)[source]

Bases: proto.enums.Enum

Indicates the learning rate optimization strategy to use.

class LossType(value)[source]

Bases: proto.enums.Enum

Loss metric to evaluate model training performance.

class ModelType(value)[source]

Bases: proto.enums.Enum

Indicates the type of the Model.

class MultiClassClassificationMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Evaluation metrics for multi-class classification/classifier models.

aggregate_classification_metrics

Aggregate classification metrics.

Type

AggregateClassificationMetrics

confusion_matrix_list

Confusion matrix at different thresholds.

Type

Sequence[ConfusionMatrix]

class ConfusionMatrix(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Confusion matrix for multi-class classification models.

confidence_threshold

Confidence threshold used when computing the entries of the confusion matrix.

Type

DoubleValue

rows

One row per actual label.

Type

Sequence[Row]

class Entry(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A single entry in the confusion matrix.

predicted_label

The predicted label. For confidence_threshold > 0, we will also add an entry indicating the number of items under the confidence threshold.

Type

str

item_count

Number of items being predicted as this label.

Type

Int64Value

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class Row(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A single row in the confusion matrix.

actual_label

The original label of this row.

Type

str

entries

Info describing predicted label distribution.

Type

Sequence[Entry]

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class OptimizationStrategy(value)[source]

Bases: proto.enums.Enum

Indicates the optimization strategy used for training.

class RankingMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit.

mean_average_precision

Calculates a precision per user for all the items by ranking them and then averages all the precisions across all the users.

Type

DoubleValue

mean_squared_error

Similar to the mean squared error computed in regression and explicit recommendation models except instead of computing the rating directly, the output from evaluate is computed against a preference which is 1 or 0 depending on if the rating exists or not.

Type

DoubleValue

normalized_discounted_cumulative_gain

A metric to determine the goodness of a ranking calculated from the predicted confidence by comparing it to an ideal rank measured by the original ratings.

Type

DoubleValue

average_rank

Determines the goodness of a ranking by computing the percentile rank from the predicted confidence and dividing it by the original rank.

Type

DoubleValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class RegressionMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Evaluation metrics for regression and explicit feedback type matrix factorization models.

mean_absolute_error

Mean absolute error.

Type

DoubleValue

mean_squared_error

Mean squared error.

Type

DoubleValue

mean_squared_log_error

Mean squared log error.

Type

DoubleValue

median_absolute_error

Median absolute error.

Type

DoubleValue

r_squared

R^2 score.

Type

DoubleValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class TrainingRun(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information about a single training query run for the model.

training_options

Options that were used for this training run, includes user specified and default options that were used.

Type

TrainingOptions

start_time

The start time of this training run.

Type

Timestamp

results

Output of each iteration run, results.size() <= max_iterations.

Type

Sequence[IterationResult]

evaluation_metrics

The evaluation metrics over training/eval data that were computed at the end of training.

Type

EvaluationMetrics

data_split_result

Data split result of the training run. Only set when the input data is actually split.

Type

DataSplitResult

global_explanations

Global explanations for important features of the model. For multi-class models, there is one entry for each label class. For other models, there is only one entry in the list.

Type

Sequence[GlobalExplanation]

class IterationResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information about a single iteration of the training run.

index

Index of the iteration, 0 based.

Type

Int32Value

duration_ms

Time taken to run the iteration in milliseconds.

Type

Int64Value

training_loss

Loss computed on the training data at the end of iteration.

Type

DoubleValue

eval_loss

Loss computed on the eval data at the end of iteration.

Type

DoubleValue

learn_rate

Learn rate used for this iteration.

Type

float

cluster_infos

Information about top clusters for clustering models.

Type

Sequence[ClusterInfo]

arima_result
Type

ArimaResult

class ArimaResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

(Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.

arima_model_info

This message is repeated because there are multiple arima models fitted in auto-arima. For non-auto-arima model, its size is one.

Type

Sequence[ArimaModelInfo]

seasonal_periods

Seasonal periods. Repeated because multiple periods are supported for one time series.

Type

Sequence[SeasonalPeriodType]

class ArimaCoefficients(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Arima coefficients.

auto_regressive_coefficients

Auto-regressive coefficients, an array of double.

Type

Sequence[float]

moving_average_coefficients

Moving-average coefficients, an array of double.

Type

Sequence[float]

intercept_coefficient

Intercept coefficient, just a double not an array.

Type

float

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ArimaModelInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Arima model information.

non_seasonal_order

Non-seasonal order.

Type

ArimaOrder

arima_coefficients

Arima coefficients.

Type

ArimaCoefficients

arima_fitting_metrics

Arima fitting metrics.

Type

ArimaFittingMetrics

has_drift

Whether Arima model fitted with drift or not. It is always false when d is not 1.

Type

bool

time_series_id

The id to indicate different time series.

Type

str

seasonal_periods

Seasonal periods. Repeated because multiple periods are supported for one time series.

Type

Sequence[SeasonalPeriodType]

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ClusterInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information about a single cluster for clustering model.

centroid_id

Centroid id.

Type

int

cluster_radius

Cluster radius, the average distance from centroid to each point assigned to the cluster.

Type

DoubleValue

cluster_size

Cluster size, the total number of points assigned to the cluster.

Type

Int64Value

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class TrainingOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

max_iterations

The maximum number of iterations in training. Used only for iterative training algorithms.

Type

int

loss_type

Type of loss function used during training run.

Type

LossType

learn_rate

Learning rate in training. Used only for iterative training algorithms.

Type

float

l1_regularization

L1 regularization coefficient.

Type

DoubleValue

l2_regularization

L2 regularization coefficient.

Type

DoubleValue

min_relative_progress

When early_stop is true, stops training when accuracy improvement is less than ‘min_relative_progress’. Used only for iterative training algorithms.

Type

DoubleValue

warm_start

Whether to train a model from the last checkpoint.

Type

BoolValue

early_stop

Whether to stop early when the loss doesn’t improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.

Type

BoolValue

input_label_columns

Name of input label columns in training data.

Type

Sequence[str]

data_split_method

The data split type for training and evaluation, e.g. RANDOM.

Type

DataSplitMethod

data_split_eval_fraction

The fraction of evaluation data over the whole input data. The rest of data will be used as training data. The format should be double. Accurate to two decimal places. Default value is 0.2.

Type

float

data_split_column

The column to split data with. This column won’t be used as a feature.

  1. When data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true value tag are eval data, and the false are training data.

  2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are used as training data, and the rest are eval data. It respects the order in Orderable data types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties

Type

str

learn_rate_strategy

The strategy to determine learn rate for the current iteration.

Type

LearnRateStrategy

initial_learn_rate

Specifies the initial learning rate for the line search learn rate strategy.

Type

float

label_class_weights

Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.

Type

Sequence[LabelClassWeightsEntry]

user_column

User column specified for matrix factorization models.

Type

str

item_column

Item column specified for matrix factorization models.

Type

str

distance_type

Distance type for clustering models.

Type

DistanceType

num_clusters

Number of clusters for clustering models.

Type

int

model_uri

[Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.

Type

str

optimization_strategy

Optimization strategy for training linear regression models.

Type

OptimizationStrategy

hidden_units

Hidden units for dnn models.

Type

Sequence[int]

batch_size

Batch size for dnn models.

Type

int

dropout

Dropout probability for dnn models.

Type

DoubleValue

max_tree_depth

Maximum depth of a tree for boosted tree models.

Type

int

subsample

Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.

Type

float

min_split_loss

Minimum split loss for boosted tree models.

Type

DoubleValue

num_factors

Num factors specified for matrix factorization models.

Type

int

feedback_type

Feedback type that specifies which algorithm to run for matrix factorization.

Type

FeedbackType

wals_alpha

Hyperparameter for matrix factoration when implicit feedback type is specified.

Type

DoubleValue

kmeans_initialization_method

The method used to initialize the centroids for kmeans algorithm.

Type

KmeansInitializationMethod

kmeans_initialization_column

The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.

Type

str

time_series_timestamp_column

Column to be designated as time series timestamp for ARIMA model.

Type

str

time_series_data_column

Column to be designated as time series data for ARIMA model.

Type

str

auto_arima

Whether to enable auto ARIMA or not.

Type

bool

non_seasonal_order

A specification of the non-seasonal part of the ARIMA model: the three components (p, d, q) are the AR order, the degree of differencing, and the MA order.

Type

ArimaOrder

data_frequency

The data frequency of a time series.

Type

DataFrequency

include_drift

Include drift when fitting an ARIMA model.

Type

bool

holiday_region

The geographical region based on which the holidays are considered in time series modeling. If a valid value is specified, then holiday effects modeling is enabled.

Type

HolidayRegion

time_series_id_column

The id column that will be used to indicate different time series to forecast in parallel.

Type

str

horizon

The number of periods ahead that need to be forecasted.

Type

int

preserve_input_structs

Whether to preserve the input structs in output feature names. Suppose there is a struct A with field b. When false (default), the output feature name is A_b. When true, the output feature name is A.b.

Type

bool

auto_arima_max_order

The max value of non-seasonal p and q.

Type

int

class LabelClassWeightsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.ModelReference(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Id path of a model.

project_id

Required. The ID of the project containing this model.

Type

str

dataset_id

Required. The ID of the dataset containing this model.

Type

str

model_id

Required. The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.PatchModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

project_id

Required. Project ID of the model to patch.

Type

str

dataset_id

Required. Dataset ID of the model to patch.

Type

str

model_id

Required. Model ID of the model to patch.

Type

str

model

Required. Patched model. Follows RFC5789 patch semantics. Missing fields are not updated. To clear a field, explicitly set to default value.

Type

Model

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.StandardSqlDataType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind=”INT64”} ARRAY: {type_kind=”ARRAY”, array_element_type=”STRING”} STRUCT<x STRING, y ARRAY>: {type_kind=”STRUCT”, struct_type={fields=[ {name=”x”, type={type_kind=”STRING”}}, {name=”y”, type={type_kind=”ARRAY”, array_element_type=”DATE”}} ]}}

type_kind

Required. The top level type of this field. Can be any standard SQL data type (e.g., “INT64”, “DATE”, “ARRAY”).

Type

TypeKind

array_element_type

The type of the array’s elements, if type_kind = “ARRAY”.

Type

StandardSqlDataType

struct_type

The fields of this struct, in order, if type_kind = “STRUCT”.

Type

StandardSqlStructType

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.StandardSqlField(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A field or a column.

name

Optional. The name of this field. Can be absent for struct fields.

Type

str

type

Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this “type” field).

Type

StandardSqlDataType

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.StandardSqlStructType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

fields
Type

Sequence[StandardSqlField]

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.TableReference(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

project_id

Required. The ID of the project containing this table.

Type

str

dataset_id

Required. The ID of the dataset containing this table.

Type

str

table_id

Required. The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as sample_table$20190123.

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.