partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
train | Client._database_string | 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... | firestore/google/cloud/firestore_v1beta1/client.py | 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):
"""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:
... | [
"The",
"database",
"string",
"corresponding",
"to",
"this",
"client",
"s",
"project",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L106-L129 | [
"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... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client._rpc_metadata | 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. | firestore/google/cloud/firestore_v1beta1/client.py | 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):
"""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... | [
"The",
"RPC",
"metadata",
"for",
"this",
"client",
"s",
"associated",
"database",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L132-L144 | [
"def",
"_rpc_metadata",
"(",
"self",
")",
":",
"if",
"self",
".",
"_rpc_metadata_internal",
"is",
"None",
":",
"self",
".",
"_rpc_metadata_internal",
"=",
"_helpers",
".",
"metadata_with_prefix",
"(",
"self",
".",
"_database_string",
")",
"return",
"self",
".",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.collection | 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... | firestore/google/cloud/firestore_v1beta1/client.py | 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):
"""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')
... | [
"Get",
"a",
"reference",
"to",
"a",
"collection",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L146-L180 | [
"def",
"collection",
"(",
"self",
",",
"*",
"collection_path",
")",
":",
"if",
"len",
"(",
"collection_path",
")",
"==",
"1",
":",
"path",
"=",
"collection_path",
"[",
"0",
"]",
".",
"split",
"(",
"_helpers",
".",
"DOCUMENT_PATH_DELIMITER",
")",
"else",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.document | 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... | firestore/google/cloud/firestore_v1beta1/client.py | 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):
"""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... | [
"Get",
"a",
"reference",
"to",
"a",
"document",
"in",
"a",
"collection",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L182-L218 | [
"def",
"document",
"(",
"self",
",",
"*",
"document_path",
")",
":",
"if",
"len",
"(",
"document_path",
")",
"==",
"1",
":",
"path",
"=",
"document_path",
"[",
"0",
"]",
".",
"split",
"(",
"_helpers",
".",
"DOCUMENT_PATH_DELIMITER",
")",
"else",
":",
"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.write_option | 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... | firestore/google/cloud/firestore_v1beta1/client.py | 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):
"""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:
* ``... | [
"Create",
"a",
"write",
"option",
"for",
"write",
"operations",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L250-L292 | [
"def",
"write_option",
"(",
"*",
"*",
"kwargs",
")",
":",
"if",
"len",
"(",
"kwargs",
")",
"!=",
"1",
":",
"raise",
"TypeError",
"(",
"_BAD_OPTION_ERR",
")",
"name",
",",
"value",
"=",
"kwargs",
".",
"popitem",
"(",
")",
"if",
"name",
"==",
"\"last_u... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.get_all | 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... | firestore/google/cloud/firestore_v1beta1/client.py | 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):
"""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 `... | [
"Retrieve",
"a",
"batch",
"of",
"documents",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L294-L340 | [
"def",
"get_all",
"(",
"self",
",",
"references",
",",
"field_paths",
"=",
"None",
",",
"transaction",
"=",
"None",
")",
":",
"document_paths",
",",
"reference_map",
"=",
"_reference_info",
"(",
"references",
")",
"mask",
"=",
"_get_doc_mask",
"(",
"field_path... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.collections | List top-level collections of the client's database.
Returns:
Sequence[~.firestore_v1beta1.collection.CollectionReference]:
iterator of subcollections of the current document. | firestore/google/cloud/firestore_v1beta1/client.py | 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):
"""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(
... | [
"List",
"top",
"-",
"level",
"collections",
"of",
"the",
"client",
"s",
"database",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L342-L354 | [
"def",
"collections",
"(",
"self",
")",
":",
"iterator",
"=",
"self",
".",
"_firestore_api",
".",
"list_collection_ids",
"(",
"self",
".",
"_database_string",
",",
"metadata",
"=",
"self",
".",
"_rpc_metadata",
")",
"iterator",
".",
"client",
"=",
"self",
"i... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction._check_state | Helper for :meth:`commit` et al.
:raises: :exc:`ValueError` if the object's state is invalid for making
API requests. | spanner/google/cloud/spanner_v1/transaction.py | def _check_state(self):
"""Helper for :meth:`commit` et al.
:raises: :exc:`ValueError` if the object's state is invalid for making
API requests.
"""
if self._transaction_id is None:
raise ValueError("Transaction is not begun")
if self.committed is n... | def _check_state(self):
"""Helper for :meth:`commit` et al.
:raises: :exc:`ValueError` if the object's state is invalid for making
API requests.
"""
if self._transaction_id is None:
raise ValueError("Transaction is not begun")
if self.committed is n... | [
"Helper",
"for",
":",
"meth",
":",
"commit",
"et",
"al",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L49-L62 | [
"def",
"_check_state",
"(",
"self",
")",
":",
"if",
"self",
".",
"_transaction_id",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"\"Transaction is not begun\"",
")",
"if",
"self",
".",
"committed",
"is",
"not",
"None",
":",
"raise",
"ValueError",
"(",
"\"T... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction.begin | 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. | spanner/google/cloud/spanner_v1/transaction.py | 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):
"""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... | [
"Begin",
"a",
"transaction",
"on",
"the",
"database",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L74-L99 | [
"def",
"begin",
"(",
"self",
")",
":",
"if",
"self",
".",
"_transaction_id",
"is",
"not",
"None",
":",
"raise",
"ValueError",
"(",
"\"Transaction already begun\"",
")",
"if",
"self",
".",
"committed",
"is",
"not",
"None",
":",
"raise",
"ValueError",
"(",
"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction.rollback | Roll back a transaction on the database. | spanner/google/cloud/spanner_v1/transaction.py | 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):
"""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)
... | [
"Roll",
"back",
"a",
"transaction",
"on",
"the",
"database",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L101-L109 | [
"def",
"rollback",
"(",
"self",
")",
":",
"self",
".",
"_check_state",
"(",
")",
"database",
"=",
"self",
".",
"_session",
".",
"_database",
"api",
"=",
"database",
".",
"spanner_api",
"metadata",
"=",
"_metadata_with_prefix",
"(",
"database",
".",
"name",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction.commit | Commit mutations to the database.
:rtype: datetime
:returns: timestamp of the committed changes.
:raises ValueError: if there are no mutations to commit. | spanner/google/cloud/spanner_v1/transaction.py | def commit(self):
"""Commit mutations to the database.
:rtype: datetime
:returns: timestamp of the committed changes.
:raises ValueError: if there are no mutations to commit.
"""
self._check_state()
database = self._session._database
api = database.spann... | def commit(self):
"""Commit mutations to the database.
:rtype: datetime
:returns: timestamp of the committed changes.
:raises ValueError: if there are no mutations to commit.
"""
self._check_state()
database = self._session._database
api = database.spann... | [
"Commit",
"mutations",
"to",
"the",
"database",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L111-L131 | [
"def",
"commit",
"(",
"self",
")",
":",
"self",
".",
"_check_state",
"(",
")",
"database",
"=",
"self",
".",
"_session",
".",
"_database",
"api",
"=",
"database",
".",
"spanner_api",
"metadata",
"=",
"_metadata_with_prefix",
"(",
"database",
".",
"name",
"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction._make_params_pb | Helper for :meth:`execute_update`.
:type params: dict, {str -> column value}
:param params: values for parameter replacement. Keys must match
the names used in ``dml``.
:type param_types: dict[str -> Union[dict, .types.Type]]
:param param_types:
(Opt... | spanner/google/cloud/spanner_v1/transaction.py | def _make_params_pb(params, param_types):
"""Helper for :meth:`execute_update`.
:type params: dict, {str -> column value}
:param params: values for parameter replacement. Keys must match
the names used in ``dml``.
:type param_types: dict[str -> Union[dict, .type... | def _make_params_pb(params, param_types):
"""Helper for :meth:`execute_update`.
:type params: dict, {str -> column value}
:param params: values for parameter replacement. Keys must match
the names used in ``dml``.
:type param_types: dict[str -> Union[dict, .type... | [
"Helper",
"for",
":",
"meth",
":",
"execute_update",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L134-L163 | [
"def",
"_make_params_pb",
"(",
"params",
",",
"param_types",
")",
":",
"if",
"params",
"is",
"not",
"None",
":",
"if",
"param_types",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"\"Specify 'param_types' when passing 'params'.\"",
")",
"return",
"Struct",
"(",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction.execute_update | 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... | spanner/google/cloud/spanner_v1/transaction.py | 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):
"""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... | [
"Perform",
"an",
"ExecuteSql",
"API",
"request",
"with",
"DML",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L165-L206 | [
"def",
"execute_update",
"(",
"self",
",",
"dml",
",",
"params",
"=",
"None",
",",
"param_types",
"=",
"None",
",",
"query_mode",
"=",
"None",
")",
":",
"params_pb",
"=",
"self",
".",
"_make_params_pb",
"(",
"params",
",",
"param_types",
")",
"database",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction.batch_update | 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, '... | spanner/google/cloud/spanner_v1/transaction.py | 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):
"""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... | [
"Perform",
"a",
"batch",
"of",
"DML",
"statements",
"via",
"an",
"ExecuteBatchDml",
"request",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L208-L258 | [
"def",
"batch_update",
"(",
"self",
",",
"statements",
")",
":",
"parsed",
"=",
"[",
"]",
"for",
"statement",
"in",
"statements",
":",
"if",
"isinstance",
"(",
"statement",
",",
"str",
")",
":",
"parsed",
".",
"append",
"(",
"{",
"\"sql\"",
":",
"state... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | TimestampRange.to_pb | Converts the :class:`TimestampRange` to a protobuf.
:rtype: :class:`.data_v2_pb2.TimestampRange`
:returns: The converted current object. | bigtable/google/cloud/bigtable/row_filters.py | def to_pb(self):
"""Converts the :class:`TimestampRange` to a protobuf.
:rtype: :class:`.data_v2_pb2.TimestampRange`
:returns: The converted current object.
"""
timestamp_range_kwargs = {}
if self.start is not None:
timestamp_range_kwargs["start_timestamp_mic... | def to_pb(self):
"""Converts the :class:`TimestampRange` to a protobuf.
:rtype: :class:`.data_v2_pb2.TimestampRange`
:returns: The converted current object.
"""
timestamp_range_kwargs = {}
if self.start is not None:
timestamp_range_kwargs["start_timestamp_mic... | [
"Converts",
"the",
":",
"class",
":",
"TimestampRange",
"to",
"a",
"protobuf",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L271-L287 | [
"def",
"to_pb",
"(",
"self",
")",
":",
"timestamp_range_kwargs",
"=",
"{",
"}",
"if",
"self",
".",
"start",
"is",
"not",
"None",
":",
"timestamp_range_kwargs",
"[",
"\"start_timestamp_micros\"",
"]",
"=",
"(",
"_microseconds_from_datetime",
"(",
"self",
".",
"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | ColumnRangeFilter.to_pb | Converts the row filter to a protobuf.
First converts to a :class:`.data_v2_pb2.ColumnRange` and then uses it
in the ``column_range_filter`` field.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object. | bigtable/google/cloud/bigtable/row_filters.py | def to_pb(self):
"""Converts the row filter to a protobuf.
First converts to a :class:`.data_v2_pb2.ColumnRange` and then uses it
in the ``column_range_filter`` field.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object.
"""
column_ran... | def to_pb(self):
"""Converts the row filter to a protobuf.
First converts to a :class:`.data_v2_pb2.ColumnRange` and then uses it
in the ``column_range_filter`` field.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object.
"""
column_ran... | [
"Converts",
"the",
"row",
"filter",
"to",
"a",
"protobuf",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L399-L423 | [
"def",
"to_pb",
"(",
"self",
")",
":",
"column_range_kwargs",
"=",
"{",
"\"family_name\"",
":",
"self",
".",
"column_family_id",
"}",
"if",
"self",
".",
"start_column",
"is",
"not",
"None",
":",
"if",
"self",
".",
"inclusive_start",
":",
"key",
"=",
"\"sta... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | ValueRangeFilter.to_pb | Converts the row filter to a protobuf.
First converts to a :class:`.data_v2_pb2.ValueRange` and then uses
it to create a row filter protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object. | bigtable/google/cloud/bigtable/row_filters.py | def to_pb(self):
"""Converts the row filter to a protobuf.
First converts to a :class:`.data_v2_pb2.ValueRange` and then uses
it to create a row filter protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object.
"""
value_range_kwar... | def to_pb(self):
"""Converts the row filter to a protobuf.
First converts to a :class:`.data_v2_pb2.ValueRange` and then uses
it to create a row filter protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object.
"""
value_range_kwar... | [
"Converts",
"the",
"row",
"filter",
"to",
"a",
"protobuf",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L524-L548 | [
"def",
"to_pb",
"(",
"self",
")",
":",
"value_range_kwargs",
"=",
"{",
"}",
"if",
"self",
".",
"start_value",
"is",
"not",
"None",
":",
"if",
"self",
".",
"inclusive_start",
":",
"key",
"=",
"\"start_value_closed\"",
"else",
":",
"key",
"=",
"\"start_value... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | RowFilterChain.to_pb | Converts the row filter to a protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object. | bigtable/google/cloud/bigtable/row_filters.py | def to_pb(self):
"""Converts the row filter to a protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object.
"""
chain = data_v2_pb2.RowFilter.Chain(
filters=[row_filter.to_pb() for row_filter in self.filters]
)
return da... | def to_pb(self):
"""Converts the row filter to a protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object.
"""
chain = data_v2_pb2.RowFilter.Chain(
filters=[row_filter.to_pb() for row_filter in self.filters]
)
return da... | [
"Converts",
"the",
"row",
"filter",
"to",
"a",
"protobuf",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L716-L725 | [
"def",
"to_pb",
"(",
"self",
")",
":",
"chain",
"=",
"data_v2_pb2",
".",
"RowFilter",
".",
"Chain",
"(",
"filters",
"=",
"[",
"row_filter",
".",
"to_pb",
"(",
")",
"for",
"row_filter",
"in",
"self",
".",
"filters",
"]",
")",
"return",
"data_v2_pb2",
".... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | RowFilterUnion.to_pb | Converts the row filter to a protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object. | bigtable/google/cloud/bigtable/row_filters.py | def to_pb(self):
"""Converts the row filter to a protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object.
"""
interleave = data_v2_pb2.RowFilter.Interleave(
filters=[row_filter.to_pb() for row_filter in self.filters]
)
... | def to_pb(self):
"""Converts the row filter to a protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object.
"""
interleave = data_v2_pb2.RowFilter.Interleave(
filters=[row_filter.to_pb() for row_filter in self.filters]
)
... | [
"Converts",
"the",
"row",
"filter",
"to",
"a",
"protobuf",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L741-L750 | [
"def",
"to_pb",
"(",
"self",
")",
":",
"interleave",
"=",
"data_v2_pb2",
".",
"RowFilter",
".",
"Interleave",
"(",
"filters",
"=",
"[",
"row_filter",
".",
"to_pb",
"(",
")",
"for",
"row_filter",
"in",
"self",
".",
"filters",
"]",
")",
"return",
"data_v2_... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | ConditionalRowFilter.to_pb | Converts the row filter to a protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object. | bigtable/google/cloud/bigtable/row_filters.py | def to_pb(self):
"""Converts the row filter to a protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object.
"""
condition_kwargs = {"predicate_filter": self.base_filter.to_pb()}
if self.true_filter is not None:
condition_kwargs[... | def to_pb(self):
"""Converts the row filter to a protobuf.
:rtype: :class:`.data_v2_pb2.RowFilter`
:returns: The converted current object.
"""
condition_kwargs = {"predicate_filter": self.base_filter.to_pb()}
if self.true_filter is not None:
condition_kwargs[... | [
"Converts",
"the",
"row",
"filter",
"to",
"a",
"protobuf",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L800-L812 | [
"def",
"to_pb",
"(",
"self",
")",
":",
"condition_kwargs",
"=",
"{",
"\"predicate_filter\"",
":",
"self",
".",
"base_filter",
".",
"to_pb",
"(",
")",
"}",
"if",
"self",
".",
"true_filter",
"is",
"not",
"None",
":",
"condition_kwargs",
"[",
"\"true_filter\"",... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.organization_deidentify_template_path | Return a fully-qualified organization_deidentify_template string. | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | 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 a fully-qualified organization_deidentify_template string."""
return google.api_core.path_template.expand(
"organizations/{organization}/deidentifyTemplates/{deidentify_template}",
organi... | [
"Return",
"a",
"fully",
"-",
"qualified",
"organization_deidentify_template",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L92-L98 | [
"def",
"organization_deidentify_template_path",
"(",
"cls",
",",
"organization",
",",
"deidentify_template",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"organizations/{organization}/deidentifyTemplates/{deidentify_template}\"",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.project_deidentify_template_path | Return a fully-qualified project_deidentify_template string. | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | 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 a fully-qualified project_deidentify_template string."""
return google.api_core.path_template.expand(
"projects/{project}/deidentifyTemplates/{deidentify_template}",
project=project,
de... | [
"Return",
"a",
"fully",
"-",
"qualified",
"project_deidentify_template",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L101-L107 | [
"def",
"project_deidentify_template_path",
"(",
"cls",
",",
"project",
",",
"deidentify_template",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/deidentifyTemplates/{deidentify_template}\"",
",",
"project",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.organization_inspect_template_path | Return a fully-qualified organization_inspect_template string. | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | 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 a fully-qualified organization_inspect_template string."""
return google.api_core.path_template.expand(
"organizations/{organization}/inspectTemplates/{inspect_template}",
organization=organiza... | [
"Return",
"a",
"fully",
"-",
"qualified",
"organization_inspect_template",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L110-L116 | [
"def",
"organization_inspect_template_path",
"(",
"cls",
",",
"organization",
",",
"inspect_template",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"organizations/{organization}/inspectTemplates/{inspect_template}\"",
",",
"orga... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.project_inspect_template_path | Return a fully-qualified project_inspect_template string. | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | 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 a fully-qualified project_inspect_template string."""
return google.api_core.path_template.expand(
"projects/{project}/inspectTemplates/{inspect_template}",
project=project,
inspect_template=... | [
"Return",
"a",
"fully",
"-",
"qualified",
"project_inspect_template",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L119-L125 | [
"def",
"project_inspect_template_path",
"(",
"cls",
",",
"project",
",",
"inspect_template",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/inspectTemplates/{inspect_template}\"",
",",
"project",
"=",
"proj... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.project_job_trigger_path | Return a fully-qualified project_job_trigger string. | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | 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 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,
) | [
"Return",
"a",
"fully",
"-",
"qualified",
"project_job_trigger",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L128-L134 | [
"def",
"project_job_trigger_path",
"(",
"cls",
",",
"project",
",",
"job_trigger",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/jobTriggers/{job_trigger}\"",
",",
"project",
"=",
"project",
",",
"job_... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.dlp_job_path | Return a fully-qualified dlp_job string. | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | 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 a fully-qualified dlp_job string."""
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",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L144-L148 | [
"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"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.organization_stored_info_type_path | Return a fully-qualified organization_stored_info_type string. | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | 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 a fully-qualified organization_stored_info_type string."""
return google.api_core.path_template.expand(
"organizations/{organization}/storedInfoTypes/{stored_info_type}",
organization=organizat... | [
"Return",
"a",
"fully",
"-",
"qualified",
"organization_stored_info_type",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L151-L157 | [
"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... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.project_stored_info_type_path | Return a fully-qualified project_stored_info_type string. | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | 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 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... | [
"Return",
"a",
"fully",
"-",
"qualified",
"project_stored_info_type",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L160-L166 | [
"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... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.redact_image | Redacts potentially sensitive info from an image.
This method has limits on input size, processing time, and output size.
See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
learn more.
When no InfoTypes or CustomInfoTypes are specified in this request, the
... | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | def redact_image(
self,
parent,
inspect_config=None,
image_redaction_configs=None,
include_findings=None,
byte_item=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
... | def redact_image(
self,
parent,
inspect_config=None,
image_redaction_configs=None,
include_findings=None,
byte_item=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
... | [
"Redacts",
"potentially",
"sensitive",
"info",
"from",
"an",
"image",
".",
"This",
"method",
"has",
"limits",
"on",
"input",
"size",
"processing",
"time",
"and",
"output",
"size",
".",
"See",
"https",
":",
"//",
"cloud",
".",
"google",
".",
"com",
"/",
"... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L366-L464 | [
"def",
"redact_image",
"(",
"self",
",",
"parent",
",",
"inspect_config",
"=",
"None",
",",
"image_redaction_configs",
"=",
"None",
",",
"include_findings",
"=",
"None",
",",
"byte_item",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.reidentify_content | Re-identifies content that has been de-identified. See
https://cloud.google.com/dlp/docs/pseudonymization#re-identification\_in\_free\_text\_code\_example
to learn more.
Example:
>>> from google.cloud import dlp_v2
>>>
>>> client = dlp_v2.DlpServiceClient()
... | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | def reidentify_content(
self,
parent,
reidentify_config=None,
inspect_config=None,
item=None,
inspect_template_name=None,
reidentify_template_name=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,... | def reidentify_content(
self,
parent,
reidentify_config=None,
inspect_config=None,
item=None,
inspect_template_name=None,
reidentify_template_name=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,... | [
"Re",
"-",
"identifies",
"content",
"that",
"has",
"been",
"de",
"-",
"identified",
".",
"See",
"https",
":",
"//",
"cloud",
".",
"google",
".",
"com",
"/",
"dlp",
"/",
"docs",
"/",
"pseudonymization#re",
"-",
"identification",
"\\",
"_in",
"\\",
"_free"... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L579-L691 | [
"def",
"reidentify_content",
"(",
"self",
",",
"parent",
",",
"reidentify_config",
"=",
"None",
",",
"inspect_config",
"=",
"None",
",",
"item",
"=",
"None",
",",
"inspect_template_name",
"=",
"None",
",",
"reidentify_template_name",
"=",
"None",
",",
"retry",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.list_info_types | Returns a list of the sensitive information types that the DLP API
supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
learn more.
Example:
>>> from google.cloud import dlp_v2
>>>
>>> client = dlp_v2.DlpServiceClient()
>>>
... | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | def list_info_types(
self,
language_code=None,
filter_=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Returns a list of the sensitive information types that the DLP API
... | def list_info_types(
self,
language_code=None,
filter_=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Returns a list of the sensitive information types that the DLP API
... | [
"Returns",
"a",
"list",
"of",
"the",
"sensitive",
"information",
"types",
"that",
"the",
"DLP",
"API",
"supports",
".",
"See",
"https",
":",
"//",
"cloud",
".",
"google",
".",
"com",
"/",
"dlp",
"/",
"docs",
"/",
"infotypes",
"-",
"reference",
"to",
"l... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L693-L754 | [
"def",
"list_info_types",
"(",
"self",
",",
"language_code",
"=",
"None",
",",
"filter_",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_core",
".",
"gap... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.create_inspect_template | Creates an InspectTemplate for re-using frequently used configuration
for inspecting content, images, and storage.
See https://cloud.google.com/dlp/docs/creating-templates to learn more.
Example:
>>> from google.cloud import dlp_v2
>>>
>>> client = dlp_v2.Dlp... | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | def create_inspect_template(
self,
parent,
inspect_template=None,
template_id=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates an InspectTemplate for re-using fr... | def create_inspect_template(
self,
parent,
inspect_template=None,
template_id=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates an InspectTemplate for re-using fr... | [
"Creates",
"an",
"InspectTemplate",
"for",
"re",
"-",
"using",
"frequently",
"used",
"configuration",
"for",
"inspecting",
"content",
"images",
"and",
"storage",
".",
"See",
"https",
":",
"//",
"cloud",
".",
"google",
".",
"com",
"/",
"dlp",
"/",
"docs",
"... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L756-L838 | [
"def",
"create_inspect_template",
"(",
"self",
",",
"parent",
",",
"inspect_template",
"=",
"None",
",",
"template_id",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.create_dlp_job | Creates a new job to inspect storage or calculate risk metrics.
See https://cloud.google.com/dlp/docs/inspecting-storage and
https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
system will automat... | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | def create_dlp_job(
self,
parent,
inspect_job=None,
risk_job=None,
job_id=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates a new job to inspect storage o... | def create_dlp_job(
self,
parent,
inspect_job=None,
risk_job=None,
job_id=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates a new job to inspect storage o... | [
"Creates",
"a",
"new",
"job",
"to",
"inspect",
"storage",
"or",
"calculate",
"risk",
"metrics",
".",
"See",
"https",
":",
"//",
"cloud",
".",
"google",
".",
"com",
"/",
"dlp",
"/",
"docs",
"/",
"inspecting",
"-",
"storage",
"and",
"https",
":",
"//",
... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L1621-L1715 | [
"def",
"create_dlp_job",
"(",
"self",
",",
"parent",
",",
"inspect_job",
"=",
"None",
",",
"risk_job",
"=",
"None",
",",
"job_id",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.create_job_trigger | Creates a job trigger to run DLP actions such as scanning storage for
sensitive information on a set schedule.
See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
Example:
>>> from google.cloud import dlp_v2
>>>
>>> client = dlp_v2.DlpS... | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | def create_job_trigger(
self,
parent,
job_trigger=None,
trigger_id=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates a job trigger to run DLP actions such as scan... | def create_job_trigger(
self,
parent,
job_trigger=None,
trigger_id=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates a job trigger to run DLP actions such as scan... | [
"Creates",
"a",
"job",
"trigger",
"to",
"run",
"DLP",
"actions",
"such",
"as",
"scanning",
"storage",
"for",
"sensitive",
"information",
"on",
"a",
"set",
"schedule",
".",
"See",
"https",
":",
"//",
"cloud",
".",
"google",
".",
"com",
"/",
"dlp",
"/",
... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L2455-L2536 | [
"def",
"create_job_trigger",
"(",
"self",
",",
"parent",
",",
"job_trigger",
"=",
"None",
",",
"trigger_id",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"a... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DlpServiceClient.create_stored_info_type | Creates a pre-built stored infoType to be used for inspection.
See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
learn more.
Example:
>>> from google.cloud import dlp_v2
>>>
>>> client = dlp_v2.DlpServiceClient()
>>>
>... | dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py | def create_stored_info_type(
self,
parent,
config=None,
stored_info_type_id=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates a pre-built stored infoType to be us... | def create_stored_info_type(
self,
parent,
config=None,
stored_info_type_id=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates a pre-built stored infoType to be us... | [
"Creates",
"a",
"pre",
"-",
"built",
"stored",
"infoType",
"to",
"be",
"used",
"for",
"inspection",
".",
"See",
"https",
":",
"//",
"cloud",
".",
"google",
".",
"com",
"/",
"dlp",
"/",
"docs",
"/",
"creating",
"-",
"stored",
"-",
"infotypes",
"to",
"... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L2538-L2620 | [
"def",
"create_stored_info_type",
"(",
"self",
",",
"parent",
",",
"config",
"=",
"None",
",",
"stored_info_type_id",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.trace_api | Helper for trace-related API calls.
See
https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.
cloudtrace.v2 | trace/google/cloud/trace/client.py | 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):
"""
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 | [
"Helper",
"for",
"trace",
"-",
"related",
"API",
"calls",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/client.py#L46-L56 | [
"def",
"trace_api",
"(",
"self",
")",
":",
"if",
"self",
".",
"_trace_api",
"is",
"None",
":",
"self",
".",
"_trace_api",
"=",
"make_trace_api",
"(",
"self",
")",
"return",
"self",
".",
"_trace_api"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.batch_write_spans | Sends new spans to Stackdriver Trace or updates existing traces. If the
name of a trace that you send matches that of an existing trace, new
spans are added to the existing trace. Attempt to update existing spans
results undefined behavior. If the name does not match, a new trace is
crea... | trace/google/cloud/trace/client.py | def batch_write_spans(self, name, spans, retry=None, timeout=None):
"""
Sends new spans to Stackdriver Trace or updates existing traces. If the
name of a trace that you send matches that of an existing trace, new
spans are added to the existing trace. Attempt to update existing spans
... | def batch_write_spans(self, name, spans, retry=None, timeout=None):
"""
Sends new spans to Stackdriver Trace or updates existing traces. If the
name of a trace that you send matches that of an existing trace, new
spans are added to the existing trace. Attempt to update existing spans
... | [
"Sends",
"new",
"spans",
"to",
"Stackdriver",
"Trace",
"or",
"updates",
"existing",
"traces",
".",
"If",
"the",
"name",
"of",
"a",
"trace",
"that",
"you",
"send",
"matches",
"that",
"of",
"an",
"existing",
"trace",
"new",
"spans",
"are",
"added",
"to",
"... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/client.py#L58-L101 | [
"def",
"batch_write_spans",
"(",
"self",
",",
"name",
",",
"spans",
",",
"retry",
"=",
"None",
",",
"timeout",
"=",
"None",
")",
":",
"self",
".",
"trace_api",
".",
"batch_write_spans",
"(",
"name",
"=",
"name",
",",
"spans",
"=",
"spans",
",",
"retry"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.create_span | Creates a new Span.
Example:
>>> from google.cloud import trace_v2
>>>
>>> client = trace_v2.Client()
>>>
>>> name = 'projects/{project}/traces/{trace_id}/spans/{span_id}'.
format('[PROJECT]', '[TRACE_ID]', '[SPAN_ID]')
... | trace/google/cloud/trace/client.py | def create_span(
self,
name,
span_id,
display_name,
start_time,
end_time,
parent_span_id=None,
attributes=None,
stack_trace=None,
time_events=None,
links=None,
status=None,
same_process_as_parent_span=None,
c... | def create_span(
self,
name,
span_id,
display_name,
start_time,
end_time,
parent_span_id=None,
attributes=None,
stack_trace=None,
time_events=None,
links=None,
status=None,
same_process_as_parent_span=None,
c... | [
"Creates",
"a",
"new",
"Span",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/client.py#L103-L226 | [
"def",
"create_span",
"(",
"self",
",",
"name",
",",
"span_id",
",",
"display_name",
",",
"start_time",
",",
"end_time",
",",
"parent_span_id",
"=",
"None",
",",
"attributes",
"=",
"None",
",",
"stack_trace",
"=",
"None",
",",
"time_events",
"=",
"None",
"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _ErrorReportingLoggingAPI.report_error_event | 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... | error_reporting/google/cloud/error_reporting/_logging.py | 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):
"""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... | [
"Report",
"error",
"payload",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/_logging.py#L55-L66 | [
"def",
"report_error_event",
"(",
"self",
",",
"error_report",
")",
":",
"logger",
"=",
"self",
".",
"logging_client",
".",
"logger",
"(",
"\"errors\"",
")",
"logger",
".",
"log_struct",
"(",
"error_report",
")"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | to_routing_header | 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. | api_core/google/api_core/gapic_v1/routing_header.py | 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):
"""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... | [
"Returns",
"a",
"routing",
"header",
"string",
"for",
"the",
"given",
"request",
"parameters",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/gapic_v1/routing_header.py#L30-L47 | [
"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\"",
",",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | StructField | 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 | spanner/google/cloud/spanner_v1/param_types.py | 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
"""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... | [
"Construct",
"a",
"field",
"description",
"protobuf",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/param_types.py#L42-L54 | [
"def",
"StructField",
"(",
"name",
",",
"field_type",
")",
":",
"# pylint: disable=invalid-name",
"return",
"type_pb2",
".",
"StructType",
".",
"Field",
"(",
"name",
"=",
"name",
",",
"type",
"=",
"field_type",
")"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Struct | 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 | spanner/google/cloud/spanner_v1/param_types.py | 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
"""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",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/param_types.py#L57-L68 | [
"def",
"Struct",
"(",
"fields",
")",
":",
"# pylint: disable=invalid-name",
"return",
"type_pb2",
".",
"Type",
"(",
"code",
"=",
"type_pb2",
".",
"STRUCT",
",",
"struct_type",
"=",
"type_pb2",
".",
"StructType",
"(",
"fields",
"=",
"fields",
")",
")"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SpeechHelpers.streaming_recognize | 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... | speech/google/cloud/speech_v1/helpers.py | 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.DEFAULT,
):
"""Perform bi-directional speech recognition.
This method allows you to receive results while sending audio;
... | [
"Perform",
"bi",
"-",
"directional",
"speech",
"recognition",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/speech/google/cloud/speech_v1/helpers.py#L28-L84 | [
"def",
"streaming_recognize",
"(",
"self",
",",
"config",
",",
"requests",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SpeechHelpers._streaming_request_iterable | 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.
... | speech/google/cloud/speech_v1/helpers.py | 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):
"""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... | [
"A",
"generator",
"that",
"yields",
"the",
"config",
"followed",
"by",
"the",
"requests",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/speech/google/cloud/speech_v1/helpers.py#L86-L102 | [
"def",
"_streaming_request_iterable",
"(",
"self",
",",
"config",
",",
"requests",
")",
":",
"yield",
"self",
".",
"types",
".",
"StreamingRecognizeRequest",
"(",
"streaming_config",
"=",
"config",
")",
"for",
"request",
"in",
"requests",
":",
"yield",
"request"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DataTransferServiceClient.project_data_source_path | Return a fully-qualified project_data_source string. | bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py | 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 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,
) | [
"Return",
"a",
"fully",
"-",
"qualified",
"project_data_source",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L88-L94 | [
"def",
"project_data_source_path",
"(",
"cls",
",",
"project",
",",
"data_source",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/dataSources/{data_source}\"",
",",
"project",
"=",
"project",
",",
"data... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DataTransferServiceClient.project_transfer_config_path | Return a fully-qualified project_transfer_config string. | bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py | 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 a fully-qualified project_transfer_config string."""
return google.api_core.path_template.expand(
"projects/{project}/transferConfigs/{transfer_config}",
project=project,
transfer_config=transf... | [
"Return",
"a",
"fully",
"-",
"qualified",
"project_transfer_config",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L104-L110 | [
"def",
"project_transfer_config_path",
"(",
"cls",
",",
"project",
",",
"transfer_config",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/transferConfigs/{transfer_config}\"",
",",
"project",
"=",
"project"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DataTransferServiceClient.project_run_path | Return a fully-qualified project_run string. | bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py | 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 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... | [
"Return",
"a",
"fully",
"-",
"qualified",
"project_run",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L113-L120 | [
"def",
"project_run_path",
"(",
"cls",
",",
"project",
",",
"transfer_config",
",",
"run",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"projects/{project}/transferConfigs/{transfer_config}/runs/{run}\"",
",",
"project",
"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DataTransferServiceClient.create_transfer_config | Creates a new data transfer configuration.
Example:
>>> from google.cloud import bigquery_datatransfer_v1
>>>
>>> client = bigquery_datatransfer_v1.DataTransferServiceClient()
>>>
>>> parent = client.project_path('[PROJECT]')
>>>
... | bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py | 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.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates a new data transfer configuration.... | [
"Creates",
"a",
"new",
"data",
"transfer",
"configuration",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L397-L498 | [
"def",
"create_transfer_config",
"(",
"self",
",",
"parent",
",",
"transfer_config",
",",
"authorization_code",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"ap... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DataTransferServiceClient.update_transfer_config | 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... | bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py | 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.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Updates a data transfer configuration... | [
"Updates",
"a",
"data",
"transfer",
"configuration",
".",
"All",
"fields",
"must",
"be",
"set",
"even",
"if",
"they",
"are",
"not",
"updated",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L500-L602 | [
"def",
"update_transfer_config",
"(",
"self",
",",
"transfer_config",
",",
"update_mask",
",",
"authorization_code",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | DataTransferServiceClient.schedule_transfer_runs | Creates transfer runs for a time range [start\_time, end\_time]. For
each date - or whatever granularity the data source supports - in the
range, one transfer run is created. Note that runs are created per UTC
time in the time range.
Example:
>>> from google.cloud import big... | bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py | def schedule_transfer_runs(
self,
parent,
start_time,
end_time,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates transfer runs for a time range [start\_time, end\_time... | def schedule_transfer_runs(
self,
parent,
start_time,
end_time,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Creates transfer runs for a time range [start\_time, end\_time... | [
"Creates",
"transfer",
"runs",
"for",
"a",
"time",
"range",
"[",
"start",
"\\",
"_time",
"end",
"\\",
"_time",
"]",
".",
"For",
"each",
"date",
"-",
"or",
"whatever",
"granularity",
"the",
"data",
"source",
"supports",
"-",
"in",
"the",
"range",
"one",
... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L848-L939 | [
"def",
"schedule_transfer_runs",
"(",
"self",
",",
"parent",
",",
"start_time",
",",
"end_time",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | WebRiskServiceV1Beta1Client.compute_threat_list_diff | 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... | webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py | 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_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Gets the most recent threat list diffs.
... | [
"Gets",
"the",
"most",
"recent",
"threat",
"list",
"diffs",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py#L171-L242 | [
"def",
"compute_threat_list_diff",
"(",
"self",
",",
"threat_type",
",",
"constraints",
",",
"version_token",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | WebRiskServiceV1Beta1Client.search_uris | 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()
>>>
... | webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py | 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.DEFAULT,
metadata=None,
):
"""
This method is used to check whether a URI is on a given threatList.
Example:
... | [
"This",
"method",
"is",
"used",
"to",
"check",
"whether",
"a",
"URI",
"is",
"on",
"a",
"given",
"threatList",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py#L244-L305 | [
"def",
"search_uris",
"(",
"self",
",",
"uri",
",",
"threat_types",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAUL... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | WebRiskServiceV1Beta1Client.search_hashes | 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.... | webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py | 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.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Gets the full hashes that match the requested hash prefix.
This ... | [
"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",
... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py#L307-L368 | [
"def",
"search_hashes",
"(",
"self",
",",
"hash_prefix",
"=",
"None",
",",
"threat_types",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_core",
".",
"ga... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SecurityCenterClient.asset_path | Return a fully-qualified asset string. | securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py | 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 a fully-qualified asset string."""
return google.api_core.path_template.expand(
"organizations/{organization}/assets/{asset}",
organization=organization,
asset=asset,
) | [
"Return",
"a",
"fully",
"-",
"qualified",
"asset",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L104-L110 | [
"def",
"asset_path",
"(",
"cls",
",",
"organization",
",",
"asset",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"organizations/{organization}/assets/{asset}\"",
",",
"organization",
"=",
"organization",
",",
"asset",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SecurityCenterClient.asset_security_marks_path | Return a fully-qualified asset_security_marks string. | securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py | 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 a fully-qualified asset_security_marks string."""
return google.api_core.path_template.expand(
"organizations/{organization}/assets/{asset}/securityMarks",
organization=organization,
asset=asset,
... | [
"Return",
"a",
"fully",
"-",
"qualified",
"asset_security_marks",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L113-L119 | [
"def",
"asset_security_marks_path",
"(",
"cls",
",",
"organization",
",",
"asset",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"organizations/{organization}/assets/{asset}/securityMarks\"",
",",
"organization",
"=",
"organi... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SecurityCenterClient.source_path | Return a fully-qualified source string. | securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py | 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 a fully-qualified source string."""
return google.api_core.path_template.expand(
"organizations/{organization}/sources/{source}",
organization=organization,
source=source,
) | [
"Return",
"a",
"fully",
"-",
"qualified",
"source",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L122-L128 | [
"def",
"source_path",
"(",
"cls",
",",
"organization",
",",
"source",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"organizations/{organization}/sources/{source}\"",
",",
"organization",
"=",
"organization",
",",
"source... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SecurityCenterClient.finding_path | Return a fully-qualified finding string. | securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py | def finding_path(cls, organization, source, finding):
"""Return a fully-qualified finding string."""
return google.api_core.path_template.expand(
"organizations/{organization}/sources/{source}/findings/{finding}",
organization=organization,
source=source,
... | def finding_path(cls, organization, source, finding):
"""Return a fully-qualified finding string."""
return google.api_core.path_template.expand(
"organizations/{organization}/sources/{source}/findings/{finding}",
organization=organization,
source=source,
... | [
"Return",
"a",
"fully",
"-",
"qualified",
"finding",
"string",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L138-L145 | [
"def",
"finding_path",
"(",
"cls",
",",
"organization",
",",
"source",
",",
"finding",
")",
":",
"return",
"google",
".",
"api_core",
".",
"path_template",
".",
"expand",
"(",
"\"organizations/{organization}/sources/{source}/findings/{finding}\"",
",",
"organization",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SecurityCenterClient.create_source | Creates a source.
Example:
>>> from google.cloud import securitycenter_v1
>>>
>>> client = securitycenter_v1.SecurityCenterClient()
>>>
>>> parent = client.organization_path('[ORGANIZATION]')
>>>
>>> # TODO: Initialize `source`... | securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py | 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,
metadata=None,
):
"""
Creates a source.
Example:
>>> from google.cloud import securitycenter_v... | [
"Creates",
"a",
"source",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L256-L335 | [
"def",
"create_source",
"(",
"self",
",",
"parent",
",",
"source",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SecurityCenterClient.create_finding | 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... | securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py | 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.method.DEFAULT,
metadata=None,
):
"""
Creates a finding. The corresponding source must exist for finding crea... | [
"Creates",
"a",
"finding",
".",
"The",
"corresponding",
"source",
"must",
"exist",
"for",
"finding",
"creation",
"to",
"succeed",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L337-L424 | [
"def",
"create_finding",
"(",
"self",
",",
"parent",
",",
"finding_id",
",",
"finding",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"m... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SecurityCenterClient.run_asset_discovery | 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... | securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py | 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,
metadata=None,
):
"""
Runs asset discovery. The discovery is tracked with a long-running
operation.
This API... | [
"Runs",
"asset",
"discovery",
".",
"The",
"discovery",
"is",
"tracked",
"with",
"a",
"long",
"-",
"running",
"operation",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L1565-L1653 | [
"def",
"run_asset_discovery",
"(",
"self",
",",
"parent",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SecurityCenterClient.update_security_marks | Updates security marks.
Example:
>>> from google.cloud import securitycenter_v1
>>>
>>> client = securitycenter_v1.SecurityCenterClient()
>>>
>>> # TODO: Initialize `security_marks`:
>>> security_marks = {}
>>>
>>> ... | securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py | 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.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Updates security marks.
Example:
... | [
"Updates",
"security",
"marks",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L2165-L2256 | [
"def",
"update_security_marks",
"(",
"self",
",",
"security_marks",
",",
"update_mask",
"=",
"None",
",",
"start_time",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
".",
"gapic_v1",
".",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"google",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _LoggingAPI.list_entries | Return a page of log entry resources.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list
:type projects: list of strings
:param projects: project IDs to include. If not passed,
defaults to the project bound to the client.
:t... | logging/google/cloud/logging/_http.py | def list_entries(
self, projects, filter_=None, order_by=None, page_size=None, page_token=None
):
"""Return a page of log entry resources.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list
:type projects: list of strings
:param projects: pr... | def list_entries(
self, projects, filter_=None, order_by=None, page_size=None, page_token=None
):
"""Return a page of log entry resources.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list
:type projects: list of strings
:param projects: pr... | [
"Return",
"a",
"page",
"of",
"log",
"entry",
"resources",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L65-L127 | [
"def",
"list_entries",
"(",
"self",
",",
"projects",
",",
"filter_",
"=",
"None",
",",
"order_by",
"=",
"None",
",",
"page_size",
"=",
"None",
",",
"page_token",
"=",
"None",
")",
":",
"extra_params",
"=",
"{",
"\"projectIds\"",
":",
"projects",
"}",
"if... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _LoggingAPI.write_entries | API call: log an entry resource via a POST request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write
:type entries: sequence of mapping
:param entries: the log entry resources to log.
:type logger_name: str
:param logger_name: name of defaul... | logging/google/cloud/logging/_http.py | def write_entries(self, entries, logger_name=None, resource=None, labels=None):
"""API call: log an entry resource via a POST request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write
:type entries: sequence of mapping
:param entries: the log entry r... | def write_entries(self, entries, logger_name=None, resource=None, labels=None):
"""API call: log an entry resource via a POST request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write
:type entries: sequence of mapping
:param entries: the log entry r... | [
"API",
"call",
":",
"log",
"an",
"entry",
"resource",
"via",
"a",
"POST",
"request"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L129-L161 | [
"def",
"write_entries",
"(",
"self",
",",
"entries",
",",
"logger_name",
"=",
"None",
",",
"resource",
"=",
"None",
",",
"labels",
"=",
"None",
")",
":",
"data",
"=",
"{",
"\"entries\"",
":",
"list",
"(",
"entries",
")",
"}",
"if",
"logger_name",
"is",... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _LoggingAPI.logger_delete | API call: delete all entries in a logger via a DELETE request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete
:type project: str
:param project: ID of project containing the log entries to delete
:type logger_name: str
:param logger... | logging/google/cloud/logging/_http.py | def logger_delete(self, project, logger_name):
"""API call: delete all entries in a logger via a DELETE request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete
:type project: str
:param project: ID of project containing the log entries to de... | def logger_delete(self, project, logger_name):
"""API call: delete all entries in a logger via a DELETE request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete
:type project: str
:param project: ID of project containing the log entries to de... | [
"API",
"call",
":",
"delete",
"all",
"entries",
"in",
"a",
"logger",
"via",
"a",
"DELETE",
"request"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L163-L176 | [
"def",
"logger_delete",
"(",
"self",
",",
"project",
",",
"logger_name",
")",
":",
"path",
"=",
"\"/projects/%s/logs/%s\"",
"%",
"(",
"project",
",",
"logger_name",
")",
"self",
".",
"api_request",
"(",
"method",
"=",
"\"DELETE\"",
",",
"path",
"=",
"path",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _SinksAPI.list_sinks | List sinks for the project associated with this client.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list
:type project: str
:param project: ID of the project whose sinks are to be listed.
:type page_size: int
:param page_size: maximum ... | logging/google/cloud/logging/_http.py | def list_sinks(self, project, page_size=None, page_token=None):
"""List sinks for the project associated with this client.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list
:type project: str
:param project: ID of the project whose sinks are to ... | def list_sinks(self, project, page_size=None, page_token=None):
"""List sinks for the project associated with this client.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list
:type project: str
:param project: ID of the project whose sinks are to ... | [
"List",
"sinks",
"for",
"the",
"project",
"associated",
"with",
"this",
"client",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L193-L230 | [
"def",
"list_sinks",
"(",
"self",
",",
"project",
",",
"page_size",
"=",
"None",
",",
"page_token",
"=",
"None",
")",
":",
"extra_params",
"=",
"{",
"}",
"if",
"page_size",
"is",
"not",
"None",
":",
"extra_params",
"[",
"\"pageSize\"",
"]",
"=",
"page_si... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _SinksAPI.sink_get | API call: retrieve a sink resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get
:type project: str
:param project: ID of the project containing the sink.
:type sink_name: str
:param sink_name: the name of the sink
:rtype:... | logging/google/cloud/logging/_http.py | def sink_get(self, project, sink_name):
"""API call: retrieve a sink resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get
:type project: str
:param project: ID of the project containing the sink.
:type sink_name: str
:par... | def sink_get(self, project, sink_name):
"""API call: retrieve a sink resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get
:type project: str
:param project: ID of the project containing the sink.
:type sink_name: str
:par... | [
"API",
"call",
":",
"retrieve",
"a",
"sink",
"resource",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L269-L285 | [
"def",
"sink_get",
"(",
"self",
",",
"project",
",",
"sink_name",
")",
":",
"target",
"=",
"\"/projects/%s/sinks/%s\"",
"%",
"(",
"project",
",",
"sink_name",
")",
"return",
"self",
".",
"api_request",
"(",
"method",
"=",
"\"GET\"",
",",
"path",
"=",
"targ... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _SinksAPI.sink_update | API call: update a sink resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update
:type project: str
:param project: ID of the project containing the sink.
:type sink_name: str
:param sink_name: the name of the sink
:type ... | logging/google/cloud/logging/_http.py | def sink_update(
self, project, sink_name, filter_, destination, unique_writer_identity=False
):
"""API call: update a sink resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update
:type project: str
:param project: ID of the p... | def sink_update(
self, project, sink_name, filter_, destination, unique_writer_identity=False
):
"""API call: update a sink resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update
:type project: str
:param project: ID of the p... | [
"API",
"call",
":",
"update",
"a",
"sink",
"resource",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L287-L322 | [
"def",
"sink_update",
"(",
"self",
",",
"project",
",",
"sink_name",
",",
"filter_",
",",
"destination",
",",
"unique_writer_identity",
"=",
"False",
")",
":",
"target",
"=",
"\"/projects/%s/sinks/%s\"",
"%",
"(",
"project",
",",
"sink_name",
")",
"data",
"=",... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _SinksAPI.sink_delete | API call: delete a sink resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete
:type project: str
:param project: ID of the project containing the sink.
:type sink_name: str
:param sink_name: the name of the sink | logging/google/cloud/logging/_http.py | def sink_delete(self, project, sink_name):
"""API call: delete a sink resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete
:type project: str
:param project: ID of the project containing the sink.
:type sink_name: str
... | def sink_delete(self, project, sink_name):
"""API call: delete a sink resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete
:type project: str
:param project: ID of the project containing the sink.
:type sink_name: str
... | [
"API",
"call",
":",
"delete",
"a",
"sink",
"resource",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L324-L337 | [
"def",
"sink_delete",
"(",
"self",
",",
"project",
",",
"sink_name",
")",
":",
"target",
"=",
"\"/projects/%s/sinks/%s\"",
"%",
"(",
"project",
",",
"sink_name",
")",
"self",
".",
"api_request",
"(",
"method",
"=",
"\"DELETE\"",
",",
"path",
"=",
"target",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _MetricsAPI.list_metrics | List metrics for the project associated with this client.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/list
:type project: str
:param project: ID of the project whose metrics are to be listed.
:type page_size: int
:param page_size: ma... | logging/google/cloud/logging/_http.py | def list_metrics(self, project, page_size=None, page_token=None):
"""List metrics for the project associated with this client.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/list
:type project: str
:param project: ID of the project whose metrics... | def list_metrics(self, project, page_size=None, page_token=None):
"""List metrics for the project associated with this client.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/list
:type project: str
:param project: ID of the project whose metrics... | [
"List",
"metrics",
"for",
"the",
"project",
"associated",
"with",
"this",
"client",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L354-L391 | [
"def",
"list_metrics",
"(",
"self",
",",
"project",
",",
"page_size",
"=",
"None",
",",
"page_token",
"=",
"None",
")",
":",
"extra_params",
"=",
"{",
"}",
"if",
"page_size",
"is",
"not",
"None",
":",
"extra_params",
"[",
"\"pageSize\"",
"]",
"=",
"page_... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _MetricsAPI.metric_create | API call: create a metric resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create
:type project: str
:param project: ID of the project in which to create the metric.
:type metric_name: str
:param metric_name: the name of the me... | logging/google/cloud/logging/_http.py | def metric_create(self, project, metric_name, filter_, description=None):
"""API call: create a metric resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create
:type project: str
:param project: ID of the project in which to create the m... | def metric_create(self, project, metric_name, filter_, description=None):
"""API call: create a metric resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create
:type project: str
:param project: ID of the project in which to create the m... | [
"API",
"call",
":",
"create",
"a",
"metric",
"resource",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L393-L414 | [
"def",
"metric_create",
"(",
"self",
",",
"project",
",",
"metric_name",
",",
"filter_",
",",
"description",
"=",
"None",
")",
":",
"target",
"=",
"\"/projects/%s/metrics\"",
"%",
"(",
"project",
",",
")",
"data",
"=",
"{",
"\"name\"",
":",
"metric_name",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _MetricsAPI.metric_get | API call: retrieve a metric resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type project: str
:param project: ID of the project containing the metric.
:type metric_name: str
:param metric_name: the name of the metric
... | logging/google/cloud/logging/_http.py | def metric_get(self, project, metric_name):
"""API call: retrieve a metric resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type project: str
:param project: ID of the project containing the metric.
:type metric_name: str
... | def metric_get(self, project, metric_name):
"""API call: retrieve a metric resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type project: str
:param project: ID of the project containing the metric.
:type metric_name: str
... | [
"API",
"call",
":",
"retrieve",
"a",
"metric",
"resource",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L416-L432 | [
"def",
"metric_get",
"(",
"self",
",",
"project",
",",
"metric_name",
")",
":",
"target",
"=",
"\"/projects/%s/metrics/%s\"",
"%",
"(",
"project",
",",
"metric_name",
")",
"return",
"self",
".",
"api_request",
"(",
"method",
"=",
"\"GET\"",
",",
"path",
"=",... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _MetricsAPI.metric_delete | API call: delete a metric resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/delete
:type project: str
:param project: ID of the project containing the metric.
:type metric_name: str
:param metric_name: the name of the metric. | logging/google/cloud/logging/_http.py | def metric_delete(self, project, metric_name):
"""API call: delete a metric resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/delete
:type project: str
:param project: ID of the project containing the metric.
:type metric_name: ... | def metric_delete(self, project, metric_name):
"""API call: delete a metric resource.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/delete
:type project: str
:param project: ID of the project containing the metric.
:type metric_name: ... | [
"API",
"call",
":",
"delete",
"a",
"metric",
"resource",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L460-L473 | [
"def",
"metric_delete",
"(",
"self",
",",
"project",
",",
"metric_name",
")",
":",
"target",
"=",
"\"/projects/%s/metrics/%s\"",
"%",
"(",
"project",
",",
"metric_name",
")",
"self",
".",
"api_request",
"(",
"method",
"=",
"\"DELETE\"",
",",
"path",
"=",
"ta... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | RowSet.add_row_range_from_keys | 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... | bigtable/google/cloud/bigtable/row_set.py | 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
):
"""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]
... | [
"Add",
"row",
"range",
"to",
"row_ranges",
"list",
"from",
"the",
"row",
"keys"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L81-L110 | [
"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",
",",... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | RowSet._update_message_request | Add row keys and row range to given request message
:type message: class:`data_messages_v2_pb2.ReadRowsRequest`
:param message: The ``ReadRowsRequest`` protobuf | bigtable/google/cloud/bigtable/row_set.py | 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):
"""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... | [
"Add",
"row",
"keys",
"and",
"row",
"range",
"to",
"given",
"request",
"message"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L112-L123 | [
"def",
"_update_message_request",
"(",
"self",
",",
"message",
")",
":",
"for",
"each",
"in",
"self",
".",
"row_keys",
":",
"message",
".",
"rows",
".",
"row_keys",
".",
"append",
"(",
"_to_bytes",
"(",
"each",
")",
")",
"for",
"each",
"in",
"self",
".... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | RowRange._key | A tuple key that uniquely describes this field.
Used to compute this instance's hashcode and evaluate equality.
Returns:
Tuple[str]: The contents of this :class:`.RowRange`. | bigtable/google/cloud/bigtable/row_set.py | def _key(self):
"""A tuple key that uniquely describes this field.
Used to compute this instance's hashcode and evaluate equality.
Returns:
Tuple[str]: The contents of this :class:`.RowRange`.
"""
return (self.start_key, self.start_inclusive, self.end_key, self.end_... | def _key(self):
"""A tuple key that uniquely describes this field.
Used to compute this instance's hashcode and evaluate equality.
Returns:
Tuple[str]: The contents of this :class:`.RowRange`.
"""
return (self.start_key, self.start_inclusive, self.end_key, self.end_... | [
"A",
"tuple",
"key",
"that",
"uniquely",
"describes",
"this",
"field",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L155-L163 | [
"def",
"_key",
"(",
"self",
")",
":",
"return",
"(",
"self",
".",
"start_key",
",",
"self",
".",
"start_inclusive",
",",
"self",
".",
"end_key",
",",
"self",
".",
"end_inclusive",
")"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | RowRange.get_range_kwargs | Convert row range object to dict which can be passed to
google.bigtable.v2.RowRange add method. | bigtable/google/cloud/bigtable/row_set.py | 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):
""" 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... | [
"Convert",
"row",
"range",
"object",
"to",
"dict",
"which",
"can",
"be",
"passed",
"to",
"google",
".",
"bigtable",
".",
"v2",
".",
"RowRange",
"add",
"method",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L176-L192 | [
"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... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.report_errors_api | Helper for logging-related API calls.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs
:rtype:
:class:`_gapic._ErrorReportingGapicApi`
or
:class:`._logging... | error_reporting/google/cloud/error_reporting/client.py | def report_errors_api(self):
"""Helper for logging-related API calls.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs
:rtype:
:class:`_gapic._ErrorReportingGapicApi`
... | def report_errors_api(self):
"""Helper for logging-related API calls.
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs
:rtype:
:class:`_gapic._ErrorReportingGapicApi`
... | [
"Helper",
"for",
"logging",
"-",
"related",
"API",
"calls",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/client.py#L162-L182 | [
"def",
"report_errors_api",
"(",
"self",
")",
":",
"if",
"self",
".",
"_report_errors_api",
"is",
"None",
":",
"if",
"self",
".",
"_use_grpc",
":",
"self",
".",
"_report_errors_api",
"=",
"make_report_error_api",
"(",
"self",
")",
"else",
":",
"self",
".",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client._build_error_report | 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... | error_reporting/google/cloud/error_reporting/client.py | 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
):
"""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
... | [
"Builds",
"the",
"Error",
"Reporting",
"object",
"to",
"report",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/client.py#L184-L247 | [
"def",
"_build_error_report",
"(",
"self",
",",
"message",
",",
"report_location",
"=",
"None",
",",
"http_context",
"=",
"None",
",",
"user",
"=",
"None",
")",
":",
"payload",
"=",
"{",
"\"serviceContext\"",
":",
"{",
"\"service\"",
":",
"self",
".",
"ser... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client._send_error_report | 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 ... | error_reporting/google/cloud/error_reporting/client.py | 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
):
"""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... | [
"Makes",
"the",
"call",
"to",
"the",
"Error",
"Reporting",
"API",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/client.py#L249-L288 | [
"def",
"_send_error_report",
"(",
"self",
",",
"message",
",",
"report_location",
"=",
"None",
",",
"http_context",
"=",
"None",
",",
"user",
"=",
"None",
")",
":",
"error_report",
"=",
"self",
".",
"_build_error_report",
"(",
"message",
",",
"report_location"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.report | 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... | error_reporting/google/cloud/error_reporting/client.py | 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):
""" 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... | [
"Reports",
"a",
"message",
"to",
"Stackdriver",
"Error",
"Reporting"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/client.py#L290-L333 | [
"def",
"report",
"(",
"self",
",",
"message",
",",
"http_context",
"=",
"None",
",",
"user",
"=",
"None",
")",
":",
"stack",
"=",
"traceback",
".",
"extract_stack",
"(",
")",
"last_call",
"=",
"stack",
"[",
"-",
"2",
"]",
"file_path",
"=",
"last_call",... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Client.report_exception | 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:... | error_reporting/google/cloud/error_reporting/client.py | 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):
""" 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
... | [
"Reports",
"the",
"details",
"of",
"the",
"latest",
"exceptions",
"to",
"Stackdriver",
"Error",
"Reporting",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/client.py#L335-L361 | [
"def",
"report_exception",
"(",
"self",
",",
"http_context",
"=",
"None",
",",
"user",
"=",
"None",
")",
":",
"self",
".",
"_send_error_report",
"(",
"traceback",
".",
"format_exc",
"(",
")",
",",
"http_context",
"=",
"http_context",
",",
"user",
"=",
"use... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction.current | 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). | datastore/google/cloud/datastore/transaction.py | 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):
"""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",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/transaction.py#L181-L194 | [
"def",
"current",
"(",
"self",
")",
":",
"top",
"=",
"super",
"(",
"Transaction",
",",
"self",
")",
".",
"current",
"(",
")",
"if",
"isinstance",
"(",
"top",
",",
"Transaction",
")",
":",
"return",
"top"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction.begin | 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. | datastore/google/cloud/datastore/transaction.py | 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):
"""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... | [
"Begins",
"a",
"transaction",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/transaction.py#L196-L212 | [
"def",
"begin",
"(",
"self",
")",
":",
"super",
"(",
"Transaction",
",",
"self",
")",
".",
"begin",
"(",
")",
"try",
":",
"response_pb",
"=",
"self",
".",
"_client",
".",
"_datastore_api",
".",
"begin_transaction",
"(",
"self",
".",
"project",
")",
"se... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction.rollback | Rolls back the current transaction.
This method has necessary side-effects:
- Sets the current transaction's ID to None. | datastore/google/cloud/datastore/transaction.py | 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):
"""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,... | [
"Rolls",
"back",
"the",
"current",
"transaction",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/transaction.py#L214-L227 | [
"def",
"rollback",
"(",
"self",
")",
":",
"try",
":",
"# No need to use the response it contains nothing.",
"self",
".",
"_client",
".",
"_datastore_api",
".",
"rollback",
"(",
"self",
".",
"project",
",",
"self",
".",
"_id",
")",
"finally",
":",
"super",
"(",... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Transaction.put | 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... | datastore/google/cloud/datastore/transaction.py | 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):
"""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... | [
"Adds",
"an",
"entity",
"to",
"be",
"committed",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/datastore/google/cloud/datastore/transaction.py#L246-L262 | [
"def",
"put",
"(",
"self",
",",
"entity",
")",
":",
"if",
"self",
".",
"_options",
".",
"HasField",
"(",
"\"read_only\"",
")",
":",
"raise",
"RuntimeError",
"(",
"\"Transaction is read only\"",
")",
"else",
":",
"super",
"(",
"Transaction",
",",
"self",
")... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | SecurityCenterClient.list_findings | 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... | securitycenter/google/cloud/securitycenter_v1beta1/gapic/security_center_client.py | 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.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""... | [
"Lists",
"an",
"organization",
"or",
"source",
"s",
"findings",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1beta1/gapic/security_center_client.py#L1157-L1320 | [
"def",
"list_findings",
"(",
"self",
",",
"parent",
",",
"filter_",
"=",
"None",
",",
"order_by",
"=",
"None",
",",
"read_time",
"=",
"None",
",",
"field_mask",
"=",
"None",
",",
"page_size",
"=",
"None",
",",
"retry",
"=",
"google",
".",
"api_core",
"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Metric.from_api_repr | Factory: construct a metric given its API representation
:type resource: dict
:param resource: metric resource representation returned from the API
:type client: :class:`google.cloud.logging.client.Client`
:param client: Client which holds credentials and project
... | logging/google/cloud/logging/metric.py | def from_api_repr(cls, resource, client):
"""Factory: construct a metric given its API representation
:type resource: dict
:param resource: metric resource representation returned from the API
:type client: :class:`google.cloud.logging.client.Client`
:param client: Client whic... | def from_api_repr(cls, resource, client):
"""Factory: construct a metric given its API representation
:type resource: dict
:param resource: metric resource representation returned from the API
:type client: :class:`google.cloud.logging.client.Client`
:param client: Client whic... | [
"Factory",
":",
"construct",
"a",
"metric",
"given",
"its",
"API",
"representation"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/metric.py#L69-L85 | [
"def",
"from_api_repr",
"(",
"cls",
",",
"resource",
",",
"client",
")",
":",
"metric_name",
"=",
"resource",
"[",
"\"name\"",
"]",
"filter_",
"=",
"resource",
"[",
"\"filter\"",
"]",
"description",
"=",
"resource",
".",
"get",
"(",
"\"description\"",
",",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Metric.create | API call: create the metric via a PUT request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:param client: the client to use. If not passed, falls... | logging/google/cloud/logging/metric.py | def create(self, client=None):
"""API call: create the metric via a PUT request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:param client... | def create(self, client=None):
"""API call: create the metric via a PUT request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:param client... | [
"API",
"call",
":",
"create",
"the",
"metric",
"via",
"a",
"PUT",
"request"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/metric.py#L102-L116 | [
"def",
"create",
"(",
"self",
",",
"client",
"=",
"None",
")",
":",
"client",
"=",
"self",
".",
"_require_client",
"(",
"client",
")",
"client",
".",
"metrics_api",
".",
"metric_create",
"(",
"self",
".",
"project",
",",
"self",
".",
"name",
",",
"self... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Metric.exists | API call: test for the existence of the metric via a GET request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:param client: the client to use. If n... | logging/google/cloud/logging/metric.py | def exists(self, client=None):
"""API call: test for the existence of the metric via a GET request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
... | def exists(self, client=None):
"""API call: test for the existence of the metric via a GET request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
... | [
"API",
"call",
":",
"test",
"for",
"the",
"existence",
"of",
"the",
"metric",
"via",
"a",
"GET",
"request"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/metric.py#L118-L139 | [
"def",
"exists",
"(",
"self",
",",
"client",
"=",
"None",
")",
":",
"client",
"=",
"self",
".",
"_require_client",
"(",
"client",
")",
"try",
":",
"client",
".",
"metrics_api",
".",
"metric_get",
"(",
"self",
".",
"project",
",",
"self",
".",
"name",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Metric.reload | API call: sync local metric configuration via a GET request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:param client: the client to use. If not pa... | logging/google/cloud/logging/metric.py | def reload(self, client=None):
"""API call: sync local metric configuration via a GET request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:p... | def reload(self, client=None):
"""API call: sync local metric configuration via a GET request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:p... | [
"API",
"call",
":",
"sync",
"local",
"metric",
"configuration",
"via",
"a",
"GET",
"request"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/metric.py#L141-L155 | [
"def",
"reload",
"(",
"self",
",",
"client",
"=",
"None",
")",
":",
"client",
"=",
"self",
".",
"_require_client",
"(",
"client",
")",
"data",
"=",
"client",
".",
"metrics_api",
".",
"metric_get",
"(",
"self",
".",
"project",
",",
"self",
".",
"name",
... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Metric.update | API call: update metric configuration via a PUT request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/update
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:param client: the client to use. If not pas... | logging/google/cloud/logging/metric.py | def update(self, client=None):
"""API call: update metric configuration via a PUT request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/update
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:pa... | def update(self, client=None):
"""API call: update metric configuration via a PUT request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/update
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:pa... | [
"API",
"call",
":",
"update",
"metric",
"configuration",
"via",
"a",
"PUT",
"request"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/metric.py#L157-L171 | [
"def",
"update",
"(",
"self",
",",
"client",
"=",
"None",
")",
":",
"client",
"=",
"self",
".",
"_require_client",
"(",
"client",
")",
"client",
".",
"metrics_api",
".",
"metric_update",
"(",
"self",
".",
"project",
",",
"self",
".",
"name",
",",
"self... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Metric.delete | API call: delete a metric via a DELETE request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/delete
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:param client: the client to use. If not passed, fall... | logging/google/cloud/logging/metric.py | def delete(self, client=None):
"""API call: delete a metric via a DELETE request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/delete
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:param clien... | def delete(self, client=None):
"""API call: delete a metric via a DELETE request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/delete
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:param clien... | [
"API",
"call",
":",
"delete",
"a",
"metric",
"via",
"a",
"DELETE",
"request"
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/metric.py#L173-L185 | [
"def",
"delete",
"(",
"self",
",",
"client",
"=",
"None",
")",
":",
"client",
"=",
"self",
".",
"_require_client",
"(",
"client",
")",
"client",
".",
"metrics_api",
".",
"metric_delete",
"(",
"self",
".",
"project",
",",
"self",
".",
"name",
")"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _dict_mapping_to_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. | trace/google/cloud/trace/_gapic.py | 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):
"""
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... | [
"Convert",
"a",
"dict",
"to",
"protobuf",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/_gapic.py#L245-L258 | [
"def",
"_dict_mapping_to_pb",
"(",
"mapping",
",",
"proto_type",
")",
":",
"converted_pb",
"=",
"getattr",
"(",
"trace_pb2",
",",
"proto_type",
")",
"(",
")",
"ParseDict",
"(",
"mapping",
",",
"converted_pb",
")",
"return",
"converted_pb"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _span_attrs_to_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. | trace/google/cloud/trace/_gapic.py | 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):
"""
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... | [
"Convert",
"a",
"span",
"attribute",
"dict",
"to",
"protobuf",
"including",
"Links",
"Attributes",
"TimeEvents",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/_gapic.py#L261-L275 | [
"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"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _value_to_pb | Convert a value to protobuf. e.g. BoolValue, Int32Value.
Args:
value (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. | trace/google/cloud/trace/_gapic.py | def _value_to_pb(value, proto_type):
"""
Convert a value to protobuf. e.g. BoolValue, Int32Value.
Args:
value (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.
"""
data_type... | def _value_to_pb(value, proto_type):
"""
Convert a value to protobuf. e.g. BoolValue, Int32Value.
Args:
value (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.
"""
data_type... | [
"Convert",
"a",
"value",
"to",
"protobuf",
".",
"e",
".",
"g",
".",
"BoolValue",
"Int32Value",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/_gapic.py#L293-L306 | [
"def",
"_value_to_pb",
"(",
"value",
",",
"proto_type",
")",
":",
"data_type_pb",
"=",
"getattr",
"(",
"google_dot_protobuf_dot_wrappers__pb2",
",",
"proto_type",
")",
"(",
")",
"ParseDict",
"(",
"value",
",",
"data_type_pb",
")",
"return",
"data_type_pb"
] | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _TraceAPI.batch_write_spans | Sends new spans to Stackdriver Trace or updates existing traces. If the
name of a trace that you send matches that of an existing trace, new
spans are added to the existing trace. Attempt to update existing spans
results undefined behavior. If the name does not match, a new trace is
crea... | trace/google/cloud/trace/_gapic.py | def batch_write_spans(
self, name, spans, retry=method.DEFAULT, timeout=method.DEFAULT
):
"""
Sends new spans to Stackdriver Trace or updates existing traces. If the
name of a trace that you send matches that of an existing trace, new
spans are added to the existing trace. At... | def batch_write_spans(
self, name, spans, retry=method.DEFAULT, timeout=method.DEFAULT
):
"""
Sends new spans to Stackdriver Trace or updates existing traces. If the
name of a trace that you send matches that of an existing trace, new
spans are added to the existing trace. At... | [
"Sends",
"new",
"spans",
"to",
"Stackdriver",
"Trace",
"or",
"updates",
"existing",
"traces",
".",
"If",
"the",
"name",
"of",
"a",
"trace",
"that",
"you",
"send",
"matches",
"that",
"of",
"an",
"existing",
"trace",
"new",
"spans",
"are",
"added",
"to",
"... | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/_gapic.py#L51-L90 | [
"def",
"batch_write_spans",
"(",
"self",
",",
"name",
",",
"spans",
",",
"retry",
"=",
"method",
".",
"DEFAULT",
",",
"timeout",
"=",
"method",
".",
"DEFAULT",
")",
":",
"spans_pb_list",
"=",
"[",
"]",
"for",
"span_mapping",
"in",
"spans",
"[",
"\"spans\... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | _TraceAPI.create_span | Creates a new Span.
Example:
>>> from google.cloud import trace_v2
>>>
>>> client = trace_v2.TraceServiceClient()
>>>
>>> name = client.span_path('[PROJECT]', '[TRACE]', '[SPAN]')
>>> span_id = ''
>>> display_name = {}
... | trace/google/cloud/trace/_gapic.py | def create_span(
self,
name,
span_id,
display_name,
start_time,
end_time,
parent_span_id=None,
attributes=None,
stack_trace=None,
time_events=None,
links=None,
status=None,
same_process_as_parent_span=None,
c... | def create_span(
self,
name,
span_id,
display_name,
start_time,
end_time,
parent_span_id=None,
attributes=None,
stack_trace=None,
time_events=None,
links=None,
status=None,
same_process_as_parent_span=None,
c... | [
"Creates",
"a",
"new",
"Span",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/_gapic.py#L92-L242 | [
"def",
"create_span",
"(",
"self",
",",
"name",
",",
"span_id",
",",
"display_name",
",",
"start_time",
",",
"end_time",
",",
"parent_span_id",
"=",
"None",
",",
"attributes",
"=",
"None",
",",
"stack_trace",
"=",
"None",
",",
"time_events",
"=",
"None",
"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Cluster.from_pb | 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... | bigtable/google/cloud/bigtable/cluster.py | 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):
"""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... | [
"Creates",
"an",
"cluster",
"instance",
"from",
"a",
"protobuf",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L94-L137 | [
"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 ... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Cluster._update_from_pb | Refresh self from the server-provided protobuf.
Helper for :meth:`from_pb` and :meth:`reload`. | bigtable/google/cloud/bigtable/cluster.py | def _update_from_pb(self, cluster_pb):
"""Refresh self from the server-provided protobuf.
Helper for :meth:`from_pb` and :meth:`reload`.
"""
self.location_id = cluster_pb.location.split("/")[-1]
self.serve_nodes = cluster_pb.serve_nodes
self.default_storage_type = cluste... | def _update_from_pb(self, cluster_pb):
"""Refresh self from the server-provided protobuf.
Helper for :meth:`from_pb` and :meth:`reload`.
"""
self.location_id = cluster_pb.location.split("/")[-1]
self.serve_nodes = cluster_pb.serve_nodes
self.default_storage_type = cluste... | [
"Refresh",
"self",
"from",
"the",
"server",
"-",
"provided",
"protobuf",
".",
"Helper",
"for",
":",
"meth",
":",
"from_pb",
"and",
":",
"meth",
":",
"reload",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L139-L147 | [
"def",
"_update_from_pb",
"(",
"self",
",",
"cluster_pb",
")",
":",
"self",
".",
"location_id",
"=",
"cluster_pb",
".",
"location",
".",
"split",
"(",
"\"/\"",
")",
"[",
"-",
"1",
"]",
"self",
".",
"serve_nodes",
"=",
"cluster_pb",
".",
"serve_nodes",
"s... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
train | Cluster.name | 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... | bigtable/google/cloud/bigtable/cluster.py | 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):
"""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_... | [
"Cluster",
"name",
"used",
"in",
"requests",
"."
] | googleapis/google-cloud-python | python | https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/cluster.py#L150-L172 | [
"def",
"name",
"(",
"self",
")",
":",
"return",
"self",
".",
"_instance",
".",
"_client",
".",
"instance_admin_client",
".",
"cluster_path",
"(",
"self",
".",
"_instance",
".",
"_client",
".",
"project",
",",
"self",
".",
"_instance",
".",
"instance_id",
"... | 85e80125a59cb10f8cb105f25ecc099e4b940b50 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.