id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
28,100
googleapis/google-cloud-python
storage/google/cloud/storage/blob.py
Blob.rewrite
def rewrite(self, source, token=None, client=None): """Rewrite source blob into this one. If :attr:`user_project` is set on the bucket, bills the API request to that project. :type source: :class:`Blob` :param source: blob whose contents will be rewritten into this blob. ...
python
def rewrite(self, source, token=None, client=None): """Rewrite source blob into this one. If :attr:`user_project` is set on the bucket, bills the API request to that project. :type source: :class:`Blob` :param source: blob whose contents will be rewritten into this blob. ...
[ "def", "rewrite", "(", "self", ",", "source", ",", "token", "=", "None", ",", "client", "=", "None", ")", ":", "client", "=", "self", ".", "_require_client", "(", "client", ")", "headers", "=", "_get_encryption_headers", "(", "self", ".", "_encryption_key"...
Rewrite source blob into this one. If :attr:`user_project` is set on the bucket, bills the API request to that project. :type source: :class:`Blob` :param source: blob whose contents will be rewritten into this blob. :type token: str :param token: Optional. Token retur...
[ "Rewrite", "source", "blob", "into", "this", "one", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/blob.py#L1529-L1590
28,101
googleapis/google-cloud-python
storage/google/cloud/storage/blob.py
Blob.update_storage_class
def update_storage_class(self, new_class, client=None): """Update blob's storage class via a rewrite-in-place. This helper will wait for the rewrite to complete before returning, so it may take some time for large files. See https://cloud.google.com/storage/docs/per-object-stora...
python
def update_storage_class(self, new_class, client=None): """Update blob's storage class via a rewrite-in-place. This helper will wait for the rewrite to complete before returning, so it may take some time for large files. See https://cloud.google.com/storage/docs/per-object-stora...
[ "def", "update_storage_class", "(", "self", ",", "new_class", ",", "client", "=", "None", ")", ":", "if", "new_class", "not", "in", "self", ".", "_STORAGE_CLASSES", ":", "raise", "ValueError", "(", "\"Invalid storage class: %s\"", "%", "(", "new_class", ",", "...
Update blob's storage class via a rewrite-in-place. This helper will wait for the rewrite to complete before returning, so it may take some time for large files. See https://cloud.google.com/storage/docs/per-object-storage-class If :attr:`user_project` is set on the bucket, bil...
[ "Update", "blob", "s", "storage", "class", "via", "a", "rewrite", "-", "in", "-", "place", ".", "This", "helper", "will", "wait", "for", "the", "rewrite", "to", "complete", "before", "returning", "so", "it", "may", "take", "some", "time", "for", "large",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/blob.py#L1592-L1619
28,102
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
verify_path
def verify_path(path, is_collection): """Verifies that a ``path`` has the correct form. Checks that all of the elements in ``path`` are strings. Args: path (Tuple[str, ...]): The components in a collection or document path. is_collection (bool): Indicates if the ``path`` repres...
python
def verify_path(path, is_collection): """Verifies that a ``path`` has the correct form. Checks that all of the elements in ``path`` are strings. Args: path (Tuple[str, ...]): The components in a collection or document path. is_collection (bool): Indicates if the ``path`` repres...
[ "def", "verify_path", "(", "path", ",", "is_collection", ")", ":", "num_elements", "=", "len", "(", "path", ")", "if", "num_elements", "==", "0", ":", "raise", "ValueError", "(", "\"Document or collection path cannot be empty\"", ")", "if", "is_collection", ":", ...
Verifies that a ``path`` has the correct form. Checks that all of the elements in ``path`` are strings. Args: path (Tuple[str, ...]): The components in a collection or document path. is_collection (bool): Indicates if the ``path`` represents a document or a collection. ...
[ "Verifies", "that", "a", "path", "has", "the", "correct", "form", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L104-L137
28,103
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
encode_value
def encode_value(value): """Converts a native Python value into a Firestore protobuf ``Value``. Args: value (Union[NoneType, bool, int, float, datetime.datetime, \ str, bytes, dict, ~google.cloud.Firestore.GeoPoint]): A native Python value to convert to a protobuf field. Re...
python
def encode_value(value): """Converts a native Python value into a Firestore protobuf ``Value``. Args: value (Union[NoneType, bool, int, float, datetime.datetime, \ str, bytes, dict, ~google.cloud.Firestore.GeoPoint]): A native Python value to convert to a protobuf field. Re...
[ "def", "encode_value", "(", "value", ")", ":", "if", "value", "is", "None", ":", "return", "document_pb2", ".", "Value", "(", "null_value", "=", "struct_pb2", ".", "NULL_VALUE", ")", "# Must come before six.integer_types since ``bool`` is an integer subtype.", "if", "...
Converts a native Python value into a Firestore protobuf ``Value``. Args: value (Union[NoneType, bool, int, float, datetime.datetime, \ str, bytes, dict, ~google.cloud.Firestore.GeoPoint]): A native Python value to convert to a protobuf field. Returns: ~google.cloud.fir...
[ "Converts", "a", "native", "Python", "value", "into", "a", "Firestore", "protobuf", "Value", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L140-L201
28,104
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
encode_dict
def encode_dict(values_dict): """Encode a dictionary into protobuf ``Value``-s. Args: values_dict (dict): The dictionary to encode as protobuf fields. Returns: Dict[str, ~google.cloud.firestore_v1beta1.types.Value]: A dictionary of string keys and ``Value`` protobufs as dictionary ...
python
def encode_dict(values_dict): """Encode a dictionary into protobuf ``Value``-s. Args: values_dict (dict): The dictionary to encode as protobuf fields. Returns: Dict[str, ~google.cloud.firestore_v1beta1.types.Value]: A dictionary of string keys and ``Value`` protobufs as dictionary ...
[ "def", "encode_dict", "(", "values_dict", ")", ":", "return", "{", "key", ":", "encode_value", "(", "value", ")", "for", "key", ",", "value", "in", "six", ".", "iteritems", "(", "values_dict", ")", "}" ]
Encode a dictionary into protobuf ``Value``-s. Args: values_dict (dict): The dictionary to encode as protobuf fields. Returns: Dict[str, ~google.cloud.firestore_v1beta1.types.Value]: A dictionary of string keys and ``Value`` protobufs as dictionary values.
[ "Encode", "a", "dictionary", "into", "protobuf", "Value", "-", "s", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L204-L215
28,105
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
reference_value_to_document
def reference_value_to_document(reference_value, client): """Convert a reference value string to a document. Args: reference_value (str): A document reference value. client (~.firestore_v1beta1.client.Client): A client that has a document factory. Returns: ~.firestore_v...
python
def reference_value_to_document(reference_value, client): """Convert a reference value string to a document. Args: reference_value (str): A document reference value. client (~.firestore_v1beta1.client.Client): A client that has a document factory. Returns: ~.firestore_v...
[ "def", "reference_value_to_document", "(", "reference_value", ",", "client", ")", ":", "# The first 5 parts are", "# projects, {project}, databases, {database}, documents", "parts", "=", "reference_value", ".", "split", "(", "DOCUMENT_PATH_DELIMITER", ",", "5", ")", "if", "...
Convert a reference value string to a document. Args: reference_value (str): A document reference value. client (~.firestore_v1beta1.client.Client): A client that has a document factory. Returns: ~.firestore_v1beta1.document.DocumentReference: The document correspon...
[ "Convert", "a", "reference", "value", "string", "to", "a", "document", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L218-L249
28,106
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
decode_value
def decode_value(value, client): """Converts a Firestore protobuf ``Value`` to a native Python value. Args: value (google.cloud.firestore_v1beta1.types.Value): A Firestore protobuf to be decoded / parsed / converted. client (~.firestore_v1beta1.client.Client): A client that has ...
python
def decode_value(value, client): """Converts a Firestore protobuf ``Value`` to a native Python value. Args: value (google.cloud.firestore_v1beta1.types.Value): A Firestore protobuf to be decoded / parsed / converted. client (~.firestore_v1beta1.client.Client): A client that has ...
[ "def", "decode_value", "(", "value", ",", "client", ")", ":", "value_type", "=", "value", ".", "WhichOneof", "(", "\"value_type\"", ")", "if", "value_type", "==", "\"null_value\"", ":", "return", "None", "elif", "value_type", "==", "\"boolean_value\"", ":", "r...
Converts a Firestore protobuf ``Value`` to a native Python value. Args: value (google.cloud.firestore_v1beta1.types.Value): A Firestore protobuf to be decoded / parsed / converted. client (~.firestore_v1beta1.client.Client): A client that has a document factory. Returns...
[ "Converts", "a", "Firestore", "protobuf", "Value", "to", "a", "native", "Python", "value", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L252-L295
28,107
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
decode_dict
def decode_dict(value_fields, client): """Converts a protobuf map of Firestore ``Value``-s. Args: value_fields (google.protobuf.pyext._message.MessageMapContainer): A protobuf map of Firestore ``Value``-s. client (~.firestore_v1beta1.client.Client): A client that has a d...
python
def decode_dict(value_fields, client): """Converts a protobuf map of Firestore ``Value``-s. Args: value_fields (google.protobuf.pyext._message.MessageMapContainer): A protobuf map of Firestore ``Value``-s. client (~.firestore_v1beta1.client.Client): A client that has a d...
[ "def", "decode_dict", "(", "value_fields", ",", "client", ")", ":", "return", "{", "key", ":", "decode_value", "(", "value", ",", "client", ")", "for", "key", ",", "value", "in", "six", ".", "iteritems", "(", "value_fields", ")", "}" ]
Converts a protobuf map of Firestore ``Value``-s. Args: value_fields (google.protobuf.pyext._message.MessageMapContainer): A protobuf map of Firestore ``Value``-s. client (~.firestore_v1beta1.client.Client): A client that has a document factory. Returns: Dict[st...
[ "Converts", "a", "protobuf", "map", "of", "Firestore", "Value", "-", "s", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L298-L314
28,108
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
get_doc_id
def get_doc_id(document_pb, expected_prefix): """Parse a document ID from a document protobuf. Args: document_pb (google.cloud.proto.firestore.v1beta1.\ document_pb2.Document): A protobuf for a document that was created in a ``CreateDocument`` RPC. expected_prefix (str):...
python
def get_doc_id(document_pb, expected_prefix): """Parse a document ID from a document protobuf. Args: document_pb (google.cloud.proto.firestore.v1beta1.\ document_pb2.Document): A protobuf for a document that was created in a ``CreateDocument`` RPC. expected_prefix (str):...
[ "def", "get_doc_id", "(", "document_pb", ",", "expected_prefix", ")", ":", "prefix", ",", "document_id", "=", "document_pb", ".", "name", ".", "rsplit", "(", "DOCUMENT_PATH_DELIMITER", ",", "1", ")", "if", "prefix", "!=", "expected_prefix", ":", "raise", "Valu...
Parse a document ID from a document protobuf. Args: document_pb (google.cloud.proto.firestore.v1beta1.\ document_pb2.Document): A protobuf for a document that was created in a ``CreateDocument`` RPC. expected_prefix (str): The expected collection prefix for the f...
[ "Parse", "a", "document", "ID", "from", "a", "document", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L317-L342
28,109
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
extract_fields
def extract_fields(document_data, prefix_path, expand_dots=False): """Do depth-first walk of tree, yielding field_path, value""" if not document_data: yield prefix_path, _EmptyDict else: for key, value in sorted(six.iteritems(document_data)): if expand_dots: sub_...
python
def extract_fields(document_data, prefix_path, expand_dots=False): """Do depth-first walk of tree, yielding field_path, value""" if not document_data: yield prefix_path, _EmptyDict else: for key, value in sorted(six.iteritems(document_data)): if expand_dots: sub_...
[ "def", "extract_fields", "(", "document_data", ",", "prefix_path", ",", "expand_dots", "=", "False", ")", ":", "if", "not", "document_data", ":", "yield", "prefix_path", ",", "_EmptyDict", "else", ":", "for", "key", ",", "value", "in", "sorted", "(", "six", ...
Do depth-first walk of tree, yielding field_path, value
[ "Do", "depth", "-", "first", "walk", "of", "tree", "yielding", "field_path", "value" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L348-L366
28,110
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
set_field_value
def set_field_value(document_data, field_path, value): """Set a value into a document for a field_path""" current = document_data for element in field_path.parts[:-1]: current = current.setdefault(element, {}) if value is _EmptyDict: value = {} current[field_path.parts[-1]] = value
python
def set_field_value(document_data, field_path, value): """Set a value into a document for a field_path""" current = document_data for element in field_path.parts[:-1]: current = current.setdefault(element, {}) if value is _EmptyDict: value = {} current[field_path.parts[-1]] = value
[ "def", "set_field_value", "(", "document_data", ",", "field_path", ",", "value", ")", ":", "current", "=", "document_data", "for", "element", "in", "field_path", ".", "parts", "[", ":", "-", "1", "]", ":", "current", "=", "current", ".", "setdefault", "(",...
Set a value into a document for a field_path
[ "Set", "a", "value", "into", "a", "document", "for", "a", "field_path" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L369-L376
28,111
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
get_transaction_id
def get_transaction_id(transaction, read_operation=True): """Get the transaction ID from a ``Transaction`` object. Args: transaction (Optional[~.firestore_v1beta1.transaction.\ Transaction]): An existing transaction that this query will run in. read_operation (Optional[b...
python
def get_transaction_id(transaction, read_operation=True): """Get the transaction ID from a ``Transaction`` object. Args: transaction (Optional[~.firestore_v1beta1.transaction.\ Transaction]): An existing transaction that this query will run in. read_operation (Optional[b...
[ "def", "get_transaction_id", "(", "transaction", ",", "read_operation", "=", "True", ")", ":", "if", "transaction", "is", "None", ":", "return", "None", "else", ":", "if", "not", "transaction", ".", "in_progress", ":", "raise", "ValueError", "(", "INACTIVE_TXN...
Get the transaction ID from a ``Transaction`` object. Args: transaction (Optional[~.firestore_v1beta1.transaction.\ Transaction]): An existing transaction that this query will run in. read_operation (Optional[bool]): Indicates if the transaction ID will be used i...
[ "Get", "the", "transaction", "ID", "from", "a", "Transaction", "object", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L864-L891
28,112
googleapis/google-cloud-python
monitoring/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py
UptimeCheckServiceClient.uptime_check_config_path
def uptime_check_config_path(cls, project, uptime_check_config): """Return a fully-qualified uptime_check_config string.""" return google.api_core.path_template.expand( "projects/{project}/uptimeCheckConfigs/{uptime_check_config}", project=project, uptime_check_config...
python
def uptime_check_config_path(cls, project, uptime_check_config): """Return a fully-qualified uptime_check_config string.""" return google.api_core.path_template.expand( "projects/{project}/uptimeCheckConfigs/{uptime_check_config}", project=project, uptime_check_config...
[ "def", "uptime_check_config_path", "(", "cls", ",", "project", ",", "uptime_check_config", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/uptimeCheckConfigs/{uptime_check_config}\"", ",", "project", "=", "p...
Return a fully-qualified uptime_check_config string.
[ "Return", "a", "fully", "-", "qualified", "uptime_check_config", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/monitoring/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py#L110-L116
28,113
googleapis/google-cloud-python
monitoring/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py
UptimeCheckServiceClient.create_uptime_check_config
def create_uptime_check_config( self, parent, uptime_check_config, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a new uptime check configuration. Example: ...
python
def create_uptime_check_config( self, parent, uptime_check_config, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a new uptime check configuration. Example: ...
[ "def", "create_uptime_check_config", "(", "self", ",", "parent", ",", "uptime_check_config", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "...
Creates a new uptime check configuration. Example: >>> from google.cloud import monitoring_v3 >>> >>> client = monitoring_v3.UptimeCheckServiceClient() >>> >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initializ...
[ "Creates", "a", "new", "uptime", "check", "configuration", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/monitoring/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py#L398-L479
28,114
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.owners
def owners(self): """Legacy access to owner role. DEPRECATED: use ``policy["roles/owners"]`` instead.""" result = set() for role in self._OWNER_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
python
def owners(self): """Legacy access to owner role. DEPRECATED: use ``policy["roles/owners"]`` instead.""" result = set() for role in self._OWNER_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
[ "def", "owners", "(", "self", ")", ":", "result", "=", "set", "(", ")", "for", "role", "in", "self", ".", "_OWNER_ROLES", ":", "for", "member", "in", "self", ".", "_bindings", ".", "get", "(", "role", ",", "(", ")", ")", ":", "result", ".", "add"...
Legacy access to owner role. DEPRECATED: use ``policy["roles/owners"]`` instead.
[ "Legacy", "access", "to", "owner", "role", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L99-L107
28,115
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.owners
def owners(self, value): """Update owners. DEPRECATED: use ``policy["roles/owners"] = value`` instead.""" warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("owners", OWNER_ROLE), DeprecationWarning ) self[OWNER_ROLE] = value
python
def owners(self, value): """Update owners. DEPRECATED: use ``policy["roles/owners"] = value`` instead.""" warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("owners", OWNER_ROLE), DeprecationWarning ) self[OWNER_ROLE] = value
[ "def", "owners", "(", "self", ",", "value", ")", ":", "warnings", ".", "warn", "(", "_ASSIGNMENT_DEPRECATED_MSG", ".", "format", "(", "\"owners\"", ",", "OWNER_ROLE", ")", ",", "DeprecationWarning", ")", "self", "[", "OWNER_ROLE", "]", "=", "value" ]
Update owners. DEPRECATED: use ``policy["roles/owners"] = value`` instead.
[ "Update", "owners", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L110-L117
28,116
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.editors
def editors(self): """Legacy access to editor role. DEPRECATED: use ``policy["roles/editors"]`` instead.""" result = set() for role in self._EDITOR_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
python
def editors(self): """Legacy access to editor role. DEPRECATED: use ``policy["roles/editors"]`` instead.""" result = set() for role in self._EDITOR_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
[ "def", "editors", "(", "self", ")", ":", "result", "=", "set", "(", ")", "for", "role", "in", "self", ".", "_EDITOR_ROLES", ":", "for", "member", "in", "self", ".", "_bindings", ".", "get", "(", "role", ",", "(", ")", ")", ":", "result", ".", "ad...
Legacy access to editor role. DEPRECATED: use ``policy["roles/editors"]`` instead.
[ "Legacy", "access", "to", "editor", "role", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L120-L128
28,117
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.editors
def editors(self, value): """Update editors. DEPRECATED: use ``policy["roles/editors"] = value`` instead.""" warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("editors", EDITOR_ROLE), DeprecationWarning, ) self[EDITOR_ROLE] = value
python
def editors(self, value): """Update editors. DEPRECATED: use ``policy["roles/editors"] = value`` instead.""" warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("editors", EDITOR_ROLE), DeprecationWarning, ) self[EDITOR_ROLE] = value
[ "def", "editors", "(", "self", ",", "value", ")", ":", "warnings", ".", "warn", "(", "_ASSIGNMENT_DEPRECATED_MSG", ".", "format", "(", "\"editors\"", ",", "EDITOR_ROLE", ")", ",", "DeprecationWarning", ",", ")", "self", "[", "EDITOR_ROLE", "]", "=", "value" ...
Update editors. DEPRECATED: use ``policy["roles/editors"] = value`` instead.
[ "Update", "editors", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L131-L139
28,118
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.viewers
def viewers(self): """Legacy access to viewer role. DEPRECATED: use ``policy["roles/viewers"]`` instead """ result = set() for role in self._VIEWER_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
python
def viewers(self): """Legacy access to viewer role. DEPRECATED: use ``policy["roles/viewers"]`` instead """ result = set() for role in self._VIEWER_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
[ "def", "viewers", "(", "self", ")", ":", "result", "=", "set", "(", ")", "for", "role", "in", "self", ".", "_VIEWER_ROLES", ":", "for", "member", "in", "self", ".", "_bindings", ".", "get", "(", "role", ",", "(", ")", ")", ":", "result", ".", "ad...
Legacy access to viewer role. DEPRECATED: use ``policy["roles/viewers"]`` instead
[ "Legacy", "access", "to", "viewer", "role", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L142-L151
28,119
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.viewers
def viewers(self, value): """Update viewers. DEPRECATED: use ``policy["roles/viewers"] = value`` instead. """ warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("viewers", VIEWER_ROLE), DeprecationWarning, ) self[VIEWER_ROLE] = value
python
def viewers(self, value): """Update viewers. DEPRECATED: use ``policy["roles/viewers"] = value`` instead. """ warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("viewers", VIEWER_ROLE), DeprecationWarning, ) self[VIEWER_ROLE] = value
[ "def", "viewers", "(", "self", ",", "value", ")", ":", "warnings", ".", "warn", "(", "_ASSIGNMENT_DEPRECATED_MSG", ".", "format", "(", "\"viewers\"", ",", "VIEWER_ROLE", ")", ",", "DeprecationWarning", ",", ")", "self", "[", "VIEWER_ROLE", "]", "=", "value" ...
Update viewers. DEPRECATED: use ``policy["roles/viewers"] = value`` instead.
[ "Update", "viewers", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L154-L163
28,120
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
_reference_info
def _reference_info(references): """Get information about document references. Helper for :meth:`~.firestore_v1beta1.client.Client.get_all`. Args: references (List[.DocumentReference, ...]): Iterable of document references. Returns: Tuple[List[str, ...], Dict[str, .Documen...
python
def _reference_info(references): """Get information about document references. Helper for :meth:`~.firestore_v1beta1.client.Client.get_all`. Args: references (List[.DocumentReference, ...]): Iterable of document references. Returns: Tuple[List[str, ...], Dict[str, .Documen...
[ "def", "_reference_info", "(", "references", ")", ":", "document_paths", "=", "[", "]", "reference_map", "=", "{", "}", "for", "reference", "in", "references", ":", "doc_path", "=", "reference", ".", "_document_path", "document_paths", ".", "append", "(", "doc...
Get information about document references. Helper for :meth:`~.firestore_v1beta1.client.Client.get_all`. Args: references (List[.DocumentReference, ...]): Iterable of document references. Returns: Tuple[List[str, ...], Dict[str, .DocumentReference]]: A two-tuple of * ...
[ "Get", "information", "about", "document", "references", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L385-L409
28,121
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
_get_reference
def _get_reference(document_path, reference_map): """Get a document reference from a dictionary. This just wraps a simple dictionary look-up with a helpful error that is specific to :meth:`~.firestore.client.Client.get_all`, the **public** caller of this function. Args: document_path (str)...
python
def _get_reference(document_path, reference_map): """Get a document reference from a dictionary. This just wraps a simple dictionary look-up with a helpful error that is specific to :meth:`~.firestore.client.Client.get_all`, the **public** caller of this function. Args: document_path (str)...
[ "def", "_get_reference", "(", "document_path", ",", "reference_map", ")", ":", "try", ":", "return", "reference_map", "[", "document_path", "]", "except", "KeyError", ":", "msg", "=", "_BAD_DOC_TEMPLATE", ".", "format", "(", "document_path", ")", "raise", "Value...
Get a document reference from a dictionary. This just wraps a simple dictionary look-up with a helpful error that is specific to :meth:`~.firestore.client.Client.get_all`, the **public** caller of this function. Args: document_path (str): A fully-qualified document path. reference_map ...
[ "Get", "a", "document", "reference", "from", "a", "dictionary", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L412-L435
28,122
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
_parse_batch_get
def _parse_batch_get(get_doc_response, reference_map, client): """Parse a `BatchGetDocumentsResponse` protobuf. Args: get_doc_response (~google.cloud.proto.firestore.v1beta1.\ firestore_pb2.BatchGetDocumentsResponse): A single response (from a stream) containing the "get" respon...
python
def _parse_batch_get(get_doc_response, reference_map, client): """Parse a `BatchGetDocumentsResponse` protobuf. Args: get_doc_response (~google.cloud.proto.firestore.v1beta1.\ firestore_pb2.BatchGetDocumentsResponse): A single response (from a stream) containing the "get" respon...
[ "def", "_parse_batch_get", "(", "get_doc_response", ",", "reference_map", ",", "client", ")", ":", "result_type", "=", "get_doc_response", ".", "WhichOneof", "(", "\"result\"", ")", "if", "result_type", "==", "\"found\"", ":", "reference", "=", "_get_reference", "...
Parse a `BatchGetDocumentsResponse` protobuf. Args: get_doc_response (~google.cloud.proto.firestore.v1beta1.\ firestore_pb2.BatchGetDocumentsResponse): A single response (from a stream) containing the "get" response for a document. reference_map (Dict[str, .DocumentReference...
[ "Parse", "a", "BatchGetDocumentsResponse", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L438-L484
28,123
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client._firestore_api
def _firestore_api(self): """Lazy-loading getter GAPIC Firestore API. Returns: ~.gapic.firestore.v1beta1.firestore_client.FirestoreClient: The GAPIC client with the credentials of the current client. """ if self._firestore_api_internal is None: self._...
python
def _firestore_api(self): """Lazy-loading getter GAPIC Firestore API. Returns: ~.gapic.firestore.v1beta1.firestore_client.FirestoreClient: The GAPIC client with the credentials of the current client. """ if self._firestore_api_internal is None: self._...
[ "def", "_firestore_api", "(", "self", ")", ":", "if", "self", ".", "_firestore_api_internal", "is", "None", ":", "self", ".", "_firestore_api_internal", "=", "firestore_client", ".", "FirestoreClient", "(", "credentials", "=", "self", ".", "_credentials", ")", "...
Lazy-loading getter GAPIC Firestore API. Returns: ~.gapic.firestore.v1beta1.firestore_client.FirestoreClient: The GAPIC client with the credentials of the current client.
[ "Lazy", "-", "loading", "getter", "GAPIC", "Firestore", "API", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L91-L103
28,124
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client._database_string
def _database_string(self): """The database string corresponding to this client's project. This value is lazy-loaded and cached. Will be of the form ``projects/{project_id}/databases/{database_id}`` but ``database_id == '(default)'`` for the time being. Returns: ...
python
def _database_string(self): """The database string corresponding to this client's project. This value is lazy-loaded and cached. Will be of the form ``projects/{project_id}/databases/{database_id}`` but ``database_id == '(default)'`` for the time being. Returns: ...
[ "def", "_database_string", "(", "self", ")", ":", "if", "self", ".", "_database_string_internal", "is", "None", ":", "# NOTE: database_root_path() is a classmethod, so we don't use", "# self._firestore_api (it isn't necessary).", "db_str", "=", "firestore_client", ".", "F...
The database string corresponding to this client's project. This value is lazy-loaded and cached. Will be of the form ``projects/{project_id}/databases/{database_id}`` but ``database_id == '(default)'`` for the time being. Returns: str: The fully-qualified da...
[ "The", "database", "string", "corresponding", "to", "this", "client", "s", "project", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L106-L129
28,125
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client._rpc_metadata
def _rpc_metadata(self): """The RPC metadata for this client's associated database. Returns: Sequence[Tuple(str, str)]: RPC metadata with resource prefix for the database associated with this client. """ if self._rpc_metadata_internal is None: self._r...
python
def _rpc_metadata(self): """The RPC metadata for this client's associated database. Returns: Sequence[Tuple(str, str)]: RPC metadata with resource prefix for the database associated with this client. """ if self._rpc_metadata_internal is None: self._r...
[ "def", "_rpc_metadata", "(", "self", ")", ":", "if", "self", ".", "_rpc_metadata_internal", "is", "None", ":", "self", ".", "_rpc_metadata_internal", "=", "_helpers", ".", "metadata_with_prefix", "(", "self", ".", "_database_string", ")", "return", "self", ".", ...
The RPC metadata for this client's associated database. Returns: Sequence[Tuple(str, str)]: RPC metadata with resource prefix for the database associated with this client.
[ "The", "RPC", "metadata", "for", "this", "client", "s", "associated", "database", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L132-L144
28,126
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client.collection
def collection(self, *collection_path): """Get a reference to a collection. For a top-level collection: .. code-block:: python >>> client.collection('top') For a sub-collection: .. code-block:: python >>> client.collection('mydocs/doc/subcol') ...
python
def collection(self, *collection_path): """Get a reference to a collection. For a top-level collection: .. code-block:: python >>> client.collection('top') For a sub-collection: .. code-block:: python >>> client.collection('mydocs/doc/subcol') ...
[ "def", "collection", "(", "self", ",", "*", "collection_path", ")", ":", "if", "len", "(", "collection_path", ")", "==", "1", ":", "path", "=", "collection_path", "[", "0", "]", ".", "split", "(", "_helpers", ".", "DOCUMENT_PATH_DELIMITER", ")", "else", ...
Get a reference to a collection. For a top-level collection: .. code-block:: python >>> client.collection('top') For a sub-collection: .. code-block:: python >>> client.collection('mydocs/doc/subcol') >>> # is the same as >>> client.c...
[ "Get", "a", "reference", "to", "a", "collection", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L146-L180
28,127
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client.document
def document(self, *document_path): """Get a reference to a document in a collection. For a top-level document: .. code-block:: python >>> client.document('collek/shun') >>> # is the same as >>> client.document('collek', 'shun') For a document in a...
python
def document(self, *document_path): """Get a reference to a document in a collection. For a top-level document: .. code-block:: python >>> client.document('collek/shun') >>> # is the same as >>> client.document('collek', 'shun') For a document in a...
[ "def", "document", "(", "self", ",", "*", "document_path", ")", ":", "if", "len", "(", "document_path", ")", "==", "1", ":", "path", "=", "document_path", "[", "0", "]", ".", "split", "(", "_helpers", ".", "DOCUMENT_PATH_DELIMITER", ")", "else", ":", "...
Get a reference to a document in a collection. For a top-level document: .. code-block:: python >>> client.document('collek/shun') >>> # is the same as >>> client.document('collek', 'shun') For a document in a sub-collection: .. code-block:: pytho...
[ "Get", "a", "reference", "to", "a", "document", "in", "a", "collection", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L182-L218
28,128
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client.write_option
def write_option(**kwargs): """Create a write option for write operations. Write operations include :meth:`~.DocumentReference.set`, :meth:`~.DocumentReference.update` and :meth:`~.DocumentReference.delete`. One of the following keyword arguments must be provided: * ``...
python
def write_option(**kwargs): """Create a write option for write operations. Write operations include :meth:`~.DocumentReference.set`, :meth:`~.DocumentReference.update` and :meth:`~.DocumentReference.delete`. One of the following keyword arguments must be provided: * ``...
[ "def", "write_option", "(", "*", "*", "kwargs", ")", ":", "if", "len", "(", "kwargs", ")", "!=", "1", ":", "raise", "TypeError", "(", "_BAD_OPTION_ERR", ")", "name", ",", "value", "=", "kwargs", ".", "popitem", "(", ")", "if", "name", "==", "\"last_u...
Create a write option for write operations. Write operations include :meth:`~.DocumentReference.set`, :meth:`~.DocumentReference.update` and :meth:`~.DocumentReference.delete`. One of the following keyword arguments must be provided: * ``last_update_time`` (:class:`google.prot...
[ "Create", "a", "write", "option", "for", "write", "operations", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L250-L292
28,129
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client.get_all
def get_all(self, references, field_paths=None, transaction=None): """Retrieve a batch of documents. .. note:: Documents returned by this method are not guaranteed to be returned in the same order that they are given in ``references``. .. note:: If multiple `...
python
def get_all(self, references, field_paths=None, transaction=None): """Retrieve a batch of documents. .. note:: Documents returned by this method are not guaranteed to be returned in the same order that they are given in ``references``. .. note:: If multiple `...
[ "def", "get_all", "(", "self", ",", "references", ",", "field_paths", "=", "None", ",", "transaction", "=", "None", ")", ":", "document_paths", ",", "reference_map", "=", "_reference_info", "(", "references", ")", "mask", "=", "_get_doc_mask", "(", "field_path...
Retrieve a batch of documents. .. note:: Documents returned by this method are not guaranteed to be returned in the same order that they are given in ``references``. .. note:: If multiple ``references`` refer to the same document, the server will only retu...
[ "Retrieve", "a", "batch", "of", "documents", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L294-L340
28,130
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client.collections
def collections(self): """List top-level collections of the client's database. Returns: Sequence[~.firestore_v1beta1.collection.CollectionReference]: iterator of subcollections of the current document. """ iterator = self._firestore_api.list_collection_ids( ...
python
def collections(self): """List top-level collections of the client's database. Returns: Sequence[~.firestore_v1beta1.collection.CollectionReference]: iterator of subcollections of the current document. """ iterator = self._firestore_api.list_collection_ids( ...
[ "def", "collections", "(", "self", ")", ":", "iterator", "=", "self", ".", "_firestore_api", ".", "list_collection_ids", "(", "self", ".", "_database_string", ",", "metadata", "=", "self", ".", "_rpc_metadata", ")", "iterator", ".", "client", "=", "self", "i...
List top-level collections of the client's database. Returns: Sequence[~.firestore_v1beta1.collection.CollectionReference]: iterator of subcollections of the current document.
[ "List", "top", "-", "level", "collections", "of", "the", "client", "s", "database", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L342-L354
28,131
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction.begin
def begin(self): """Begin a transaction on the database. :rtype: bytes :returns: the ID for the newly-begun transaction. :raises ValueError: if the transaction is already begun, committed, or rolled back. """ if self._transaction_id is not None: r...
python
def begin(self): """Begin a transaction on the database. :rtype: bytes :returns: the ID for the newly-begun transaction. :raises ValueError: if the transaction is already begun, committed, or rolled back. """ if self._transaction_id is not None: r...
[ "def", "begin", "(", "self", ")", ":", "if", "self", ".", "_transaction_id", "is", "not", "None", ":", "raise", "ValueError", "(", "\"Transaction already begun\"", ")", "if", "self", ".", "committed", "is", "not", "None", ":", "raise", "ValueError", "(", "...
Begin a transaction on the database. :rtype: bytes :returns: the ID for the newly-begun transaction. :raises ValueError: if the transaction is already begun, committed, or rolled back.
[ "Begin", "a", "transaction", "on", "the", "database", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L74-L99
28,132
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction.rollback
def rollback(self): """Roll back a transaction on the database.""" self._check_state() database = self._session._database api = database.spanner_api metadata = _metadata_with_prefix(database.name) api.rollback(self._session.name, self._transaction_id, metadata=metadata) ...
python
def rollback(self): """Roll back a transaction on the database.""" self._check_state() database = self._session._database api = database.spanner_api metadata = _metadata_with_prefix(database.name) api.rollback(self._session.name, self._transaction_id, metadata=metadata) ...
[ "def", "rollback", "(", "self", ")", ":", "self", ".", "_check_state", "(", ")", "database", "=", "self", ".", "_session", ".", "_database", "api", "=", "database", ".", "spanner_api", "metadata", "=", "_metadata_with_prefix", "(", "database", ".", "name", ...
Roll back a transaction on the database.
[ "Roll", "back", "a", "transaction", "on", "the", "database", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L101-L109
28,133
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction.execute_update
def execute_update(self, dml, params=None, param_types=None, query_mode=None): """Perform an ``ExecuteSql`` API request with DML. :type dml: str :param dml: SQL DML statement :type params: dict, {str -> column value} :param params: values for parameter replacement. Keys must m...
python
def execute_update(self, dml, params=None, param_types=None, query_mode=None): """Perform an ``ExecuteSql`` API request with DML. :type dml: str :param dml: SQL DML statement :type params: dict, {str -> column value} :param params: values for parameter replacement. Keys must m...
[ "def", "execute_update", "(", "self", ",", "dml", ",", "params", "=", "None", ",", "param_types", "=", "None", ",", "query_mode", "=", "None", ")", ":", "params_pb", "=", "self", ".", "_make_params_pb", "(", "params", ",", "param_types", ")", "database", ...
Perform an ``ExecuteSql`` API request with DML. :type dml: str :param dml: SQL DML statement :type params: dict, {str -> column value} :param params: values for parameter replacement. Keys must match the names used in ``dml``. :type param_types: dict[st...
[ "Perform", "an", "ExecuteSql", "API", "request", "with", "DML", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L165-L206
28,134
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction.batch_update
def batch_update(self, statements): """Perform a batch of DML statements via an ``ExecuteBatchDml`` request. :type statements: Sequence[Union[ str, Tuple[str, Dict[str, Any], Dict[str, Union[dict, .types.Type]]]]] :param statements: List of DML statements, with optional...
python
def batch_update(self, statements): """Perform a batch of DML statements via an ``ExecuteBatchDml`` request. :type statements: Sequence[Union[ str, Tuple[str, Dict[str, Any], Dict[str, Union[dict, .types.Type]]]]] :param statements: List of DML statements, with optional...
[ "def", "batch_update", "(", "self", ",", "statements", ")", ":", "parsed", "=", "[", "]", "for", "statement", "in", "statements", ":", "if", "isinstance", "(", "statement", ",", "str", ")", ":", "parsed", ".", "append", "(", "{", "\"sql\"", ":", "state...
Perform a batch of DML statements via an ``ExecuteBatchDml`` request. :type statements: Sequence[Union[ str, Tuple[str, Dict[str, Any], Dict[str, Union[dict, .types.Type]]]]] :param statements: List of DML statements, with optional params / param types. If passed, '...
[ "Perform", "a", "batch", "of", "DML", "statements", "via", "an", "ExecuteBatchDml", "request", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L208-L258
28,135
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.organization_deidentify_template_path
def organization_deidentify_template_path(cls, organization, deidentify_template): """Return a fully-qualified organization_deidentify_template string.""" return google.api_core.path_template.expand( "organizations/{organization}/deidentifyTemplates/{deidentify_template}", organi...
python
def organization_deidentify_template_path(cls, organization, deidentify_template): """Return a fully-qualified organization_deidentify_template string.""" return google.api_core.path_template.expand( "organizations/{organization}/deidentifyTemplates/{deidentify_template}", organi...
[ "def", "organization_deidentify_template_path", "(", "cls", ",", "organization", ",", "deidentify_template", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/deidentifyTemplates/{deidentify_template}\"", ...
Return a fully-qualified organization_deidentify_template string.
[ "Return", "a", "fully", "-", "qualified", "organization_deidentify_template", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L92-L98
28,136
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.project_deidentify_template_path
def project_deidentify_template_path(cls, project, deidentify_template): """Return a fully-qualified project_deidentify_template string.""" return google.api_core.path_template.expand( "projects/{project}/deidentifyTemplates/{deidentify_template}", project=project, de...
python
def project_deidentify_template_path(cls, project, deidentify_template): """Return a fully-qualified project_deidentify_template string.""" return google.api_core.path_template.expand( "projects/{project}/deidentifyTemplates/{deidentify_template}", project=project, de...
[ "def", "project_deidentify_template_path", "(", "cls", ",", "project", ",", "deidentify_template", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/deidentifyTemplates/{deidentify_template}\"", ",", "project", ...
Return a fully-qualified project_deidentify_template string.
[ "Return", "a", "fully", "-", "qualified", "project_deidentify_template", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L101-L107
28,137
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.organization_inspect_template_path
def organization_inspect_template_path(cls, organization, inspect_template): """Return a fully-qualified organization_inspect_template string.""" return google.api_core.path_template.expand( "organizations/{organization}/inspectTemplates/{inspect_template}", organization=organiza...
python
def organization_inspect_template_path(cls, organization, inspect_template): """Return a fully-qualified organization_inspect_template string.""" return google.api_core.path_template.expand( "organizations/{organization}/inspectTemplates/{inspect_template}", organization=organiza...
[ "def", "organization_inspect_template_path", "(", "cls", ",", "organization", ",", "inspect_template", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/inspectTemplates/{inspect_template}\"", ",", "orga...
Return a fully-qualified organization_inspect_template string.
[ "Return", "a", "fully", "-", "qualified", "organization_inspect_template", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L110-L116
28,138
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.project_inspect_template_path
def project_inspect_template_path(cls, project, inspect_template): """Return a fully-qualified project_inspect_template string.""" return google.api_core.path_template.expand( "projects/{project}/inspectTemplates/{inspect_template}", project=project, inspect_template=...
python
def project_inspect_template_path(cls, project, inspect_template): """Return a fully-qualified project_inspect_template string.""" return google.api_core.path_template.expand( "projects/{project}/inspectTemplates/{inspect_template}", project=project, inspect_template=...
[ "def", "project_inspect_template_path", "(", "cls", ",", "project", ",", "inspect_template", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/inspectTemplates/{inspect_template}\"", ",", "project", "=", "proj...
Return a fully-qualified project_inspect_template string.
[ "Return", "a", "fully", "-", "qualified", "project_inspect_template", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L119-L125
28,139
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.project_job_trigger_path
def project_job_trigger_path(cls, project, job_trigger): """Return a fully-qualified project_job_trigger string.""" return google.api_core.path_template.expand( "projects/{project}/jobTriggers/{job_trigger}", project=project, job_trigger=job_trigger, )
python
def project_job_trigger_path(cls, project, job_trigger): """Return a fully-qualified project_job_trigger string.""" return google.api_core.path_template.expand( "projects/{project}/jobTriggers/{job_trigger}", project=project, job_trigger=job_trigger, )
[ "def", "project_job_trigger_path", "(", "cls", ",", "project", ",", "job_trigger", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/jobTriggers/{job_trigger}\"", ",", "project", "=", "project", ",", "job_...
Return a fully-qualified project_job_trigger string.
[ "Return", "a", "fully", "-", "qualified", "project_job_trigger", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L128-L134
28,140
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.dlp_job_path
def dlp_job_path(cls, project, dlp_job): """Return a fully-qualified dlp_job string.""" return google.api_core.path_template.expand( "projects/{project}/dlpJobs/{dlp_job}", project=project, dlp_job=dlp_job )
python
def dlp_job_path(cls, project, dlp_job): """Return a fully-qualified dlp_job string.""" return google.api_core.path_template.expand( "projects/{project}/dlpJobs/{dlp_job}", project=project, dlp_job=dlp_job )
[ "def", "dlp_job_path", "(", "cls", ",", "project", ",", "dlp_job", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/dlpJobs/{dlp_job}\"", ",", "project", "=", "project", ",", "dlp_job", "=", "dlp_job"...
Return a fully-qualified dlp_job string.
[ "Return", "a", "fully", "-", "qualified", "dlp_job", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L144-L148
28,141
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.organization_stored_info_type_path
def organization_stored_info_type_path(cls, organization, stored_info_type): """Return a fully-qualified organization_stored_info_type string.""" return google.api_core.path_template.expand( "organizations/{organization}/storedInfoTypes/{stored_info_type}", organization=organizat...
python
def organization_stored_info_type_path(cls, organization, stored_info_type): """Return a fully-qualified organization_stored_info_type string.""" return google.api_core.path_template.expand( "organizations/{organization}/storedInfoTypes/{stored_info_type}", organization=organizat...
[ "def", "organization_stored_info_type_path", "(", "cls", ",", "organization", ",", "stored_info_type", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/storedInfoTypes/{stored_info_type}\"", ",", "organ...
Return a fully-qualified organization_stored_info_type string.
[ "Return", "a", "fully", "-", "qualified", "organization_stored_info_type", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L151-L157
28,142
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.project_stored_info_type_path
def project_stored_info_type_path(cls, project, stored_info_type): """Return a fully-qualified project_stored_info_type string.""" return google.api_core.path_template.expand( "projects/{project}/storedInfoTypes/{stored_info_type}", project=project, stored_info_type=s...
python
def project_stored_info_type_path(cls, project, stored_info_type): """Return a fully-qualified project_stored_info_type string.""" return google.api_core.path_template.expand( "projects/{project}/storedInfoTypes/{stored_info_type}", project=project, stored_info_type=s...
[ "def", "project_stored_info_type_path", "(", "cls", ",", "project", ",", "stored_info_type", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/storedInfoTypes/{stored_info_type}\"", ",", "project", "=", "proje...
Return a fully-qualified project_stored_info_type string.
[ "Return", "a", "fully", "-", "qualified", "project_stored_info_type", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L160-L166
28,143
googleapis/google-cloud-python
trace/google/cloud/trace/client.py
Client.trace_api
def trace_api(self): """ Helper for trace-related API calls. See https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools. cloudtrace.v2 """ if self._trace_api is None: self._trace_api = make_trace_api(self) return self._trace_api
python
def trace_api(self): """ Helper for trace-related API calls. See https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools. cloudtrace.v2 """ if self._trace_api is None: self._trace_api = make_trace_api(self) return self._trace_api
[ "def", "trace_api", "(", "self", ")", ":", "if", "self", ".", "_trace_api", "is", "None", ":", "self", ".", "_trace_api", "=", "make_trace_api", "(", "self", ")", "return", "self", ".", "_trace_api" ]
Helper for trace-related API calls. See https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools. cloudtrace.v2
[ "Helper", "for", "trace", "-", "related", "API", "calls", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/client.py#L46-L56
28,144
googleapis/google-cloud-python
error_reporting/google/cloud/error_reporting/_logging.py
_ErrorReportingLoggingAPI.report_error_event
def report_error_event(self, error_report): """Report error payload. :type error_report: dict :param: error_report: dict payload of the error report formatted according to https://cloud.google.com/error-reporting/docs/formatting-error-messages This object sho...
python
def report_error_event(self, error_report): """Report error payload. :type error_report: dict :param: error_report: dict payload of the error report formatted according to https://cloud.google.com/error-reporting/docs/formatting-error-messages This object sho...
[ "def", "report_error_event", "(", "self", ",", "error_report", ")", ":", "logger", "=", "self", ".", "logging_client", ".", "logger", "(", "\"errors\"", ")", "logger", ".", "log_struct", "(", "error_report", ")" ]
Report error payload. :type error_report: dict :param: error_report: dict payload of the error report formatted according to https://cloud.google.com/error-reporting/docs/formatting-error-messages This object should be built using :meth:~`google.cloud.err...
[ "Report", "error", "payload", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/_logging.py#L55-L66
28,145
googleapis/google-cloud-python
api_core/google/api_core/gapic_v1/routing_header.py
to_routing_header
def to_routing_header(params): """Returns a routing header string for the given request parameters. Args: params (Mapping[str, Any]): A dictionary containing the request parameters used for routing. Returns: str: The routing header string. """ if sys.version_info[0] < 3...
python
def to_routing_header(params): """Returns a routing header string for the given request parameters. Args: params (Mapping[str, Any]): A dictionary containing the request parameters used for routing. Returns: str: The routing header string. """ if sys.version_info[0] < 3...
[ "def", "to_routing_header", "(", "params", ")", ":", "if", "sys", ".", "version_info", "[", "0", "]", "<", "3", ":", "# Python 2 does not have the \"safe\" parameter for urlencode.", "return", "urlencode", "(", "params", ")", ".", "replace", "(", "\"%2F\"", ",", ...
Returns a routing header string for the given request parameters. Args: params (Mapping[str, Any]): A dictionary containing the request parameters used for routing. Returns: str: The routing header string.
[ "Returns", "a", "routing", "header", "string", "for", "the", "given", "request", "parameters", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/gapic_v1/routing_header.py#L30-L47
28,146
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/param_types.py
StructField
def StructField(name, field_type): # pylint: disable=invalid-name """Construct a field description protobuf. :type name: str :param name: the name of the field :type field_type: :class:`type_pb2.Type` :param field_type: the type of the field :rtype: :class:`type_pb2.StructType.Field` :re...
python
def StructField(name, field_type): # pylint: disable=invalid-name """Construct a field description protobuf. :type name: str :param name: the name of the field :type field_type: :class:`type_pb2.Type` :param field_type: the type of the field :rtype: :class:`type_pb2.StructType.Field` :re...
[ "def", "StructField", "(", "name", ",", "field_type", ")", ":", "# pylint: disable=invalid-name", "return", "type_pb2", ".", "StructType", ".", "Field", "(", "name", "=", "name", ",", "type", "=", "field_type", ")" ]
Construct a field description protobuf. :type name: str :param name: the name of the field :type field_type: :class:`type_pb2.Type` :param field_type: the type of the field :rtype: :class:`type_pb2.StructType.Field` :returns: the appropriate struct-field-type protobuf
[ "Construct", "a", "field", "description", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/param_types.py#L42-L54
28,147
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/param_types.py
Struct
def Struct(fields): # pylint: disable=invalid-name """Construct a struct parameter type description protobuf. :type fields: list of :class:`type_pb2.StructType.Field` :param fields: the fields of the struct :rtype: :class:`type_pb2.Type` :returns: the appropriate struct-type protobuf """ ...
python
def Struct(fields): # pylint: disable=invalid-name """Construct a struct parameter type description protobuf. :type fields: list of :class:`type_pb2.StructType.Field` :param fields: the fields of the struct :rtype: :class:`type_pb2.Type` :returns: the appropriate struct-type protobuf """ ...
[ "def", "Struct", "(", "fields", ")", ":", "# pylint: disable=invalid-name", "return", "type_pb2", ".", "Type", "(", "code", "=", "type_pb2", ".", "STRUCT", ",", "struct_type", "=", "type_pb2", ".", "StructType", "(", "fields", "=", "fields", ")", ")" ]
Construct a struct parameter type description protobuf. :type fields: list of :class:`type_pb2.StructType.Field` :param fields: the fields of the struct :rtype: :class:`type_pb2.Type` :returns: the appropriate struct-type protobuf
[ "Construct", "a", "struct", "parameter", "type", "description", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/param_types.py#L57-L68
28,148
googleapis/google-cloud-python
speech/google/cloud/speech_v1/helpers.py
SpeechHelpers.streaming_recognize
def streaming_recognize( self, config, requests, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, ): """Perform bi-directional speech recognition. This method allows you to receive results while sending audio; ...
python
def streaming_recognize( self, config, requests, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, ): """Perform bi-directional speech recognition. This method allows you to receive results while sending audio; ...
[ "def", "streaming_recognize", "(", "self", ",", "config", ",", "requests", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", ...
Perform bi-directional speech recognition. This method allows you to receive results while sending audio; it is only available via. gRPC (not REST). .. warning:: This method is EXPERIMENTAL. Its interface might change in the future. Example: >>> from...
[ "Perform", "bi", "-", "directional", "speech", "recognition", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/speech/google/cloud/speech_v1/helpers.py#L28-L84
28,149
googleapis/google-cloud-python
speech/google/cloud/speech_v1/helpers.py
SpeechHelpers._streaming_request_iterable
def _streaming_request_iterable(self, config, requests): """A generator that yields the config followed by the requests. Args: config (~.speech_v1.types.StreamingRecognitionConfig): The configuration to use for the stream. requests (Iterable[~.speech_v1.types.Str...
python
def _streaming_request_iterable(self, config, requests): """A generator that yields the config followed by the requests. Args: config (~.speech_v1.types.StreamingRecognitionConfig): The configuration to use for the stream. requests (Iterable[~.speech_v1.types.Str...
[ "def", "_streaming_request_iterable", "(", "self", ",", "config", ",", "requests", ")", ":", "yield", "self", ".", "types", ".", "StreamingRecognizeRequest", "(", "streaming_config", "=", "config", ")", "for", "request", "in", "requests", ":", "yield", "request"...
A generator that yields the config followed by the requests. Args: config (~.speech_v1.types.StreamingRecognitionConfig): The configuration to use for the stream. requests (Iterable[~.speech_v1.types.StreamingRecognizeRequest]): The input objects. ...
[ "A", "generator", "that", "yields", "the", "config", "followed", "by", "the", "requests", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/speech/google/cloud/speech_v1/helpers.py#L86-L102
28,150
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.project_data_source_path
def project_data_source_path(cls, project, data_source): """Return a fully-qualified project_data_source string.""" return google.api_core.path_template.expand( "projects/{project}/dataSources/{data_source}", project=project, data_source=data_source, )
python
def project_data_source_path(cls, project, data_source): """Return a fully-qualified project_data_source string.""" return google.api_core.path_template.expand( "projects/{project}/dataSources/{data_source}", project=project, data_source=data_source, )
[ "def", "project_data_source_path", "(", "cls", ",", "project", ",", "data_source", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/dataSources/{data_source}\"", ",", "project", "=", "project", ",", "data...
Return a fully-qualified project_data_source string.
[ "Return", "a", "fully", "-", "qualified", "project_data_source", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L88-L94
28,151
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.project_transfer_config_path
def project_transfer_config_path(cls, project, transfer_config): """Return a fully-qualified project_transfer_config string.""" return google.api_core.path_template.expand( "projects/{project}/transferConfigs/{transfer_config}", project=project, transfer_config=transf...
python
def project_transfer_config_path(cls, project, transfer_config): """Return a fully-qualified project_transfer_config string.""" return google.api_core.path_template.expand( "projects/{project}/transferConfigs/{transfer_config}", project=project, transfer_config=transf...
[ "def", "project_transfer_config_path", "(", "cls", ",", "project", ",", "transfer_config", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/transferConfigs/{transfer_config}\"", ",", "project", "=", "project"...
Return a fully-qualified project_transfer_config string.
[ "Return", "a", "fully", "-", "qualified", "project_transfer_config", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L104-L110
28,152
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.project_run_path
def project_run_path(cls, project, transfer_config, run): """Return a fully-qualified project_run string.""" return google.api_core.path_template.expand( "projects/{project}/transferConfigs/{transfer_config}/runs/{run}", project=project, transfer_config=transfer_confi...
python
def project_run_path(cls, project, transfer_config, run): """Return a fully-qualified project_run string.""" return google.api_core.path_template.expand( "projects/{project}/transferConfigs/{transfer_config}/runs/{run}", project=project, transfer_config=transfer_confi...
[ "def", "project_run_path", "(", "cls", ",", "project", ",", "transfer_config", ",", "run", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/transferConfigs/{transfer_config}/runs/{run}\"", ",", "project", "...
Return a fully-qualified project_run string.
[ "Return", "a", "fully", "-", "qualified", "project_run", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L113-L120
28,153
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.create_transfer_config
def create_transfer_config( self, parent, transfer_config, authorization_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a new data transfer configuration....
python
def create_transfer_config( self, parent, transfer_config, authorization_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a new data transfer configuration....
[ "def", "create_transfer_config", "(", "self", ",", "parent", ",", "transfer_config", ",", "authorization_code", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "ap...
Creates a new data transfer configuration. Example: >>> from google.cloud import bigquery_datatransfer_v1 >>> >>> client = bigquery_datatransfer_v1.DataTransferServiceClient() >>> >>> parent = client.project_path('[PROJECT]') >>> ...
[ "Creates", "a", "new", "data", "transfer", "configuration", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L397-L498
28,154
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.update_transfer_config
def update_transfer_config( self, transfer_config, update_mask, authorization_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Updates a data transfer configuration...
python
def update_transfer_config( self, transfer_config, update_mask, authorization_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Updates a data transfer configuration...
[ "def", "update_transfer_config", "(", "self", ",", "transfer_config", ",", "update_mask", ",", "authorization_code", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", ...
Updates a data transfer configuration. All fields must be set, even if they are not updated. Example: >>> from google.cloud import bigquery_datatransfer_v1 >>> >>> client = bigquery_datatransfer_v1.DataTransferServiceClient() >>> >>> # TODO: I...
[ "Updates", "a", "data", "transfer", "configuration", ".", "All", "fields", "must", "be", "set", "even", "if", "they", "are", "not", "updated", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L500-L602
28,155
googleapis/google-cloud-python
webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py
WebRiskServiceV1Beta1Client.compute_threat_list_diff
def compute_threat_list_diff( self, threat_type, constraints, version_token=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Gets the most recent threat list diffs. ...
python
def compute_threat_list_diff( self, threat_type, constraints, version_token=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Gets the most recent threat list diffs. ...
[ "def", "compute_threat_list_diff", "(", "self", ",", "threat_type", ",", "constraints", ",", "version_token", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_...
Gets the most recent threat list diffs. Example: >>> from google.cloud import webrisk_v1beta1 >>> from google.cloud.webrisk_v1beta1 import enums >>> >>> client = webrisk_v1beta1.WebRiskServiceV1Beta1Client() >>> >>> # TODO: Initialize `thr...
[ "Gets", "the", "most", "recent", "threat", "list", "diffs", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py#L171-L242
28,156
googleapis/google-cloud-python
webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py
WebRiskServiceV1Beta1Client.search_uris
def search_uris( self, uri, threat_types, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ This method is used to check whether a URI is on a given threatList. Example: ...
python
def search_uris( self, uri, threat_types, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ This method is used to check whether a URI is on a given threatList. Example: ...
[ "def", "search_uris", "(", "self", ",", "uri", ",", "threat_types", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAUL...
This method is used to check whether a URI is on a given threatList. Example: >>> from google.cloud import webrisk_v1beta1 >>> from google.cloud.webrisk_v1beta1 import enums >>> >>> client = webrisk_v1beta1.WebRiskServiceV1Beta1Client() >>> ...
[ "This", "method", "is", "used", "to", "check", "whether", "a", "URI", "is", "on", "a", "given", "threatList", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py#L244-L305
28,157
googleapis/google-cloud-python
webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py
WebRiskServiceV1Beta1Client.search_hashes
def search_hashes( self, hash_prefix=None, threat_types=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Gets the full hashes that match the requested hash prefix. This ...
python
def search_hashes( self, hash_prefix=None, threat_types=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Gets the full hashes that match the requested hash prefix. This ...
[ "def", "search_hashes", "(", "self", ",", "hash_prefix", "=", "None", ",", "threat_types", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "ga...
Gets the full hashes that match the requested hash prefix. This is used after a hash prefix is looked up in a threatList and there is a match. The client side threatList only holds partial hashes so the client must query this method to determine if there is a full hash match of a threat....
[ "Gets", "the", "full", "hashes", "that", "match", "the", "requested", "hash", "prefix", ".", "This", "is", "used", "after", "a", "hash", "prefix", "is", "looked", "up", "in", "a", "threatList", "and", "there", "is", "a", "match", ".", "The", "client", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py#L307-L368
28,158
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.asset_path
def asset_path(cls, organization, asset): """Return a fully-qualified asset string.""" return google.api_core.path_template.expand( "organizations/{organization}/assets/{asset}", organization=organization, asset=asset, )
python
def asset_path(cls, organization, asset): """Return a fully-qualified asset string.""" return google.api_core.path_template.expand( "organizations/{organization}/assets/{asset}", organization=organization, asset=asset, )
[ "def", "asset_path", "(", "cls", ",", "organization", ",", "asset", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/assets/{asset}\"", ",", "organization", "=", "organization", ",", "asset", ...
Return a fully-qualified asset string.
[ "Return", "a", "fully", "-", "qualified", "asset", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L104-L110
28,159
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.asset_security_marks_path
def asset_security_marks_path(cls, organization, asset): """Return a fully-qualified asset_security_marks string.""" return google.api_core.path_template.expand( "organizations/{organization}/assets/{asset}/securityMarks", organization=organization, asset=asset, ...
python
def asset_security_marks_path(cls, organization, asset): """Return a fully-qualified asset_security_marks string.""" return google.api_core.path_template.expand( "organizations/{organization}/assets/{asset}/securityMarks", organization=organization, asset=asset, ...
[ "def", "asset_security_marks_path", "(", "cls", ",", "organization", ",", "asset", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/assets/{asset}/securityMarks\"", ",", "organization", "=", "organi...
Return a fully-qualified asset_security_marks string.
[ "Return", "a", "fully", "-", "qualified", "asset_security_marks", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L113-L119
28,160
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.source_path
def source_path(cls, organization, source): """Return a fully-qualified source string.""" return google.api_core.path_template.expand( "organizations/{organization}/sources/{source}", organization=organization, source=source, )
python
def source_path(cls, organization, source): """Return a fully-qualified source string.""" return google.api_core.path_template.expand( "organizations/{organization}/sources/{source}", organization=organization, source=source, )
[ "def", "source_path", "(", "cls", ",", "organization", ",", "source", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/sources/{source}\"", ",", "organization", "=", "organization", ",", "source...
Return a fully-qualified source string.
[ "Return", "a", "fully", "-", "qualified", "source", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L122-L128
28,161
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.create_source
def create_source( self, parent, source, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a source. Example: >>> from google.cloud import securitycenter_v...
python
def create_source( self, parent, source, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a source. Example: >>> from google.cloud import securitycenter_v...
[ "def", "create_source", "(", "self", ",", "parent", ",", "source", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT...
Creates a source. Example: >>> from google.cloud import securitycenter_v1 >>> >>> client = securitycenter_v1.SecurityCenterClient() >>> >>> parent = client.organization_path('[ORGANIZATION]') >>> >>> # TODO: Initialize `source`...
[ "Creates", "a", "source", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L256-L335
28,162
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.create_finding
def create_finding( self, parent, finding_id, finding, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a finding. The corresponding source must exist for finding crea...
python
def create_finding( self, parent, finding_id, finding, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a finding. The corresponding source must exist for finding crea...
[ "def", "create_finding", "(", "self", ",", "parent", ",", "finding_id", ",", "finding", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "m...
Creates a finding. The corresponding source must exist for finding creation to succeed. Example: >>> from google.cloud import securitycenter_v1 >>> >>> client = securitycenter_v1.SecurityCenterClient() >>> >>> parent = client.source_path('[ORG...
[ "Creates", "a", "finding", ".", "The", "corresponding", "source", "must", "exist", "for", "finding", "creation", "to", "succeed", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L337-L424
28,163
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.run_asset_discovery
def run_asset_discovery( self, parent, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Runs asset discovery. The discovery is tracked with a long-running operation. This API...
python
def run_asset_discovery( self, parent, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Runs asset discovery. The discovery is tracked with a long-running operation. This API...
[ "def", "run_asset_discovery", "(", "self", ",", "parent", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "...
Runs asset discovery. The discovery is tracked with a long-running operation. This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO\_MANY\_REQUESTS error. Example: >>> from google.cloud i...
[ "Runs", "asset", "discovery", ".", "The", "discovery", "is", "tracked", "with", "a", "long", "-", "running", "operation", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L1565-L1653
28,164
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.update_security_marks
def update_security_marks( self, security_marks, update_mask=None, start_time=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Updates security marks. Example: ...
python
def update_security_marks( self, security_marks, update_mask=None, start_time=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Updates security marks. Example: ...
[ "def", "update_security_marks", "(", "self", ",", "security_marks", ",", "update_mask", "=", "None", ",", "start_time", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ...
Updates security marks. Example: >>> from google.cloud import securitycenter_v1 >>> >>> client = securitycenter_v1.SecurityCenterClient() >>> >>> # TODO: Initialize `security_marks`: >>> security_marks = {} >>> >>> ...
[ "Updates", "security", "marks", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L2165-L2256
28,165
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_set.py
RowSet.add_row_range_from_keys
def add_row_range_from_keys( self, start_key=None, end_key=None, start_inclusive=True, end_inclusive=False ): """Add row range to row_ranges list from the row keys For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_range_from_keys] ...
python
def add_row_range_from_keys( self, start_key=None, end_key=None, start_inclusive=True, end_inclusive=False ): """Add row range to row_ranges list from the row keys For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_range_from_keys] ...
[ "def", "add_row_range_from_keys", "(", "self", ",", "start_key", "=", "None", ",", "end_key", "=", "None", ",", "start_inclusive", "=", "True", ",", "end_inclusive", "=", "False", ")", ":", "row_range", "=", "RowRange", "(", "start_key", ",", "end_key", ",",...
Add row range to row_ranges list from the row keys For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_range_from_keys] :end-before: [END bigtable_row_range_from_keys] :type start_key: bytes :param start_key: (Optional) Start ke...
[ "Add", "row", "range", "to", "row_ranges", "list", "from", "the", "row", "keys" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L81-L110
28,166
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_set.py
RowSet._update_message_request
def _update_message_request(self, message): """Add row keys and row range to given request message :type message: class:`data_messages_v2_pb2.ReadRowsRequest` :param message: The ``ReadRowsRequest`` protobuf """ for each in self.row_keys: message.rows.row_keys.append...
python
def _update_message_request(self, message): """Add row keys and row range to given request message :type message: class:`data_messages_v2_pb2.ReadRowsRequest` :param message: The ``ReadRowsRequest`` protobuf """ for each in self.row_keys: message.rows.row_keys.append...
[ "def", "_update_message_request", "(", "self", ",", "message", ")", ":", "for", "each", "in", "self", ".", "row_keys", ":", "message", ".", "rows", ".", "row_keys", ".", "append", "(", "_to_bytes", "(", "each", ")", ")", "for", "each", "in", "self", "....
Add row keys and row range to given request message :type message: class:`data_messages_v2_pb2.ReadRowsRequest` :param message: The ``ReadRowsRequest`` protobuf
[ "Add", "row", "keys", "and", "row", "range", "to", "given", "request", "message" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L112-L123
28,167
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_set.py
RowRange.get_range_kwargs
def get_range_kwargs(self): """ Convert row range object to dict which can be passed to google.bigtable.v2.RowRange add method. """ range_kwargs = {} if self.start_key is not None: start_key_key = "start_key_open" if self.start_inclusive: s...
python
def get_range_kwargs(self): """ Convert row range object to dict which can be passed to google.bigtable.v2.RowRange add method. """ range_kwargs = {} if self.start_key is not None: start_key_key = "start_key_open" if self.start_inclusive: s...
[ "def", "get_range_kwargs", "(", "self", ")", ":", "range_kwargs", "=", "{", "}", "if", "self", ".", "start_key", "is", "not", "None", ":", "start_key_key", "=", "\"start_key_open\"", "if", "self", ".", "start_inclusive", ":", "start_key_key", "=", "\"start_key...
Convert row range object to dict which can be passed to google.bigtable.v2.RowRange add method.
[ "Convert", "row", "range", "object", "to", "dict", "which", "can", "be", "passed", "to", "google", ".", "bigtable", ".", "v2", ".", "RowRange", "add", "method", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L176-L192
28,168
googleapis/google-cloud-python
error_reporting/google/cloud/error_reporting/client.py
Client._build_error_report
def _build_error_report( self, message, report_location=None, http_context=None, user=None ): """Builds the Error Reporting object to report. This builds the object according to https://cloud.google.com/error-reporting/docs/formatting-error-messages :type message: str ...
python
def _build_error_report( self, message, report_location=None, http_context=None, user=None ): """Builds the Error Reporting object to report. This builds the object according to https://cloud.google.com/error-reporting/docs/formatting-error-messages :type message: str ...
[ "def", "_build_error_report", "(", "self", ",", "message", ",", "report_location", "=", "None", ",", "http_context", "=", "None", ",", "user", "=", "None", ")", ":", "payload", "=", "{", "\"serviceContext\"", ":", "{", "\"service\"", ":", "self", ".", "ser...
Builds the Error Reporting object to report. This builds the object according to https://cloud.google.com/error-reporting/docs/formatting-error-messages :type message: str :param message: The stack trace that was reported or logged by the service. :type rep...
[ "Builds", "the", "Error", "Reporting", "object", "to", "report", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/client.py#L184-L247
28,169
googleapis/google-cloud-python
error_reporting/google/cloud/error_reporting/client.py
Client._send_error_report
def _send_error_report( self, message, report_location=None, http_context=None, user=None ): """Makes the call to the Error Reporting API. This is the lower-level interface to build and send the payload, generally users will use either report() or report_exception() to autom...
python
def _send_error_report( self, message, report_location=None, http_context=None, user=None ): """Makes the call to the Error Reporting API. This is the lower-level interface to build and send the payload, generally users will use either report() or report_exception() to autom...
[ "def", "_send_error_report", "(", "self", ",", "message", ",", "report_location", "=", "None", ",", "http_context", "=", "None", ",", "user", "=", "None", ")", ":", "error_report", "=", "self", ".", "_build_error_report", "(", "message", ",", "report_location"...
Makes the call to the Error Reporting API. This is the lower-level interface to build and send the payload, generally users will use either report() or report_exception() to automatically gather the parameters for this method. :type message: str :param message: The stack trace ...
[ "Makes", "the", "call", "to", "the", "Error", "Reporting", "API", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/client.py#L249-L288
28,170
googleapis/google-cloud-python
error_reporting/google/cloud/error_reporting/client.py
Client.report
def report(self, message, http_context=None, user=None): """ Reports a message to Stackdriver Error Reporting https://cloud.google.com/error-reporting/docs/formatting-error-messages :type message: str :param message: A user-supplied message to report :type http_context: :class...
python
def report(self, message, http_context=None, user=None): """ Reports a message to Stackdriver Error Reporting https://cloud.google.com/error-reporting/docs/formatting-error-messages :type message: str :param message: A user-supplied message to report :type http_context: :class...
[ "def", "report", "(", "self", ",", "message", ",", "http_context", "=", "None", ",", "user", "=", "None", ")", ":", "stack", "=", "traceback", ".", "extract_stack", "(", ")", "last_call", "=", "stack", "[", "-", "2", "]", "file_path", "=", "last_call",...
Reports a message to Stackdriver Error Reporting https://cloud.google.com/error-reporting/docs/formatting-error-messages :type message: str :param message: A user-supplied message to report :type http_context: :class`google.cloud.error_reporting.HTTPContext` :param http_contex...
[ "Reports", "a", "message", "to", "Stackdriver", "Error", "Reporting" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/client.py#L290-L333
28,171
googleapis/google-cloud-python
error_reporting/google/cloud/error_reporting/client.py
Client.report_exception
def report_exception(self, http_context=None, user=None): """ Reports the details of the latest exceptions to Stackdriver Error Reporting. :type http_context: :class`google.cloud.error_reporting.HTTPContext` :param http_context: The HTTP request which was processed when the ...
python
def report_exception(self, http_context=None, user=None): """ Reports the details of the latest exceptions to Stackdriver Error Reporting. :type http_context: :class`google.cloud.error_reporting.HTTPContext` :param http_context: The HTTP request which was processed when the ...
[ "def", "report_exception", "(", "self", ",", "http_context", "=", "None", ",", "user", "=", "None", ")", ":", "self", ".", "_send_error_report", "(", "traceback", ".", "format_exc", "(", ")", ",", "http_context", "=", "http_context", ",", "user", "=", "use...
Reports the details of the latest exceptions to Stackdriver Error Reporting. :type http_context: :class`google.cloud.error_reporting.HTTPContext` :param http_context: The HTTP request which was processed when the error was triggered. :type user:...
[ "Reports", "the", "details", "of", "the", "latest", "exceptions", "to", "Stackdriver", "Error", "Reporting", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/client.py#L335-L361
28,172
googleapis/google-cloud-python
datastore/google/cloud/datastore/transaction.py
Transaction.current
def current(self): """Return the topmost transaction. .. note:: If the topmost element on the stack is not a transaction, returns None. :rtype: :class:`google.cloud.datastore.transaction.Transaction` or None :returns: The current transaction (if any are active)...
python
def current(self): """Return the topmost transaction. .. note:: If the topmost element on the stack is not a transaction, returns None. :rtype: :class:`google.cloud.datastore.transaction.Transaction` or None :returns: The current transaction (if any are active)...
[ "def", "current", "(", "self", ")", ":", "top", "=", "super", "(", "Transaction", ",", "self", ")", ".", "current", "(", ")", "if", "isinstance", "(", "top", ",", "Transaction", ")", ":", "return", "top" ]
Return the topmost transaction. .. note:: If the topmost element on the stack is not a transaction, returns None. :rtype: :class:`google.cloud.datastore.transaction.Transaction` or None :returns: The current transaction (if any are active).
[ "Return", "the", "topmost", "transaction", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/transaction.py#L181-L194
28,173
googleapis/google-cloud-python
datastore/google/cloud/datastore/transaction.py
Transaction.begin
def begin(self): """Begins a transaction. This method is called automatically when entering a with statement, however it can be called explicitly if you don't want to use a context manager. :raises: :class:`~exceptions.ValueError` if the transaction has already...
python
def begin(self): """Begins a transaction. This method is called automatically when entering a with statement, however it can be called explicitly if you don't want to use a context manager. :raises: :class:`~exceptions.ValueError` if the transaction has already...
[ "def", "begin", "(", "self", ")", ":", "super", "(", "Transaction", ",", "self", ")", ".", "begin", "(", ")", "try", ":", "response_pb", "=", "self", ".", "_client", ".", "_datastore_api", ".", "begin_transaction", "(", "self", ".", "project", ")", "se...
Begins a transaction. This method is called automatically when entering a with statement, however it can be called explicitly if you don't want to use a context manager. :raises: :class:`~exceptions.ValueError` if the transaction has already begun.
[ "Begins", "a", "transaction", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/transaction.py#L196-L212
28,174
googleapis/google-cloud-python
datastore/google/cloud/datastore/transaction.py
Transaction.rollback
def rollback(self): """Rolls back the current transaction. This method has necessary side-effects: - Sets the current transaction's ID to None. """ try: # No need to use the response it contains nothing. self._client._datastore_api.rollback(self.project,...
python
def rollback(self): """Rolls back the current transaction. This method has necessary side-effects: - Sets the current transaction's ID to None. """ try: # No need to use the response it contains nothing. self._client._datastore_api.rollback(self.project,...
[ "def", "rollback", "(", "self", ")", ":", "try", ":", "# No need to use the response it contains nothing.", "self", ".", "_client", ".", "_datastore_api", ".", "rollback", "(", "self", ".", "project", ",", "self", ".", "_id", ")", "finally", ":", "super", "(",...
Rolls back the current transaction. This method has necessary side-effects: - Sets the current transaction's ID to None.
[ "Rolls", "back", "the", "current", "transaction", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/transaction.py#L214-L227
28,175
googleapis/google-cloud-python
datastore/google/cloud/datastore/transaction.py
Transaction.put
def put(self, entity): """Adds an entity to be committed. Ensures the transaction is not marked readonly. Please see documentation at :meth:`~google.cloud.datastore.batch.Batch.put` :type entity: :class:`~google.cloud.datastore.entity.Entity` :param entity: the entity t...
python
def put(self, entity): """Adds an entity to be committed. Ensures the transaction is not marked readonly. Please see documentation at :meth:`~google.cloud.datastore.batch.Batch.put` :type entity: :class:`~google.cloud.datastore.entity.Entity` :param entity: the entity t...
[ "def", "put", "(", "self", ",", "entity", ")", ":", "if", "self", ".", "_options", ".", "HasField", "(", "\"read_only\"", ")", ":", "raise", "RuntimeError", "(", "\"Transaction is read only\"", ")", "else", ":", "super", "(", "Transaction", ",", "self", ")...
Adds an entity to be committed. Ensures the transaction is not marked readonly. Please see documentation at :meth:`~google.cloud.datastore.batch.Batch.put` :type entity: :class:`~google.cloud.datastore.entity.Entity` :param entity: the entity to be saved. :raises: :cla...
[ "Adds", "an", "entity", "to", "be", "committed", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/transaction.py#L246-L262
28,176
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1beta1/gapic/security_center_client.py
SecurityCenterClient.list_findings
def list_findings( self, parent, filter_=None, order_by=None, read_time=None, field_mask=None, page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """...
python
def list_findings( self, parent, filter_=None, order_by=None, read_time=None, field_mask=None, page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """...
[ "def", "list_findings", "(", "self", ",", "parent", ",", "filter_", "=", "None", ",", "order_by", "=", "None", ",", "read_time", "=", "None", ",", "field_mask", "=", "None", ",", "page_size", "=", "None", ",", "retry", "=", "google", ".", "api_core", "...
Lists an organization or source's findings. To list across all sources provide a ``-`` as the source id. Example: /v1beta1/organizations/123/sources/-/findings Example: >>> from google.cloud import securitycenter_v1beta1 >>> >>> client = securitycenter_v1bet...
[ "Lists", "an", "organization", "or", "source", "s", "findings", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1beta1/gapic/security_center_client.py#L1157-L1320
28,177
googleapis/google-cloud-python
trace/google/cloud/trace/_gapic.py
_dict_mapping_to_pb
def _dict_mapping_to_pb(mapping, proto_type): """ Convert a dict to protobuf. Args: mapping (dict): A dict that needs to be converted to protobuf. proto_type (str): The type of the Protobuf. Returns: An instance of the specified protobuf. """ converted_pb = getattr(trac...
python
def _dict_mapping_to_pb(mapping, proto_type): """ Convert a dict to protobuf. Args: mapping (dict): A dict that needs to be converted to protobuf. proto_type (str): The type of the Protobuf. Returns: An instance of the specified protobuf. """ converted_pb = getattr(trac...
[ "def", "_dict_mapping_to_pb", "(", "mapping", ",", "proto_type", ")", ":", "converted_pb", "=", "getattr", "(", "trace_pb2", ",", "proto_type", ")", "(", ")", "ParseDict", "(", "mapping", ",", "converted_pb", ")", "return", "converted_pb" ]
Convert a dict to protobuf. Args: mapping (dict): A dict that needs to be converted to protobuf. proto_type (str): The type of the Protobuf. Returns: An instance of the specified protobuf.
[ "Convert", "a", "dict", "to", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/_gapic.py#L245-L258
28,178
googleapis/google-cloud-python
trace/google/cloud/trace/_gapic.py
_span_attrs_to_pb
def _span_attrs_to_pb(span_attr, proto_type): """ Convert a span attribute dict to protobuf, including Links, Attributes, TimeEvents. Args: span_attr (dict): A dict that needs to be converted to protobuf. proto_type (str): The type of the Protobuf. Returns: An instance of t...
python
def _span_attrs_to_pb(span_attr, proto_type): """ Convert a span attribute dict to protobuf, including Links, Attributes, TimeEvents. Args: span_attr (dict): A dict that needs to be converted to protobuf. proto_type (str): The type of the Protobuf. Returns: An instance of t...
[ "def", "_span_attrs_to_pb", "(", "span_attr", ",", "proto_type", ")", ":", "attr_pb", "=", "getattr", "(", "trace_pb2", ".", "Span", ",", "proto_type", ")", "(", ")", "ParseDict", "(", "span_attr", ",", "attr_pb", ")", "return", "attr_pb" ]
Convert a span attribute dict to protobuf, including Links, Attributes, TimeEvents. Args: span_attr (dict): A dict that needs to be converted to protobuf. proto_type (str): The type of the Protobuf. Returns: An instance of the specified protobuf.
[ "Convert", "a", "span", "attribute", "dict", "to", "protobuf", "including", "Links", "Attributes", "TimeEvents", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/_gapic.py#L261-L275
28,179
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/cluster.py
Cluster.from_pb
def from_pb(cls, cluster_pb, instance): """Creates an cluster instance from a protobuf. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_cluster_from_pb] :end-before: [END bigtable_cluster_from_pb] :type cluster_pb: :class:`instance_pb...
python
def from_pb(cls, cluster_pb, instance): """Creates an cluster instance from a protobuf. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_cluster_from_pb] :end-before: [END bigtable_cluster_from_pb] :type cluster_pb: :class:`instance_pb...
[ "def", "from_pb", "(", "cls", ",", "cluster_pb", ",", "instance", ")", ":", "match_cluster_name", "=", "_CLUSTER_NAME_RE", ".", "match", "(", "cluster_pb", ".", "name", ")", "if", "match_cluster_name", "is", "None", ":", "raise", "ValueError", "(", "\"Cluster ...
Creates an cluster instance from a protobuf. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_cluster_from_pb] :end-before: [END bigtable_cluster_from_pb] :type cluster_pb: :class:`instance_pb2.Cluster` :param cluster_pb: An instance p...
[ "Creates", "an", "cluster", "instance", "from", "a", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L94-L137
28,180
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/cluster.py
Cluster.name
def name(self): """Cluster name used in requests. .. note:: This property will not change if ``_instance`` and ``cluster_id`` do not, but the return value is not cached. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_cluster_...
python
def name(self): """Cluster name used in requests. .. note:: This property will not change if ``_instance`` and ``cluster_id`` do not, but the return value is not cached. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_cluster_...
[ "def", "name", "(", "self", ")", ":", "return", "self", ".", "_instance", ".", "_client", ".", "instance_admin_client", ".", "cluster_path", "(", "self", ".", "_instance", ".", "_client", ".", "project", ",", "self", ".", "_instance", ".", "instance_id", "...
Cluster name used in requests. .. note:: This property will not change if ``_instance`` and ``cluster_id`` do not, but the return value is not cached. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_cluster_name] :end-befo...
[ "Cluster", "name", "used", "in", "requests", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L150-L172
28,181
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/cluster.py
Cluster.reload
def reload(self): """Reload the metadata for this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_reload_cluster] :end-before: [END bigtable_reload_cluster] """ cluster_pb = self._instance._client.instance_admin_client...
python
def reload(self): """Reload the metadata for this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_reload_cluster] :end-before: [END bigtable_reload_cluster] """ cluster_pb = self._instance._client.instance_admin_client...
[ "def", "reload", "(", "self", ")", ":", "cluster_pb", "=", "self", ".", "_instance", ".", "_client", ".", "instance_admin_client", ".", "get_cluster", "(", "self", ".", "name", ")", "# NOTE: _update_from_pb does not check that the project and", "# cluster ID on th...
Reload the metadata for this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_reload_cluster] :end-before: [END bigtable_reload_cluster]
[ "Reload", "the", "metadata", "for", "this", "cluster", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L201-L214
28,182
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/cluster.py
Cluster.exists
def exists(self): """Check whether the cluster already exists. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_check_cluster_exists] :end-before: [END bigtable_check_cluster_exists] :rtype: bool :returns: True if the table exi...
python
def exists(self): """Check whether the cluster already exists. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_check_cluster_exists] :end-before: [END bigtable_check_cluster_exists] :rtype: bool :returns: True if the table exi...
[ "def", "exists", "(", "self", ")", ":", "client", "=", "self", ".", "_instance", ".", "_client", "try", ":", "client", ".", "instance_admin_client", ".", "get_cluster", "(", "name", "=", "self", ".", "name", ")", "return", "True", "# NOTE: There could be oth...
Check whether the cluster already exists. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_check_cluster_exists] :end-before: [END bigtable_check_cluster_exists] :rtype: bool :returns: True if the table exists, else False.
[ "Check", "whether", "the", "cluster", "already", "exists", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L216-L234
28,183
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/cluster.py
Cluster.create
def create(self): """Create this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_cluster] :end-before: [END bigtable_create_cluster] .. note:: Uses the ``project``, ``instance`` and ``cluster_id`` on the ...
python
def create(self): """Create this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_cluster] :end-before: [END bigtable_create_cluster] .. note:: Uses the ``project``, ``instance`` and ``cluster_id`` on the ...
[ "def", "create", "(", "self", ")", ":", "client", "=", "self", ".", "_instance", ".", "_client", "cluster_pb", "=", "self", ".", "_to_pb", "(", ")", "return", "client", ".", "instance_admin_client", ".", "create_cluster", "(", "self", ".", "_instance", "."...
Create this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_cluster] :end-before: [END bigtable_create_cluster] .. note:: Uses the ``project``, ``instance`` and ``cluster_id`` on the current :class:`Cl...
[ "Create", "this", "cluster", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L236-L267
28,184
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/cluster.py
Cluster.update
def update(self): """Update this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_update_cluster] :end-before: [END bigtable_update_cluster] .. note:: Updates the ``serve_nodes``. If you'd like to chan...
python
def update(self): """Update this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_update_cluster] :end-before: [END bigtable_update_cluster] .. note:: Updates the ``serve_nodes``. If you'd like to chan...
[ "def", "update", "(", "self", ")", ":", "client", "=", "self", ".", "_instance", ".", "_client", "# We are passing `None` for second argument location.", "# Location is set only at the time of creation of a cluster", "# and can not be changed after cluster has been created.", "return...
Update this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_update_cluster] :end-before: [END bigtable_update_cluster] .. note:: Updates the ``serve_nodes``. If you'd like to change them before updating, rese...
[ "Update", "this", "cluster", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L269-L311
28,185
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/cluster.py
Cluster.delete
def delete(self): """Delete this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_delete_cluster] :end-before: [END bigtable_delete_cluster] Marks a cluster and all of its tables for permanent deletion in 7 days. Imme...
python
def delete(self): """Delete this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_delete_cluster] :end-before: [END bigtable_delete_cluster] Marks a cluster and all of its tables for permanent deletion in 7 days. Imme...
[ "def", "delete", "(", "self", ")", ":", "client", "=", "self", ".", "_instance", ".", "_client", "client", ".", "instance_admin_client", ".", "delete_cluster", "(", "self", ".", "name", ")" ]
Delete this cluster. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_delete_cluster] :end-before: [END bigtable_delete_cluster] Marks a cluster and all of its tables for permanent deletion in 7 days. Immediately upon completion of th...
[ "Delete", "this", "cluster", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L313-L340
28,186
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/cluster.py
Cluster._to_pb
def _to_pb(self): """ Create cluster proto buff message for API calls """ client = self._instance._client location = client.instance_admin_client.location_path( client.project, self.location_id ) cluster_pb = instance_pb2.Cluster( location=location, ...
python
def _to_pb(self): """ Create cluster proto buff message for API calls """ client = self._instance._client location = client.instance_admin_client.location_path( client.project, self.location_id ) cluster_pb = instance_pb2.Cluster( location=location, ...
[ "def", "_to_pb", "(", "self", ")", ":", "client", "=", "self", ".", "_instance", ".", "_client", "location", "=", "client", ".", "instance_admin_client", ".", "location_path", "(", "client", ".", "project", ",", "self", ".", "location_id", ")", "cluster_pb",...
Create cluster proto buff message for API calls
[ "Create", "cluster", "proto", "buff", "message", "for", "API", "calls" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L342-L353
28,187
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_data.py
Cell.from_pb
def from_pb(cls, cell_pb): """Create a new cell from a Cell protobuf. :type cell_pb: :class:`._generated.data_pb2.Cell` :param cell_pb: The protobuf to convert. :rtype: :class:`Cell` :returns: The cell corresponding to the protobuf. """ if cell_pb.labels: ...
python
def from_pb(cls, cell_pb): """Create a new cell from a Cell protobuf. :type cell_pb: :class:`._generated.data_pb2.Cell` :param cell_pb: The protobuf to convert. :rtype: :class:`Cell` :returns: The cell corresponding to the protobuf. """ if cell_pb.labels: ...
[ "def", "from_pb", "(", "cls", ",", "cell_pb", ")", ":", "if", "cell_pb", ".", "labels", ":", "return", "cls", "(", "cell_pb", ".", "value", ",", "cell_pb", ".", "timestamp_micros", ",", "labels", "=", "cell_pb", ".", "labels", ")", "else", ":", "return...
Create a new cell from a Cell protobuf. :type cell_pb: :class:`._generated.data_pb2.Cell` :param cell_pb: The protobuf to convert. :rtype: :class:`Cell` :returns: The cell corresponding to the protobuf.
[ "Create", "a", "new", "cell", "from", "a", "Cell", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_data.py#L59-L71
28,188
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_data.py
PartialRowData.to_dict
def to_dict(self): """Convert the cells to a dictionary. This is intended to be used with HappyBase, so the column family and column qualiers are combined (with ``:``). :rtype: dict :returns: Dictionary containing all the data in the cells of this row. """ resul...
python
def to_dict(self): """Convert the cells to a dictionary. This is intended to be used with HappyBase, so the column family and column qualiers are combined (with ``:``). :rtype: dict :returns: Dictionary containing all the data in the cells of this row. """ resul...
[ "def", "to_dict", "(", "self", ")", ":", "result", "=", "{", "}", "for", "column_family_id", ",", "columns", "in", "six", ".", "iteritems", "(", "self", ".", "_cells", ")", ":", "for", "column_qual", ",", "cells", "in", "six", ".", "iteritems", "(", ...
Convert the cells to a dictionary. This is intended to be used with HappyBase, so the column family and column qualiers are combined (with ``:``). :rtype: dict :returns: Dictionary containing all the data in the cells of this row.
[ "Convert", "the", "cells", "to", "a", "dictionary", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_data.py#L157-L171
28,189
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_data.py
PartialRowData.cell_value
def cell_value(self, column_family_id, column, index=0): """Get a single cell value stored on this instance. For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_cell_value] :end-before: [END bigtable_row_cell_value] Args: ...
python
def cell_value(self, column_family_id, column, index=0): """Get a single cell value stored on this instance. For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_cell_value] :end-before: [END bigtable_row_cell_value] Args: ...
[ "def", "cell_value", "(", "self", ",", "column_family_id", ",", "column", ",", "index", "=", "0", ")", ":", "cells", "=", "self", ".", "find_cells", "(", "column_family_id", ",", "column", ")", "try", ":", "cell", "=", "cells", "[", "index", "]", "exce...
Get a single cell value stored on this instance. For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_cell_value] :end-before: [END bigtable_row_cell_value] Args: column_family_id (str): The ID of the column family. Must be o...
[ "Get", "a", "single", "cell", "value", "stored", "on", "this", "instance", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_data.py#L237-L276
28,190
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_data.py
PartialRowsData.consume_all
def consume_all(self, max_loops=None): """Consume the streamed responses until there are no more. .. warning:: This method will be removed in future releases. Please use this class as a generator instead. :type max_loops: int :param max_loops: (Optional) Maximum ...
python
def consume_all(self, max_loops=None): """Consume the streamed responses until there are no more. .. warning:: This method will be removed in future releases. Please use this class as a generator instead. :type max_loops: int :param max_loops: (Optional) Maximum ...
[ "def", "consume_all", "(", "self", ",", "max_loops", "=", "None", ")", ":", "for", "row", "in", "self", ":", "self", ".", "rows", "[", "row", ".", "row_key", "]", "=", "row" ]
Consume the streamed responses until there are no more. .. warning:: This method will be removed in future releases. Please use this class as a generator instead. :type max_loops: int :param max_loops: (Optional) Maximum number of times to try to consume ...
[ "Consume", "the", "streamed", "responses", "until", "there", "are", "no", "more", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_data.py#L417-L430
28,191
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_data.py
_ReadRowsRequestManager.build_updated_request
def build_updated_request(self): """ Updates the given message request as per last scanned key """ r_kwargs = { "table_name": self.message.table_name, "filter": self.message.filter, } if self.message.rows_limit != 0: r_kwargs["rows_limit"] = m...
python
def build_updated_request(self): """ Updates the given message request as per last scanned key """ r_kwargs = { "table_name": self.message.table_name, "filter": self.message.filter, } if self.message.rows_limit != 0: r_kwargs["rows_limit"] = m...
[ "def", "build_updated_request", "(", "self", ")", ":", "r_kwargs", "=", "{", "\"table_name\"", ":", "self", ".", "message", ".", "table_name", ",", "\"filter\"", ":", "self", ".", "message", ".", "filter", ",", "}", "if", "self", ".", "message", ".", "ro...
Updates the given message request as per last scanned key
[ "Updates", "the", "given", "message", "request", "as", "per", "last", "scanned", "key" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_data.py#L604-L629
28,192
googleapis/google-cloud-python
trace/google/cloud/trace_v1/gapic/trace_service_client.py
TraceServiceClient.patch_traces
def patch_traces( self, project_id, traces, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Sends new traces to Stackdriver Trace or updates existing traces. If the ID of a t...
python
def patch_traces( self, project_id, traces, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Sends new traces to Stackdriver Trace or updates existing traces. If the ID of a t...
[ "def", "patch_traces", "(", "self", ",", "project_id", ",", "traces", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFA...
Sends new traces to Stackdriver Trace or updates existing traces. If the ID of a trace that you send matches that of an existing trace, any fields in the existing trace and its spans are overwritten by the provided values, and any new fields provided are merged with the existing trace data. If t...
[ "Sends", "new", "traces", "to", "Stackdriver", "Trace", "or", "updates", "existing", "traces", ".", "If", "the", "ID", "of", "a", "trace", "that", "you", "send", "matches", "that", "of", "an", "existing", "trace", "any", "fields", "in", "the", "existing", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace_v1/gapic/trace_service_client.py#L177-L254
28,193
googleapis/google-cloud-python
trace/google/cloud/trace_v1/gapic/trace_service_client.py
TraceServiceClient.list_traces
def list_traces( self, project_id, view=None, page_size=None, start_time=None, end_time=None, filter_=None, order_by=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None...
python
def list_traces( self, project_id, view=None, page_size=None, start_time=None, end_time=None, filter_=None, order_by=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None...
[ "def", "list_traces", "(", "self", ",", "project_id", ",", "view", "=", "None", ",", "page_size", "=", "None", ",", "start_time", "=", "None", ",", "end_time", "=", "None", ",", "filter_", "=", "None", ",", "order_by", "=", "None", ",", "retry", "=", ...
Returns of a list of traces that match the specified filter conditions. Example: >>> from google.cloud import trace_v1 >>> >>> client = trace_v1.TraceServiceClient() >>> >>> # TODO: Initialize `project_id`: >>> project_id = '' ...
[ "Returns", "of", "a", "list", "of", "traces", "that", "match", "the", "specified", "filter", "conditions", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace_v1/gapic/trace_service_client.py#L318-L486
28,194
googleapis/google-cloud-python
redis/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py
CloudRedisClient.get_instance
def get_instance( self, name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Gets the details of a specific Redis instance. Example: >>> from google.cloud import redis_...
python
def get_instance( self, name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Gets the details of a specific Redis instance. Example: >>> from google.cloud import redis_...
[ "def", "get_instance", "(", "self", ",", "name", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "metadata"...
Gets the details of a specific Redis instance. Example: >>> from google.cloud import redis_v1beta1 >>> >>> client = redis_v1beta1.CloudRedisClient() >>> >>> name = client.instance_path('[PROJECT]', '[LOCATION]', '[INSTANCE]') >>> ...
[ "Gets", "the", "details", "of", "a", "specific", "Redis", "instance", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/redis/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py#L310-L366
28,195
googleapis/google-cloud-python
redis/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py
CloudRedisClient.update_instance
def update_instance( self, update_mask, instance, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Updates the metadata and configuration of a specific Redis instance. Comple...
python
def update_instance( self, update_mask, instance, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Updates the metadata and configuration of a specific Redis instance. Comple...
[ "def", "update_instance", "(", "self", ",", "update_mask", ",", "instance", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", ...
Updates the metadata and configuration of a specific Redis instance. Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. Example: ...
[ "Updates", "the", "metadata", "and", "configuration", "of", "a", "specific", "Redis", "instance", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/redis/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py#L474-L567
28,196
googleapis/google-cloud-python
redis/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py
CloudRedisClient.delete_instance
def delete_instance( self, name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Deletes a specific Redis instance. Instance stops serving and data is deleted. Example: ...
python
def delete_instance( self, name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Deletes a specific Redis instance. Instance stops serving and data is deleted. Example: ...
[ "def", "delete_instance", "(", "self", ",", "name", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "metada...
Deletes a specific Redis instance. Instance stops serving and data is deleted. Example: >>> from google.cloud import redis_v1beta1 >>> >>> client = redis_v1beta1.CloudRedisClient() >>> >>> name = client.instance_path('[PROJECT]', '[LOCATION]'...
[ "Deletes", "a", "specific", "Redis", "instance", ".", "Instance", "stops", "serving", "and", "data", "is", "deleted", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/redis/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py#L569-L641
28,197
googleapis/google-cloud-python
dataproc/google/cloud/dataproc_v1beta2/gapic/workflow_template_service_client.py
WorkflowTemplateServiceClient.region_path
def region_path(cls, project, region): """Return a fully-qualified region string.""" return google.api_core.path_template.expand( "projects/{project}/regions/{region}", project=project, region=region )
python
def region_path(cls, project, region): """Return a fully-qualified region string.""" return google.api_core.path_template.expand( "projects/{project}/regions/{region}", project=project, region=region )
[ "def", "region_path", "(", "cls", ",", "project", ",", "region", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/regions/{region}\"", ",", "project", "=", "project", ",", "region", "=", "region", "...
Return a fully-qualified region string.
[ "Return", "a", "fully", "-", "qualified", "region", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dataproc/google/cloud/dataproc_v1beta2/gapic/workflow_template_service_client.py#L87-L91
28,198
googleapis/google-cloud-python
dataproc/google/cloud/dataproc_v1beta2/gapic/workflow_template_service_client.py
WorkflowTemplateServiceClient.workflow_template_path
def workflow_template_path(cls, project, region, workflow_template): """Return a fully-qualified workflow_template string.""" return google.api_core.path_template.expand( "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}", project=project, reg...
python
def workflow_template_path(cls, project, region, workflow_template): """Return a fully-qualified workflow_template string.""" return google.api_core.path_template.expand( "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}", project=project, reg...
[ "def", "workflow_template_path", "(", "cls", ",", "project", ",", "region", ",", "workflow_template", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/regions/{region}/workflowTemplates/{workflow_template}\"", ...
Return a fully-qualified workflow_template string.
[ "Return", "a", "fully", "-", "qualified", "workflow_template", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dataproc/google/cloud/dataproc_v1beta2/gapic/workflow_template_service_client.py#L94-L101
28,199
googleapis/google-cloud-python
dataproc/google/cloud/dataproc_v1beta2/gapic/workflow_template_service_client.py
WorkflowTemplateServiceClient.create_workflow_template
def create_workflow_template( self, parent, template, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates new workflow template. Example: >>> from google.clo...
python
def create_workflow_template( self, parent, template, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates new workflow template. Example: >>> from google.clo...
[ "def", "create_workflow_template", "(", "self", ",", "parent", ",", "template", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", "....
Creates new workflow template. Example: >>> from google.cloud import dataproc_v1beta2 >>> >>> client = dataproc_v1beta2.WorkflowTemplateServiceClient() >>> >>> parent = client.region_path('[PROJECT]', '[REGION]') >>> >>> # TODO...
[ "Creates", "new", "workflow", "template", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dataproc/google/cloud/dataproc_v1beta2/gapic/workflow_template_service_client.py#L202-L268