repo
stringclasses
85 values
path
stringlengths
8
121
func_name
stringlengths
1
82
original_string
stringlengths
112
65.5k
language
stringclasses
1 value
code
stringlengths
112
65.5k
code_tokens
listlengths
20
4.09k
docstring
stringlengths
3
46.3k
docstring_tokens
listlengths
1
564
sha
stringclasses
85 values
url
stringlengths
93
218
partition
stringclasses
1 value
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
set_field_value
def set_field_value(document_data, field_path, value): """Set a value into a document for a field_path""" current = document_data for element in field_path.parts[:-1]: current = current.setdefault(element, {}) if value is _EmptyDict: value = {} current[field_path.parts[-1]] = value
python
def set_field_value(document_data, field_path, value): """Set a value into a document for a field_path""" current = document_data for element in field_path.parts[:-1]: current = current.setdefault(element, {}) if value is _EmptyDict: value = {} current[field_path.parts[-1]] = value
[ "def", "set_field_value", "(", "document_data", ",", "field_path", ",", "value", ")", ":", "current", "=", "document_data", "for", "element", "in", "field_path", ".", "parts", "[", ":", "-", "1", "]", ":", "current", "=", "current", ".", "setdefault", "(",...
Set a value into a document for a field_path
[ "Set", "a", "value", "into", "a", "document", "for", "a", "field_path" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L369-L376
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
pbs_for_create
def pbs_for_create(document_path, document_data): """Make ``Write`` protobufs for ``create()`` methods. Args: document_path (str): A fully-qualified document path. document_data (dict): Property names and values to use for creating a document. Returns: List[google.cloud...
python
def pbs_for_create(document_path, document_data): """Make ``Write`` protobufs for ``create()`` methods. Args: document_path (str): A fully-qualified document path. document_data (dict): Property names and values to use for creating a document. Returns: List[google.cloud...
[ "def", "pbs_for_create", "(", "document_path", ",", "document_data", ")", ":", "extractor", "=", "DocumentExtractor", "(", "document_data", ")", "if", "extractor", ".", "deleted_fields", ":", "raise", "ValueError", "(", "\"Cannot apply DELETE_FIELD in a create request.\""...
Make ``Write`` protobufs for ``create()`` methods. Args: document_path (str): A fully-qualified document path. document_data (dict): Property names and values to use for creating a document. Returns: List[google.cloud.firestore_v1beta1.types.Write]: One or two ``Wri...
[ "Make", "Write", "protobufs", "for", "create", "()", "methods", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L520-L549
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
pbs_for_set_no_merge
def pbs_for_set_no_merge(document_path, document_data): """Make ``Write`` protobufs for ``set()`` methods. Args: document_path (str): A fully-qualified document path. document_data (dict): Property names and values to use for replacing a document. Returns: List[google.c...
python
def pbs_for_set_no_merge(document_path, document_data): """Make ``Write`` protobufs for ``set()`` methods. Args: document_path (str): A fully-qualified document path. document_data (dict): Property names and values to use for replacing a document. Returns: List[google.c...
[ "def", "pbs_for_set_no_merge", "(", "document_path", ",", "document_data", ")", ":", "extractor", "=", "DocumentExtractor", "(", "document_data", ")", "if", "extractor", ".", "deleted_fields", ":", "raise", "ValueError", "(", "\"Cannot apply DELETE_FIELD in a set request ...
Make ``Write`` protobufs for ``set()`` methods. Args: document_path (str): A fully-qualified document path. document_data (dict): Property names and values to use for replacing a document. Returns: List[google.cloud.firestore_v1beta1.types.Write]: One or two ``Write...
[ "Make", "Write", "protobufs", "for", "set", "()", "methods", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L552-L580
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
pbs_for_set_with_merge
def pbs_for_set_with_merge(document_path, document_data, merge): """Make ``Write`` protobufs for ``set()`` methods. Args: document_path (str): A fully-qualified document path. document_data (dict): Property names and values to use for replacing a document. merge (Optional[bo...
python
def pbs_for_set_with_merge(document_path, document_data, merge): """Make ``Write`` protobufs for ``set()`` methods. Args: document_path (str): A fully-qualified document path. document_data (dict): Property names and values to use for replacing a document. merge (Optional[bo...
[ "def", "pbs_for_set_with_merge", "(", "document_path", ",", "document_data", ",", "merge", ")", ":", "extractor", "=", "DocumentExtractorForMerge", "(", "document_data", ")", "extractor", ".", "apply_merge", "(", "merge", ")", "merge_empty", "=", "not", "document_da...
Make ``Write`` protobufs for ``set()`` methods. Args: document_path (str): A fully-qualified document path. document_data (dict): Property names and values to use for replacing a document. merge (Optional[bool] or Optional[List<apispec>]): If True, merge all fields; ...
[ "Make", "Write", "protobufs", "for", "set", "()", "methods", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L722-L752
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
pbs_for_update
def pbs_for_update(document_path, field_updates, option): """Make ``Write`` protobufs for ``update()`` methods. Args: document_path (str): A fully-qualified document path. field_updates (dict): Field names or paths to update and values to update with. option (optional[~.fire...
python
def pbs_for_update(document_path, field_updates, option): """Make ``Write`` protobufs for ``update()`` methods. Args: document_path (str): A fully-qualified document path. field_updates (dict): Field names or paths to update and values to update with. option (optional[~.fire...
[ "def", "pbs_for_update", "(", "document_path", ",", "field_updates", ",", "option", ")", ":", "extractor", "=", "DocumentExtractorForUpdate", "(", "field_updates", ")", "if", "extractor", ".", "empty_document", ":", "raise", "ValueError", "(", "\"Cannot update with an...
Make ``Write`` protobufs for ``update()`` methods. Args: document_path (str): A fully-qualified document path. field_updates (dict): Field names or paths to update and values to update with. option (optional[~.firestore_v1beta1.client.WriteOption]): A write option to ...
[ "Make", "Write", "protobufs", "for", "update", "()", "methods", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L796-L834
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
pb_for_delete
def pb_for_delete(document_path, option): """Make a ``Write`` protobuf for ``delete()`` methods. Args: document_path (str): A fully-qualified document path. option (optional[~.firestore_v1beta1.client.WriteOption]): A write option to make assertions / preconditions on the server ...
python
def pb_for_delete(document_path, option): """Make a ``Write`` protobuf for ``delete()`` methods. Args: document_path (str): A fully-qualified document path. option (optional[~.firestore_v1beta1.client.WriteOption]): A write option to make assertions / preconditions on the server ...
[ "def", "pb_for_delete", "(", "document_path", ",", "option", ")", ":", "write_pb", "=", "write_pb2", ".", "Write", "(", "delete", "=", "document_path", ")", "if", "option", "is", "not", "None", ":", "option", ".", "modify_write", "(", "write_pb", ")", "ret...
Make a ``Write`` protobuf for ``delete()`` methods. Args: document_path (str): A fully-qualified document path. option (optional[~.firestore_v1beta1.client.WriteOption]): A write option to make assertions / preconditions on the server state of the document before applying chan...
[ "Make", "a", "Write", "protobuf", "for", "delete", "()", "methods", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L837-L854
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
get_transaction_id
def get_transaction_id(transaction, read_operation=True): """Get the transaction ID from a ``Transaction`` object. Args: transaction (Optional[~.firestore_v1beta1.transaction.\ Transaction]): An existing transaction that this query will run in. read_operation (Optional[b...
python
def get_transaction_id(transaction, read_operation=True): """Get the transaction ID from a ``Transaction`` object. Args: transaction (Optional[~.firestore_v1beta1.transaction.\ Transaction]): An existing transaction that this query will run in. read_operation (Optional[b...
[ "def", "get_transaction_id", "(", "transaction", ",", "read_operation", "=", "True", ")", ":", "if", "transaction", "is", "None", ":", "return", "None", "else", ":", "if", "not", "transaction", ".", "in_progress", ":", "raise", "ValueError", "(", "INACTIVE_TXN...
Get the transaction ID from a ``Transaction`` object. Args: transaction (Optional[~.firestore_v1beta1.transaction.\ Transaction]): An existing transaction that this query will run in. read_operation (Optional[bool]): Indicates if the transaction ID will be used i...
[ "Get", "the", "transaction", "ID", "from", "a", "Transaction", "object", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L864-L891
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
LastUpdateOption.modify_write
def modify_write(self, write_pb, **unused_kwargs): """Modify a ``Write`` protobuf based on the state of this write option. The ``last_update_time`` is added to ``write_pb`` as an "update time" precondition. When set, the target document must exist and have been last updated at that time...
python
def modify_write(self, write_pb, **unused_kwargs): """Modify a ``Write`` protobuf based on the state of this write option. The ``last_update_time`` is added to ``write_pb`` as an "update time" precondition. When set, the target document must exist and have been last updated at that time...
[ "def", "modify_write", "(", "self", ",", "write_pb", ",", "*", "*", "unused_kwargs", ")", ":", "current_doc", "=", "types", ".", "Precondition", "(", "update_time", "=", "self", ".", "_last_update_time", ")", "write_pb", ".", "current_document", ".", "CopyFrom...
Modify a ``Write`` protobuf based on the state of this write option. The ``last_update_time`` is added to ``write_pb`` as an "update time" precondition. When set, the target document must exist and have been last updated at that time. Args: write_pb (google.cloud.firestore_...
[ "Modify", "a", "Write", "protobuf", "based", "on", "the", "state", "of", "this", "write", "option", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L949-L964
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/_helpers.py
ExistsOption.modify_write
def modify_write(self, write_pb, **unused_kwargs): """Modify a ``Write`` protobuf based on the state of this write option. If: * ``exists=True``, adds a precondition that requires existence * ``exists=False``, adds a precondition that requires non-existence Args: w...
python
def modify_write(self, write_pb, **unused_kwargs): """Modify a ``Write`` protobuf based on the state of this write option. If: * ``exists=True``, adds a precondition that requires existence * ``exists=False``, adds a precondition that requires non-existence Args: w...
[ "def", "modify_write", "(", "self", ",", "write_pb", ",", "*", "*", "unused_kwargs", ")", ":", "current_doc", "=", "types", ".", "Precondition", "(", "exists", "=", "self", ".", "_exists", ")", "write_pb", ".", "current_document", ".", "CopyFrom", "(", "cu...
Modify a ``Write`` protobuf based on the state of this write option. If: * ``exists=True``, adds a precondition that requires existence * ``exists=False``, adds a precondition that requires non-existence Args: write_pb (google.cloud.firestore_v1beta1.types.Write): A ...
[ "Modify", "a", "Write", "protobuf", "based", "on", "the", "state", "of", "this", "write", "option", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/_helpers.py#L986-L1002
train
googleapis/google-cloud-python
monitoring/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py
UptimeCheckServiceClient.uptime_check_config_path
def uptime_check_config_path(cls, project, uptime_check_config): """Return a fully-qualified uptime_check_config string.""" return google.api_core.path_template.expand( "projects/{project}/uptimeCheckConfigs/{uptime_check_config}", project=project, uptime_check_config...
python
def uptime_check_config_path(cls, project, uptime_check_config): """Return a fully-qualified uptime_check_config string.""" return google.api_core.path_template.expand( "projects/{project}/uptimeCheckConfigs/{uptime_check_config}", project=project, uptime_check_config...
[ "def", "uptime_check_config_path", "(", "cls", ",", "project", ",", "uptime_check_config", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/uptimeCheckConfigs/{uptime_check_config}\"", ",", "project", "=", "p...
Return a fully-qualified uptime_check_config string.
[ "Return", "a", "fully", "-", "qualified", "uptime_check_config", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/monitoring/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py#L110-L116
train
googleapis/google-cloud-python
monitoring/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py
UptimeCheckServiceClient.create_uptime_check_config
def create_uptime_check_config( self, parent, uptime_check_config, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a new uptime check configuration. Example: ...
python
def create_uptime_check_config( self, parent, uptime_check_config, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a new uptime check configuration. Example: ...
[ "def", "create_uptime_check_config", "(", "self", ",", "parent", ",", "uptime_check_config", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "...
Creates a new uptime check configuration. Example: >>> from google.cloud import monitoring_v3 >>> >>> client = monitoring_v3.UptimeCheckServiceClient() >>> >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initializ...
[ "Creates", "a", "new", "uptime", "check", "configuration", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/monitoring/google/cloud/monitoring_v3/gapic/uptime_check_service_client.py#L398-L479
train
googleapis/google-cloud-python
videointelligence/google/cloud/videointelligence_v1beta2/gapic/video_intelligence_service_client.py
VideoIntelligenceServiceClient.annotate_video
def annotate_video( self, input_uri=None, input_content=None, features=None, video_context=None, output_uri=None, location_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=Non...
python
def annotate_video( self, input_uri=None, input_content=None, features=None, video_context=None, output_uri=None, location_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=Non...
[ "def", "annotate_video", "(", "self", ",", "input_uri", "=", "None", ",", "input_content", "=", "None", ",", "features", "=", "None", ",", "video_context", "=", "None", ",", "output_uri", "=", "None", ",", "location_id", "=", "None", ",", "retry", "=", "...
Performs asynchronous video annotation. Progress and results can be retrieved through the ``google.longrunning.Operations`` interface. ``Operation.metadata`` contains ``AnnotateVideoProgress`` (progress). ``Operation.response`` contains ``AnnotateVideoResponse`` (results). Example: ...
[ "Performs", "asynchronous", "video", "annotation", ".", "Progress", "and", "results", "can", "be", "retrieved", "through", "the", "google", ".", "longrunning", ".", "Operations", "interface", ".", "Operation", ".", "metadata", "contains", "AnnotateVideoProgress", "(...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/videointelligence/google/cloud/videointelligence_v1beta2/gapic/video_intelligence_service_client.py#L175-L289
train
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.owners
def owners(self): """Legacy access to owner role. DEPRECATED: use ``policy["roles/owners"]`` instead.""" result = set() for role in self._OWNER_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
python
def owners(self): """Legacy access to owner role. DEPRECATED: use ``policy["roles/owners"]`` instead.""" result = set() for role in self._OWNER_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
[ "def", "owners", "(", "self", ")", ":", "result", "=", "set", "(", ")", "for", "role", "in", "self", ".", "_OWNER_ROLES", ":", "for", "member", "in", "self", ".", "_bindings", ".", "get", "(", "role", ",", "(", ")", ")", ":", "result", ".", "add"...
Legacy access to owner role. DEPRECATED: use ``policy["roles/owners"]`` instead.
[ "Legacy", "access", "to", "owner", "role", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L99-L107
train
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.owners
def owners(self, value): """Update owners. DEPRECATED: use ``policy["roles/owners"] = value`` instead.""" warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("owners", OWNER_ROLE), DeprecationWarning ) self[OWNER_ROLE] = value
python
def owners(self, value): """Update owners. DEPRECATED: use ``policy["roles/owners"] = value`` instead.""" warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("owners", OWNER_ROLE), DeprecationWarning ) self[OWNER_ROLE] = value
[ "def", "owners", "(", "self", ",", "value", ")", ":", "warnings", ".", "warn", "(", "_ASSIGNMENT_DEPRECATED_MSG", ".", "format", "(", "\"owners\"", ",", "OWNER_ROLE", ")", ",", "DeprecationWarning", ")", "self", "[", "OWNER_ROLE", "]", "=", "value" ]
Update owners. DEPRECATED: use ``policy["roles/owners"] = value`` instead.
[ "Update", "owners", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L110-L117
train
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.editors
def editors(self): """Legacy access to editor role. DEPRECATED: use ``policy["roles/editors"]`` instead.""" result = set() for role in self._EDITOR_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
python
def editors(self): """Legacy access to editor role. DEPRECATED: use ``policy["roles/editors"]`` instead.""" result = set() for role in self._EDITOR_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
[ "def", "editors", "(", "self", ")", ":", "result", "=", "set", "(", ")", "for", "role", "in", "self", ".", "_EDITOR_ROLES", ":", "for", "member", "in", "self", ".", "_bindings", ".", "get", "(", "role", ",", "(", ")", ")", ":", "result", ".", "ad...
Legacy access to editor role. DEPRECATED: use ``policy["roles/editors"]`` instead.
[ "Legacy", "access", "to", "editor", "role", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L120-L128
train
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.editors
def editors(self, value): """Update editors. DEPRECATED: use ``policy["roles/editors"] = value`` instead.""" warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("editors", EDITOR_ROLE), DeprecationWarning, ) self[EDITOR_ROLE] = value
python
def editors(self, value): """Update editors. DEPRECATED: use ``policy["roles/editors"] = value`` instead.""" warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("editors", EDITOR_ROLE), DeprecationWarning, ) self[EDITOR_ROLE] = value
[ "def", "editors", "(", "self", ",", "value", ")", ":", "warnings", ".", "warn", "(", "_ASSIGNMENT_DEPRECATED_MSG", ".", "format", "(", "\"editors\"", ",", "EDITOR_ROLE", ")", ",", "DeprecationWarning", ",", ")", "self", "[", "EDITOR_ROLE", "]", "=", "value" ...
Update editors. DEPRECATED: use ``policy["roles/editors"] = value`` instead.
[ "Update", "editors", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L131-L139
train
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.viewers
def viewers(self): """Legacy access to viewer role. DEPRECATED: use ``policy["roles/viewers"]`` instead """ result = set() for role in self._VIEWER_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
python
def viewers(self): """Legacy access to viewer role. DEPRECATED: use ``policy["roles/viewers"]`` instead """ result = set() for role in self._VIEWER_ROLES: for member in self._bindings.get(role, ()): result.add(member) return frozenset(result)
[ "def", "viewers", "(", "self", ")", ":", "result", "=", "set", "(", ")", "for", "role", "in", "self", ".", "_VIEWER_ROLES", ":", "for", "member", "in", "self", ".", "_bindings", ".", "get", "(", "role", ",", "(", ")", ")", ":", "result", ".", "ad...
Legacy access to viewer role. DEPRECATED: use ``policy["roles/viewers"]`` instead
[ "Legacy", "access", "to", "viewer", "role", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L142-L151
train
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.viewers
def viewers(self, value): """Update viewers. DEPRECATED: use ``policy["roles/viewers"] = value`` instead. """ warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("viewers", VIEWER_ROLE), DeprecationWarning, ) self[VIEWER_ROLE] = value
python
def viewers(self, value): """Update viewers. DEPRECATED: use ``policy["roles/viewers"] = value`` instead. """ warnings.warn( _ASSIGNMENT_DEPRECATED_MSG.format("viewers", VIEWER_ROLE), DeprecationWarning, ) self[VIEWER_ROLE] = value
[ "def", "viewers", "(", "self", ",", "value", ")", ":", "warnings", ".", "warn", "(", "_ASSIGNMENT_DEPRECATED_MSG", ".", "format", "(", "\"viewers\"", ",", "VIEWER_ROLE", ")", ",", "DeprecationWarning", ",", ")", "self", "[", "VIEWER_ROLE", "]", "=", "value" ...
Update viewers. DEPRECATED: use ``policy["roles/viewers"] = value`` instead.
[ "Update", "viewers", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L154-L163
train
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.from_api_repr
def from_api_repr(cls, resource): """Factory: create a policy from a JSON resource. Args: resource (dict): policy resource returned by ``getIamPolicy`` API. Returns: :class:`Policy`: the parsed policy """ version = resource.get("version") etag = ...
python
def from_api_repr(cls, resource): """Factory: create a policy from a JSON resource. Args: resource (dict): policy resource returned by ``getIamPolicy`` API. Returns: :class:`Policy`: the parsed policy """ version = resource.get("version") etag = ...
[ "def", "from_api_repr", "(", "cls", ",", "resource", ")", ":", "version", "=", "resource", ".", "get", "(", "\"version\"", ")", "etag", "=", "resource", ".", "get", "(", "\"etag\"", ")", "policy", "=", "cls", "(", "etag", ",", "version", ")", "for", ...
Factory: create a policy from a JSON resource. Args: resource (dict): policy resource returned by ``getIamPolicy`` API. Returns: :class:`Policy`: the parsed policy
[ "Factory", ":", "create", "a", "policy", "from", "a", "JSON", "resource", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L232-L248
train
googleapis/google-cloud-python
api_core/google/api_core/iam.py
Policy.to_api_repr
def to_api_repr(self): """Render a JSON policy resource. Returns: dict: a resource to be passed to the ``setIamPolicy`` API. """ resource = {} if self.etag is not None: resource["etag"] = self.etag if self.version is not None: resour...
python
def to_api_repr(self): """Render a JSON policy resource. Returns: dict: a resource to be passed to the ``setIamPolicy`` API. """ resource = {} if self.etag is not None: resource["etag"] = self.etag if self.version is not None: resour...
[ "def", "to_api_repr", "(", "self", ")", ":", "resource", "=", "{", "}", "if", "self", ".", "etag", "is", "not", "None", ":", "resource", "[", "\"etag\"", "]", "=", "self", ".", "etag", "if", "self", ".", "version", "is", "not", "None", ":", "resour...
Render a JSON policy resource. Returns: dict: a resource to be passed to the ``setIamPolicy`` API.
[ "Render", "a", "JSON", "policy", "resource", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/iam.py#L250-L273
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
_reference_info
def _reference_info(references): """Get information about document references. Helper for :meth:`~.firestore_v1beta1.client.Client.get_all`. Args: references (List[.DocumentReference, ...]): Iterable of document references. Returns: Tuple[List[str, ...], Dict[str, .Documen...
python
def _reference_info(references): """Get information about document references. Helper for :meth:`~.firestore_v1beta1.client.Client.get_all`. Args: references (List[.DocumentReference, ...]): Iterable of document references. Returns: Tuple[List[str, ...], Dict[str, .Documen...
[ "def", "_reference_info", "(", "references", ")", ":", "document_paths", "=", "[", "]", "reference_map", "=", "{", "}", "for", "reference", "in", "references", ":", "doc_path", "=", "reference", ".", "_document_path", "document_paths", ".", "append", "(", "doc...
Get information about document references. Helper for :meth:`~.firestore_v1beta1.client.Client.get_all`. Args: references (List[.DocumentReference, ...]): Iterable of document references. Returns: Tuple[List[str, ...], Dict[str, .DocumentReference]]: A two-tuple of * ...
[ "Get", "information", "about", "document", "references", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L385-L409
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
_get_reference
def _get_reference(document_path, reference_map): """Get a document reference from a dictionary. This just wraps a simple dictionary look-up with a helpful error that is specific to :meth:`~.firestore.client.Client.get_all`, the **public** caller of this function. Args: document_path (str)...
python
def _get_reference(document_path, reference_map): """Get a document reference from a dictionary. This just wraps a simple dictionary look-up with a helpful error that is specific to :meth:`~.firestore.client.Client.get_all`, the **public** caller of this function. Args: document_path (str)...
[ "def", "_get_reference", "(", "document_path", ",", "reference_map", ")", ":", "try", ":", "return", "reference_map", "[", "document_path", "]", "except", "KeyError", ":", "msg", "=", "_BAD_DOC_TEMPLATE", ".", "format", "(", "document_path", ")", "raise", "Value...
Get a document reference from a dictionary. This just wraps a simple dictionary look-up with a helpful error that is specific to :meth:`~.firestore.client.Client.get_all`, the **public** caller of this function. Args: document_path (str): A fully-qualified document path. reference_map ...
[ "Get", "a", "document", "reference", "from", "a", "dictionary", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L412-L435
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
_parse_batch_get
def _parse_batch_get(get_doc_response, reference_map, client): """Parse a `BatchGetDocumentsResponse` protobuf. Args: get_doc_response (~google.cloud.proto.firestore.v1beta1.\ firestore_pb2.BatchGetDocumentsResponse): A single response (from a stream) containing the "get" respon...
python
def _parse_batch_get(get_doc_response, reference_map, client): """Parse a `BatchGetDocumentsResponse` protobuf. Args: get_doc_response (~google.cloud.proto.firestore.v1beta1.\ firestore_pb2.BatchGetDocumentsResponse): A single response (from a stream) containing the "get" respon...
[ "def", "_parse_batch_get", "(", "get_doc_response", ",", "reference_map", ",", "client", ")", ":", "result_type", "=", "get_doc_response", ".", "WhichOneof", "(", "\"result\"", ")", "if", "result_type", "==", "\"found\"", ":", "reference", "=", "_get_reference", "...
Parse a `BatchGetDocumentsResponse` protobuf. Args: get_doc_response (~google.cloud.proto.firestore.v1beta1.\ firestore_pb2.BatchGetDocumentsResponse): A single response (from a stream) containing the "get" response for a document. reference_map (Dict[str, .DocumentReference...
[ "Parse", "a", "BatchGetDocumentsResponse", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L438-L484
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client._firestore_api
def _firestore_api(self): """Lazy-loading getter GAPIC Firestore API. Returns: ~.gapic.firestore.v1beta1.firestore_client.FirestoreClient: The GAPIC client with the credentials of the current client. """ if self._firestore_api_internal is None: self._...
python
def _firestore_api(self): """Lazy-loading getter GAPIC Firestore API. Returns: ~.gapic.firestore.v1beta1.firestore_client.FirestoreClient: The GAPIC client with the credentials of the current client. """ if self._firestore_api_internal is None: self._...
[ "def", "_firestore_api", "(", "self", ")", ":", "if", "self", ".", "_firestore_api_internal", "is", "None", ":", "self", ".", "_firestore_api_internal", "=", "firestore_client", ".", "FirestoreClient", "(", "credentials", "=", "self", ".", "_credentials", ")", "...
Lazy-loading getter GAPIC Firestore API. Returns: ~.gapic.firestore.v1beta1.firestore_client.FirestoreClient: The GAPIC client with the credentials of the current client.
[ "Lazy", "-", "loading", "getter", "GAPIC", "Firestore", "API", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L91-L103
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client._database_string
def _database_string(self): """The database string corresponding to this client's project. This value is lazy-loaded and cached. Will be of the form ``projects/{project_id}/databases/{database_id}`` but ``database_id == '(default)'`` for the time being. Returns: ...
python
def _database_string(self): """The database string corresponding to this client's project. This value is lazy-loaded and cached. Will be of the form ``projects/{project_id}/databases/{database_id}`` but ``database_id == '(default)'`` for the time being. Returns: ...
[ "def", "_database_string", "(", "self", ")", ":", "if", "self", ".", "_database_string_internal", "is", "None", ":", "# NOTE: database_root_path() is a classmethod, so we don't use", "# self._firestore_api (it isn't necessary).", "db_str", "=", "firestore_client", ".", "F...
The database string corresponding to this client's project. This value is lazy-loaded and cached. Will be of the form ``projects/{project_id}/databases/{database_id}`` but ``database_id == '(default)'`` for the time being. Returns: str: The fully-qualified da...
[ "The", "database", "string", "corresponding", "to", "this", "client", "s", "project", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L106-L129
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client._rpc_metadata
def _rpc_metadata(self): """The RPC metadata for this client's associated database. Returns: Sequence[Tuple(str, str)]: RPC metadata with resource prefix for the database associated with this client. """ if self._rpc_metadata_internal is None: self._r...
python
def _rpc_metadata(self): """The RPC metadata for this client's associated database. Returns: Sequence[Tuple(str, str)]: RPC metadata with resource prefix for the database associated with this client. """ if self._rpc_metadata_internal is None: self._r...
[ "def", "_rpc_metadata", "(", "self", ")", ":", "if", "self", ".", "_rpc_metadata_internal", "is", "None", ":", "self", ".", "_rpc_metadata_internal", "=", "_helpers", ".", "metadata_with_prefix", "(", "self", ".", "_database_string", ")", "return", "self", ".", ...
The RPC metadata for this client's associated database. Returns: Sequence[Tuple(str, str)]: RPC metadata with resource prefix for the database associated with this client.
[ "The", "RPC", "metadata", "for", "this", "client", "s", "associated", "database", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L132-L144
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client.collection
def collection(self, *collection_path): """Get a reference to a collection. For a top-level collection: .. code-block:: python >>> client.collection('top') For a sub-collection: .. code-block:: python >>> client.collection('mydocs/doc/subcol') ...
python
def collection(self, *collection_path): """Get a reference to a collection. For a top-level collection: .. code-block:: python >>> client.collection('top') For a sub-collection: .. code-block:: python >>> client.collection('mydocs/doc/subcol') ...
[ "def", "collection", "(", "self", ",", "*", "collection_path", ")", ":", "if", "len", "(", "collection_path", ")", "==", "1", ":", "path", "=", "collection_path", "[", "0", "]", ".", "split", "(", "_helpers", ".", "DOCUMENT_PATH_DELIMITER", ")", "else", ...
Get a reference to a collection. For a top-level collection: .. code-block:: python >>> client.collection('top') For a sub-collection: .. code-block:: python >>> client.collection('mydocs/doc/subcol') >>> # is the same as >>> client.c...
[ "Get", "a", "reference", "to", "a", "collection", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L146-L180
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client.document
def document(self, *document_path): """Get a reference to a document in a collection. For a top-level document: .. code-block:: python >>> client.document('collek/shun') >>> # is the same as >>> client.document('collek', 'shun') For a document in a...
python
def document(self, *document_path): """Get a reference to a document in a collection. For a top-level document: .. code-block:: python >>> client.document('collek/shun') >>> # is the same as >>> client.document('collek', 'shun') For a document in a...
[ "def", "document", "(", "self", ",", "*", "document_path", ")", ":", "if", "len", "(", "document_path", ")", "==", "1", ":", "path", "=", "document_path", "[", "0", "]", ".", "split", "(", "_helpers", ".", "DOCUMENT_PATH_DELIMITER", ")", "else", ":", "...
Get a reference to a document in a collection. For a top-level document: .. code-block:: python >>> client.document('collek/shun') >>> # is the same as >>> client.document('collek', 'shun') For a document in a sub-collection: .. code-block:: pytho...
[ "Get", "a", "reference", "to", "a", "document", "in", "a", "collection", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L182-L218
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client.write_option
def write_option(**kwargs): """Create a write option for write operations. Write operations include :meth:`~.DocumentReference.set`, :meth:`~.DocumentReference.update` and :meth:`~.DocumentReference.delete`. One of the following keyword arguments must be provided: * ``...
python
def write_option(**kwargs): """Create a write option for write operations. Write operations include :meth:`~.DocumentReference.set`, :meth:`~.DocumentReference.update` and :meth:`~.DocumentReference.delete`. One of the following keyword arguments must be provided: * ``...
[ "def", "write_option", "(", "*", "*", "kwargs", ")", ":", "if", "len", "(", "kwargs", ")", "!=", "1", ":", "raise", "TypeError", "(", "_BAD_OPTION_ERR", ")", "name", ",", "value", "=", "kwargs", ".", "popitem", "(", ")", "if", "name", "==", "\"last_u...
Create a write option for write operations. Write operations include :meth:`~.DocumentReference.set`, :meth:`~.DocumentReference.update` and :meth:`~.DocumentReference.delete`. One of the following keyword arguments must be provided: * ``last_update_time`` (:class:`google.prot...
[ "Create", "a", "write", "option", "for", "write", "operations", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L250-L292
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client.get_all
def get_all(self, references, field_paths=None, transaction=None): """Retrieve a batch of documents. .. note:: Documents returned by this method are not guaranteed to be returned in the same order that they are given in ``references``. .. note:: If multiple `...
python
def get_all(self, references, field_paths=None, transaction=None): """Retrieve a batch of documents. .. note:: Documents returned by this method are not guaranteed to be returned in the same order that they are given in ``references``. .. note:: If multiple `...
[ "def", "get_all", "(", "self", ",", "references", ",", "field_paths", "=", "None", ",", "transaction", "=", "None", ")", ":", "document_paths", ",", "reference_map", "=", "_reference_info", "(", "references", ")", "mask", "=", "_get_doc_mask", "(", "field_path...
Retrieve a batch of documents. .. note:: Documents returned by this method are not guaranteed to be returned in the same order that they are given in ``references``. .. note:: If multiple ``references`` refer to the same document, the server will only retu...
[ "Retrieve", "a", "batch", "of", "documents", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L294-L340
train
googleapis/google-cloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Client.collections
def collections(self): """List top-level collections of the client's database. Returns: Sequence[~.firestore_v1beta1.collection.CollectionReference]: iterator of subcollections of the current document. """ iterator = self._firestore_api.list_collection_ids( ...
python
def collections(self): """List top-level collections of the client's database. Returns: Sequence[~.firestore_v1beta1.collection.CollectionReference]: iterator of subcollections of the current document. """ iterator = self._firestore_api.list_collection_ids( ...
[ "def", "collections", "(", "self", ")", ":", "iterator", "=", "self", ".", "_firestore_api", ".", "list_collection_ids", "(", "self", ".", "_database_string", ",", "metadata", "=", "self", ".", "_rpc_metadata", ")", "iterator", ".", "client", "=", "self", "i...
List top-level collections of the client's database. Returns: Sequence[~.firestore_v1beta1.collection.CollectionReference]: iterator of subcollections of the current document.
[ "List", "top", "-", "level", "collections", "of", "the", "client", "s", "database", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/firestore/google/cloud/firestore_v1beta1/client.py#L342-L354
train
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction._check_state
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...
python
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", ")", ":", "if", "self", ".", "_transaction_id", "is", "None", ":", "raise", "ValueError", "(", "\"Transaction is not begun\"", ")", "if", "self", ".", "committed", "is", "not", "None", ":", "raise", "ValueError", "(", "\"T...
Helper for :meth:`commit` et al. :raises: :exc:`ValueError` if the object's state is invalid for making API requests.
[ "Helper", "for", ":", "meth", ":", "commit", "et", "al", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L49-L62
train
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction.begin
def begin(self): """Begin a transaction on the database. :rtype: bytes :returns: the ID for the newly-begun transaction. :raises ValueError: if the transaction is already begun, committed, or rolled back. """ if self._transaction_id is not None: r...
python
def begin(self): """Begin a transaction on the database. :rtype: bytes :returns: the ID for the newly-begun transaction. :raises ValueError: if the transaction is already begun, committed, or rolled back. """ if self._transaction_id is not None: r...
[ "def", "begin", "(", "self", ")", ":", "if", "self", ".", "_transaction_id", "is", "not", "None", ":", "raise", "ValueError", "(", "\"Transaction already begun\"", ")", "if", "self", ".", "committed", "is", "not", "None", ":", "raise", "ValueError", "(", "...
Begin a transaction on the database. :rtype: bytes :returns: the ID for the newly-begun transaction. :raises ValueError: if the transaction is already begun, committed, or rolled back.
[ "Begin", "a", "transaction", "on", "the", "database", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L74-L99
train
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction.rollback
def rollback(self): """Roll back a transaction on the database.""" self._check_state() database = self._session._database api = database.spanner_api metadata = _metadata_with_prefix(database.name) api.rollback(self._session.name, self._transaction_id, metadata=metadata) ...
python
def rollback(self): """Roll back a transaction on the database.""" self._check_state() database = self._session._database api = database.spanner_api metadata = _metadata_with_prefix(database.name) api.rollback(self._session.name, self._transaction_id, metadata=metadata) ...
[ "def", "rollback", "(", "self", ")", ":", "self", ".", "_check_state", "(", ")", "database", "=", "self", ".", "_session", ".", "_database", "api", "=", "database", ".", "spanner_api", "metadata", "=", "_metadata_with_prefix", "(", "database", ".", "name", ...
Roll back a transaction on the database.
[ "Roll", "back", "a", "transaction", "on", "the", "database", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L101-L109
train
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction.commit
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...
python
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", ")", ":", "self", ".", "_check_state", "(", ")", "database", "=", "self", ".", "_session", ".", "_database", "api", "=", "database", ".", "spanner_api", "metadata", "=", "_metadata_with_prefix", "(", "database", ".", "name", "...
Commit mutations to the database. :rtype: datetime :returns: timestamp of the committed changes. :raises ValueError: if there are no mutations to commit.
[ "Commit", "mutations", "to", "the", "database", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L111-L131
train
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction._make_params_pb
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...
python
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", ")", ":", "if", "params", "is", "not", "None", ":", "if", "param_types", "is", "None", ":", "raise", "ValueError", "(", "\"Specify 'param_types' when passing 'params'.\"", ")", "return", "Struct", "(", ...
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...
[ "Helper", "for", ":", "meth", ":", "execute_update", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L134-L163
train
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction.execute_update
def execute_update(self, dml, params=None, param_types=None, query_mode=None): """Perform an ``ExecuteSql`` API request with DML. :type dml: str :param dml: SQL DML statement :type params: dict, {str -> column value} :param params: values for parameter replacement. Keys must m...
python
def execute_update(self, dml, params=None, param_types=None, query_mode=None): """Perform an ``ExecuteSql`` API request with DML. :type dml: str :param dml: SQL DML statement :type params: dict, {str -> column value} :param params: values for parameter replacement. Keys must m...
[ "def", "execute_update", "(", "self", ",", "dml", ",", "params", "=", "None", ",", "param_types", "=", "None", ",", "query_mode", "=", "None", ")", ":", "params_pb", "=", "self", ".", "_make_params_pb", "(", "params", ",", "param_types", ")", "database", ...
Perform an ``ExecuteSql`` API request with DML. :type dml: str :param dml: SQL DML statement :type params: dict, {str -> column value} :param params: values for parameter replacement. Keys must match the names used in ``dml``. :type param_types: dict[st...
[ "Perform", "an", "ExecuteSql", "API", "request", "with", "DML", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L165-L206
train
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/transaction.py
Transaction.batch_update
def batch_update(self, statements): """Perform a batch of DML statements via an ``ExecuteBatchDml`` request. :type statements: Sequence[Union[ str, Tuple[str, Dict[str, Any], Dict[str, Union[dict, .types.Type]]]]] :param statements: List of DML statements, with optional...
python
def batch_update(self, statements): """Perform a batch of DML statements via an ``ExecuteBatchDml`` request. :type statements: Sequence[Union[ str, Tuple[str, Dict[str, Any], Dict[str, Union[dict, .types.Type]]]]] :param statements: List of DML statements, with optional...
[ "def", "batch_update", "(", "self", ",", "statements", ")", ":", "parsed", "=", "[", "]", "for", "statement", "in", "statements", ":", "if", "isinstance", "(", "statement", ",", "str", ")", ":", "parsed", ".", "append", "(", "{", "\"sql\"", ":", "state...
Perform a batch of DML statements via an ``ExecuteBatchDml`` request. :type statements: Sequence[Union[ str, Tuple[str, Dict[str, Any], Dict[str, Union[dict, .types.Type]]]]] :param statements: List of DML statements, with optional params / param types. If passed, '...
[ "Perform", "a", "batch", "of", "DML", "statements", "via", "an", "ExecuteBatchDml", "request", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/transaction.py#L208-L258
train
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_filters.py
TimestampRange.to_pb
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...
python
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", ")", ":", "timestamp_range_kwargs", "=", "{", "}", "if", "self", ".", "start", "is", "not", "None", ":", "timestamp_range_kwargs", "[", "\"start_timestamp_micros\"", "]", "=", "(", "_microseconds_from_datetime", "(", "self", ".", "...
Converts the :class:`TimestampRange` to a protobuf. :rtype: :class:`.data_v2_pb2.TimestampRange` :returns: The converted current object.
[ "Converts", "the", ":", "class", ":", "TimestampRange", "to", "a", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L271-L287
train
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_filters.py
ColumnRangeFilter.to_pb
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...
python
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", ")", ":", "column_range_kwargs", "=", "{", "\"family_name\"", ":", "self", ".", "column_family_id", "}", "if", "self", ".", "start_column", "is", "not", "None", ":", "if", "self", ".", "inclusive_start", ":", "key", "=", "\"sta...
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.
[ "Converts", "the", "row", "filter", "to", "a", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L399-L423
train
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_filters.py
ValueRangeFilter.to_pb
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...
python
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", ")", ":", "value_range_kwargs", "=", "{", "}", "if", "self", ".", "start_value", "is", "not", "None", ":", "if", "self", ".", "inclusive_start", ":", "key", "=", "\"start_value_closed\"", "else", ":", "key", "=", "\"start_value...
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.
[ "Converts", "the", "row", "filter", "to", "a", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L524-L548
train
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_filters.py
RowFilterChain.to_pb
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...
python
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", ")", ":", "chain", "=", "data_v2_pb2", ".", "RowFilter", ".", "Chain", "(", "filters", "=", "[", "row_filter", ".", "to_pb", "(", ")", "for", "row_filter", "in", "self", ".", "filters", "]", ")", "return", "data_v2_pb2", "....
Converts the row filter to a protobuf. :rtype: :class:`.data_v2_pb2.RowFilter` :returns: The converted current object.
[ "Converts", "the", "row", "filter", "to", "a", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L716-L725
train
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_filters.py
RowFilterUnion.to_pb
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] ) ...
python
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", ")", ":", "interleave", "=", "data_v2_pb2", ".", "RowFilter", ".", "Interleave", "(", "filters", "=", "[", "row_filter", ".", "to_pb", "(", ")", "for", "row_filter", "in", "self", ".", "filters", "]", ")", "return", "data_v2_...
Converts the row filter to a protobuf. :rtype: :class:`.data_v2_pb2.RowFilter` :returns: The converted current object.
[ "Converts", "the", "row", "filter", "to", "a", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L741-L750
train
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_filters.py
ConditionalRowFilter.to_pb
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[...
python
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", ")", ":", "condition_kwargs", "=", "{", "\"predicate_filter\"", ":", "self", ".", "base_filter", ".", "to_pb", "(", ")", "}", "if", "self", ".", "true_filter", "is", "not", "None", ":", "condition_kwargs", "[", "\"true_filter\"",...
Converts the row filter to a protobuf. :rtype: :class:`.data_v2_pb2.RowFilter` :returns: The converted current object.
[ "Converts", "the", "row", "filter", "to", "a", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_filters.py#L800-L812
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.organization_deidentify_template_path
def organization_deidentify_template_path(cls, organization, deidentify_template): """Return a fully-qualified organization_deidentify_template string.""" return google.api_core.path_template.expand( "organizations/{organization}/deidentifyTemplates/{deidentify_template}", organi...
python
def organization_deidentify_template_path(cls, organization, deidentify_template): """Return a fully-qualified organization_deidentify_template string.""" return google.api_core.path_template.expand( "organizations/{organization}/deidentifyTemplates/{deidentify_template}", organi...
[ "def", "organization_deidentify_template_path", "(", "cls", ",", "organization", ",", "deidentify_template", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/deidentifyTemplates/{deidentify_template}\"", ...
Return a fully-qualified organization_deidentify_template string.
[ "Return", "a", "fully", "-", "qualified", "organization_deidentify_template", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L92-L98
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.project_deidentify_template_path
def project_deidentify_template_path(cls, project, deidentify_template): """Return a fully-qualified project_deidentify_template string.""" return google.api_core.path_template.expand( "projects/{project}/deidentifyTemplates/{deidentify_template}", project=project, de...
python
def project_deidentify_template_path(cls, project, deidentify_template): """Return a fully-qualified project_deidentify_template string.""" return google.api_core.path_template.expand( "projects/{project}/deidentifyTemplates/{deidentify_template}", project=project, de...
[ "def", "project_deidentify_template_path", "(", "cls", ",", "project", ",", "deidentify_template", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/deidentifyTemplates/{deidentify_template}\"", ",", "project", ...
Return a fully-qualified project_deidentify_template string.
[ "Return", "a", "fully", "-", "qualified", "project_deidentify_template", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L101-L107
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.organization_inspect_template_path
def organization_inspect_template_path(cls, organization, inspect_template): """Return a fully-qualified organization_inspect_template string.""" return google.api_core.path_template.expand( "organizations/{organization}/inspectTemplates/{inspect_template}", organization=organiza...
python
def organization_inspect_template_path(cls, organization, inspect_template): """Return a fully-qualified organization_inspect_template string.""" return google.api_core.path_template.expand( "organizations/{organization}/inspectTemplates/{inspect_template}", organization=organiza...
[ "def", "organization_inspect_template_path", "(", "cls", ",", "organization", ",", "inspect_template", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/inspectTemplates/{inspect_template}\"", ",", "orga...
Return a fully-qualified organization_inspect_template string.
[ "Return", "a", "fully", "-", "qualified", "organization_inspect_template", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L110-L116
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.project_inspect_template_path
def project_inspect_template_path(cls, project, inspect_template): """Return a fully-qualified project_inspect_template string.""" return google.api_core.path_template.expand( "projects/{project}/inspectTemplates/{inspect_template}", project=project, inspect_template=...
python
def project_inspect_template_path(cls, project, inspect_template): """Return a fully-qualified project_inspect_template string.""" return google.api_core.path_template.expand( "projects/{project}/inspectTemplates/{inspect_template}", project=project, inspect_template=...
[ "def", "project_inspect_template_path", "(", "cls", ",", "project", ",", "inspect_template", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/inspectTemplates/{inspect_template}\"", ",", "project", "=", "proj...
Return a fully-qualified project_inspect_template string.
[ "Return", "a", "fully", "-", "qualified", "project_inspect_template", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L119-L125
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.project_job_trigger_path
def project_job_trigger_path(cls, project, job_trigger): """Return a fully-qualified project_job_trigger string.""" return google.api_core.path_template.expand( "projects/{project}/jobTriggers/{job_trigger}", project=project, job_trigger=job_trigger, )
python
def project_job_trigger_path(cls, project, job_trigger): """Return a fully-qualified project_job_trigger string.""" return google.api_core.path_template.expand( "projects/{project}/jobTriggers/{job_trigger}", project=project, job_trigger=job_trigger, )
[ "def", "project_job_trigger_path", "(", "cls", ",", "project", ",", "job_trigger", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/jobTriggers/{job_trigger}\"", ",", "project", "=", "project", ",", "job_...
Return a fully-qualified project_job_trigger string.
[ "Return", "a", "fully", "-", "qualified", "project_job_trigger", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L128-L134
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.dlp_job_path
def dlp_job_path(cls, project, dlp_job): """Return a fully-qualified dlp_job string.""" return google.api_core.path_template.expand( "projects/{project}/dlpJobs/{dlp_job}", project=project, dlp_job=dlp_job )
python
def dlp_job_path(cls, project, dlp_job): """Return a fully-qualified dlp_job string.""" return google.api_core.path_template.expand( "projects/{project}/dlpJobs/{dlp_job}", project=project, dlp_job=dlp_job )
[ "def", "dlp_job_path", "(", "cls", ",", "project", ",", "dlp_job", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/dlpJobs/{dlp_job}\"", ",", "project", "=", "project", ",", "dlp_job", "=", "dlp_job"...
Return a fully-qualified dlp_job string.
[ "Return", "a", "fully", "-", "qualified", "dlp_job", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L144-L148
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.organization_stored_info_type_path
def organization_stored_info_type_path(cls, organization, stored_info_type): """Return a fully-qualified organization_stored_info_type string.""" return google.api_core.path_template.expand( "organizations/{organization}/storedInfoTypes/{stored_info_type}", organization=organizat...
python
def organization_stored_info_type_path(cls, organization, stored_info_type): """Return a fully-qualified organization_stored_info_type string.""" return google.api_core.path_template.expand( "organizations/{organization}/storedInfoTypes/{stored_info_type}", organization=organizat...
[ "def", "organization_stored_info_type_path", "(", "cls", ",", "organization", ",", "stored_info_type", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/storedInfoTypes/{stored_info_type}\"", ",", "organ...
Return a fully-qualified organization_stored_info_type string.
[ "Return", "a", "fully", "-", "qualified", "organization_stored_info_type", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L151-L157
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.project_stored_info_type_path
def project_stored_info_type_path(cls, project, stored_info_type): """Return a fully-qualified project_stored_info_type string.""" return google.api_core.path_template.expand( "projects/{project}/storedInfoTypes/{stored_info_type}", project=project, stored_info_type=s...
python
def project_stored_info_type_path(cls, project, stored_info_type): """Return a fully-qualified project_stored_info_type string.""" return google.api_core.path_template.expand( "projects/{project}/storedInfoTypes/{stored_info_type}", project=project, stored_info_type=s...
[ "def", "project_stored_info_type_path", "(", "cls", ",", "project", ",", "stored_info_type", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/storedInfoTypes/{stored_info_type}\"", ",", "project", "=", "proje...
Return a fully-qualified project_stored_info_type string.
[ "Return", "a", "fully", "-", "qualified", "project_stored_info_type", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L160-L166
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.redact_image
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, ): ...
python
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...
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 ...
[ "Redacts", "potentially", "sensitive", "info", "from", "an", "image", ".", "This", "method", "has", "limits", "on", "input", "size", "processing", "time", "and", "output", "size", ".", "See", "https", ":", "//", "cloud", ".", "google", ".", "com", "/", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L366-L464
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.reidentify_content
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,...
python
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", ...
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() ...
[ "Re", "-", "identifies", "content", "that", "has", "been", "de", "-", "identified", ".", "See", "https", ":", "//", "cloud", ".", "google", ".", "com", "/", "dlp", "/", "docs", "/", "pseudonymization#re", "-", "identification", "\\", "_in", "\\", "_free"...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L579-L691
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.list_info_types
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 ...
python
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", ".", "gap...
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() >>> ...
[ "Returns", "a", "list", "of", "the", "sensitive", "information", "types", "that", "the", "DLP", "API", "supports", ".", "See", "https", ":", "//", "cloud", ".", "google", ".", "com", "/", "dlp", "/", "docs", "/", "infotypes", "-", "reference", "to", "l...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L693-L754
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.create_inspect_template
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...
python
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", ...
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...
[ "Creates", "an", "InspectTemplate", "for", "re", "-", "using", "frequently", "used", "configuration", "for", "inspecting", "content", "images", "and", "storage", ".", "See", "https", ":", "//", "cloud", ".", "google", ".", "com", "/", "dlp", "/", "docs", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L756-L838
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.create_dlp_job
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...
python
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", ...
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...
[ "Creates", "a", "new", "job", "to", "inspect", "storage", "or", "calculate", "risk", "metrics", ".", "See", "https", ":", "//", "cloud", ".", "google", ".", "com", "/", "dlp", "/", "docs", "/", "inspecting", "-", "storage", "and", "https", ":", "//", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L1621-L1715
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.create_job_trigger
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...
python
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", ".", "a...
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...
[ "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", "/", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L2455-L2536
train
googleapis/google-cloud-python
dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
DlpServiceClient.create_stored_info_type
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...
python
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", ...
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() >>> >...
[ "Creates", "a", "pre", "-", "built", "stored", "infoType", "to", "be", "used", "for", "inspection", ".", "See", "https", ":", "//", "cloud", ".", "google", ".", "com", "/", "dlp", "/", "docs", "/", "creating", "-", "stored", "-", "infotypes", "to", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py#L2538-L2620
train
googleapis/google-cloud-python
trace/google/cloud/trace/client.py
Client.trace_api
def trace_api(self): """ Helper for trace-related API calls. See https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools. cloudtrace.v2 """ if self._trace_api is None: self._trace_api = make_trace_api(self) return self._trace_api
python
def trace_api(self): """ Helper for trace-related API calls. See https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools. cloudtrace.v2 """ if self._trace_api is None: self._trace_api = make_trace_api(self) return self._trace_api
[ "def", "trace_api", "(", "self", ")", ":", "if", "self", ".", "_trace_api", "is", "None", ":", "self", ".", "_trace_api", "=", "make_trace_api", "(", "self", ")", "return", "self", ".", "_trace_api" ]
Helper for trace-related API calls. See https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools. cloudtrace.v2
[ "Helper", "for", "trace", "-", "related", "API", "calls", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/client.py#L46-L56
train
googleapis/google-cloud-python
trace/google/cloud/trace/client.py
Client.batch_write_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 ...
python
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", ")", ":", "self", ".", "trace_api", ".", "batch_write_spans", "(", "name", "=", "name", ",", "spans", "=", "spans", ",", "retry"...
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...
[ "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", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/client.py#L58-L101
train
googleapis/google-cloud-python
trace/google/cloud/trace/client.py
Client.create_span
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...
python
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", "...
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]') ...
[ "Creates", "a", "new", "Span", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/client.py#L103-L226
train
googleapis/google-cloud-python
error_reporting/google/cloud/error_reporting/_logging.py
_ErrorReportingLoggingAPI.report_error_event
def report_error_event(self, error_report): """Report error payload. :type error_report: dict :param: error_report: dict payload of the error report formatted according to https://cloud.google.com/error-reporting/docs/formatting-error-messages This object sho...
python
def report_error_event(self, error_report): """Report error payload. :type error_report: dict :param: error_report: dict payload of the error report formatted according to https://cloud.google.com/error-reporting/docs/formatting-error-messages This object sho...
[ "def", "report_error_event", "(", "self", ",", "error_report", ")", ":", "logger", "=", "self", ".", "logging_client", ".", "logger", "(", "\"errors\"", ")", "logger", ".", "log_struct", "(", "error_report", ")" ]
Report error payload. :type error_report: dict :param: error_report: dict payload of the error report formatted according to https://cloud.google.com/error-reporting/docs/formatting-error-messages This object should be built using :meth:~`google.cloud.err...
[ "Report", "error", "payload", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/error_reporting/google/cloud/error_reporting/_logging.py#L55-L66
train
googleapis/google-cloud-python
api_core/google/api_core/gapic_v1/routing_header.py
to_routing_header
def to_routing_header(params): """Returns a routing header string for the given request parameters. Args: params (Mapping[str, Any]): A dictionary containing the request parameters used for routing. Returns: str: The routing header string. """ if sys.version_info[0] < 3...
python
def to_routing_header(params): """Returns a routing header string for the given request parameters. Args: params (Mapping[str, Any]): A dictionary containing the request parameters used for routing. Returns: str: The routing header string. """ if sys.version_info[0] < 3...
[ "def", "to_routing_header", "(", "params", ")", ":", "if", "sys", ".", "version_info", "[", "0", "]", "<", "3", ":", "# Python 2 does not have the \"safe\" parameter for urlencode.", "return", "urlencode", "(", "params", ")", ".", "replace", "(", "\"%2F\"", ",", ...
Returns a routing header string for the given request parameters. Args: params (Mapping[str, Any]): A dictionary containing the request parameters used for routing. Returns: str: The routing header string.
[ "Returns", "a", "routing", "header", "string", "for", "the", "given", "request", "parameters", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/gapic_v1/routing_header.py#L30-L47
train
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/param_types.py
StructField
def StructField(name, field_type): # pylint: disable=invalid-name """Construct a field description protobuf. :type name: str :param name: the name of the field :type field_type: :class:`type_pb2.Type` :param field_type: the type of the field :rtype: :class:`type_pb2.StructType.Field` :re...
python
def StructField(name, field_type): # pylint: disable=invalid-name """Construct a field description protobuf. :type name: str :param name: the name of the field :type field_type: :class:`type_pb2.Type` :param field_type: the type of the field :rtype: :class:`type_pb2.StructType.Field` :re...
[ "def", "StructField", "(", "name", ",", "field_type", ")", ":", "# pylint: disable=invalid-name", "return", "type_pb2", ".", "StructType", ".", "Field", "(", "name", "=", "name", ",", "type", "=", "field_type", ")" ]
Construct a field description protobuf. :type name: str :param name: the name of the field :type field_type: :class:`type_pb2.Type` :param field_type: the type of the field :rtype: :class:`type_pb2.StructType.Field` :returns: the appropriate struct-field-type protobuf
[ "Construct", "a", "field", "description", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/param_types.py#L42-L54
train
googleapis/google-cloud-python
spanner/google/cloud/spanner_v1/param_types.py
Struct
def Struct(fields): # pylint: disable=invalid-name """Construct a struct parameter type description protobuf. :type fields: list of :class:`type_pb2.StructType.Field` :param fields: the fields of the struct :rtype: :class:`type_pb2.Type` :returns: the appropriate struct-type protobuf """ ...
python
def Struct(fields): # pylint: disable=invalid-name """Construct a struct parameter type description protobuf. :type fields: list of :class:`type_pb2.StructType.Field` :param fields: the fields of the struct :rtype: :class:`type_pb2.Type` :returns: the appropriate struct-type protobuf """ ...
[ "def", "Struct", "(", "fields", ")", ":", "# pylint: disable=invalid-name", "return", "type_pb2", ".", "Type", "(", "code", "=", "type_pb2", ".", "STRUCT", ",", "struct_type", "=", "type_pb2", ".", "StructType", "(", "fields", "=", "fields", ")", ")" ]
Construct a struct parameter type description protobuf. :type fields: list of :class:`type_pb2.StructType.Field` :param fields: the fields of the struct :rtype: :class:`type_pb2.Type` :returns: the appropriate struct-type protobuf
[ "Construct", "a", "struct", "parameter", "type", "description", "protobuf", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/param_types.py#L57-L68
train
googleapis/google-cloud-python
speech/google/cloud/speech_v1/helpers.py
SpeechHelpers.streaming_recognize
def streaming_recognize( self, config, requests, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, ): """Perform bi-directional speech recognition. This method allows you to receive results while sending audio; ...
python
def streaming_recognize( self, config, requests, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, ): """Perform bi-directional speech recognition. This method allows you to receive results while sending audio; ...
[ "def", "streaming_recognize", "(", "self", ",", "config", ",", "requests", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", ...
Perform bi-directional speech recognition. This method allows you to receive results while sending audio; it is only available via. gRPC (not REST). .. warning:: This method is EXPERIMENTAL. Its interface might change in the future. Example: >>> from...
[ "Perform", "bi", "-", "directional", "speech", "recognition", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/speech/google/cloud/speech_v1/helpers.py#L28-L84
train
googleapis/google-cloud-python
speech/google/cloud/speech_v1/helpers.py
SpeechHelpers._streaming_request_iterable
def _streaming_request_iterable(self, config, requests): """A generator that yields the config followed by the requests. Args: config (~.speech_v1.types.StreamingRecognitionConfig): The configuration to use for the stream. requests (Iterable[~.speech_v1.types.Str...
python
def _streaming_request_iterable(self, config, requests): """A generator that yields the config followed by the requests. Args: config (~.speech_v1.types.StreamingRecognitionConfig): The configuration to use for the stream. requests (Iterable[~.speech_v1.types.Str...
[ "def", "_streaming_request_iterable", "(", "self", ",", "config", ",", "requests", ")", ":", "yield", "self", ".", "types", ".", "StreamingRecognizeRequest", "(", "streaming_config", "=", "config", ")", "for", "request", "in", "requests", ":", "yield", "request"...
A generator that yields the config followed by the requests. Args: config (~.speech_v1.types.StreamingRecognitionConfig): The configuration to use for the stream. requests (Iterable[~.speech_v1.types.StreamingRecognizeRequest]): The input objects. ...
[ "A", "generator", "that", "yields", "the", "config", "followed", "by", "the", "requests", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/speech/google/cloud/speech_v1/helpers.py#L86-L102
train
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.project_data_source_path
def project_data_source_path(cls, project, data_source): """Return a fully-qualified project_data_source string.""" return google.api_core.path_template.expand( "projects/{project}/dataSources/{data_source}", project=project, data_source=data_source, )
python
def project_data_source_path(cls, project, data_source): """Return a fully-qualified project_data_source string.""" return google.api_core.path_template.expand( "projects/{project}/dataSources/{data_source}", project=project, data_source=data_source, )
[ "def", "project_data_source_path", "(", "cls", ",", "project", ",", "data_source", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/dataSources/{data_source}\"", ",", "project", "=", "project", ",", "data...
Return a fully-qualified project_data_source string.
[ "Return", "a", "fully", "-", "qualified", "project_data_source", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L88-L94
train
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.project_transfer_config_path
def project_transfer_config_path(cls, project, transfer_config): """Return a fully-qualified project_transfer_config string.""" return google.api_core.path_template.expand( "projects/{project}/transferConfigs/{transfer_config}", project=project, transfer_config=transf...
python
def project_transfer_config_path(cls, project, transfer_config): """Return a fully-qualified project_transfer_config string.""" return google.api_core.path_template.expand( "projects/{project}/transferConfigs/{transfer_config}", project=project, transfer_config=transf...
[ "def", "project_transfer_config_path", "(", "cls", ",", "project", ",", "transfer_config", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/transferConfigs/{transfer_config}\"", ",", "project", "=", "project"...
Return a fully-qualified project_transfer_config string.
[ "Return", "a", "fully", "-", "qualified", "project_transfer_config", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L104-L110
train
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.project_run_path
def project_run_path(cls, project, transfer_config, run): """Return a fully-qualified project_run string.""" return google.api_core.path_template.expand( "projects/{project}/transferConfigs/{transfer_config}/runs/{run}", project=project, transfer_config=transfer_confi...
python
def project_run_path(cls, project, transfer_config, run): """Return a fully-qualified project_run string.""" return google.api_core.path_template.expand( "projects/{project}/transferConfigs/{transfer_config}/runs/{run}", project=project, transfer_config=transfer_confi...
[ "def", "project_run_path", "(", "cls", ",", "project", ",", "transfer_config", ",", "run", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/transferConfigs/{transfer_config}/runs/{run}\"", ",", "project", "...
Return a fully-qualified project_run string.
[ "Return", "a", "fully", "-", "qualified", "project_run", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L113-L120
train
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.create_transfer_config
def create_transfer_config( self, parent, transfer_config, authorization_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a new data transfer configuration....
python
def create_transfer_config( self, parent, transfer_config, authorization_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a new data transfer configuration....
[ "def", "create_transfer_config", "(", "self", ",", "parent", ",", "transfer_config", ",", "authorization_code", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "ap...
Creates a new data transfer configuration. Example: >>> from google.cloud import bigquery_datatransfer_v1 >>> >>> client = bigquery_datatransfer_v1.DataTransferServiceClient() >>> >>> parent = client.project_path('[PROJECT]') >>> ...
[ "Creates", "a", "new", "data", "transfer", "configuration", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L397-L498
train
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.update_transfer_config
def update_transfer_config( self, transfer_config, update_mask, authorization_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Updates a data transfer configuration...
python
def update_transfer_config( self, transfer_config, update_mask, authorization_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Updates a data transfer configuration...
[ "def", "update_transfer_config", "(", "self", ",", "transfer_config", ",", "update_mask", ",", "authorization_code", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", ...
Updates a data transfer configuration. All fields must be set, even if they are not updated. Example: >>> from google.cloud import bigquery_datatransfer_v1 >>> >>> client = bigquery_datatransfer_v1.DataTransferServiceClient() >>> >>> # TODO: I...
[ "Updates", "a", "data", "transfer", "configuration", ".", "All", "fields", "must", "be", "set", "even", "if", "they", "are", "not", "updated", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L500-L602
train
googleapis/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py
DataTransferServiceClient.schedule_transfer_runs
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...
python
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", ...
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...
[ "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", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py#L848-L939
train
googleapis/google-cloud-python
webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py
WebRiskServiceV1Beta1Client.compute_threat_list_diff
def compute_threat_list_diff( self, threat_type, constraints, version_token=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Gets the most recent threat list diffs. ...
python
def compute_threat_list_diff( self, threat_type, constraints, version_token=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Gets the most recent threat list diffs. ...
[ "def", "compute_threat_list_diff", "(", "self", ",", "threat_type", ",", "constraints", ",", "version_token", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_...
Gets the most recent threat list diffs. Example: >>> from google.cloud import webrisk_v1beta1 >>> from google.cloud.webrisk_v1beta1 import enums >>> >>> client = webrisk_v1beta1.WebRiskServiceV1Beta1Client() >>> >>> # TODO: Initialize `thr...
[ "Gets", "the", "most", "recent", "threat", "list", "diffs", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py#L171-L242
train
googleapis/google-cloud-python
webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py
WebRiskServiceV1Beta1Client.search_uris
def search_uris( self, uri, threat_types, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ This method is used to check whether a URI is on a given threatList. Example: ...
python
def search_uris( self, uri, threat_types, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ This method is used to check whether a URI is on a given threatList. Example: ...
[ "def", "search_uris", "(", "self", ",", "uri", ",", "threat_types", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAUL...
This method is used to check whether a URI is on a given threatList. Example: >>> from google.cloud import webrisk_v1beta1 >>> from google.cloud.webrisk_v1beta1 import enums >>> >>> client = webrisk_v1beta1.WebRiskServiceV1Beta1Client() >>> ...
[ "This", "method", "is", "used", "to", "check", "whether", "a", "URI", "is", "on", "a", "given", "threatList", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py#L244-L305
train
googleapis/google-cloud-python
webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py
WebRiskServiceV1Beta1Client.search_hashes
def search_hashes( self, hash_prefix=None, threat_types=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Gets the full hashes that match the requested hash prefix. This ...
python
def search_hashes( self, hash_prefix=None, threat_types=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Gets the full hashes that match the requested hash prefix. This ...
[ "def", "search_hashes", "(", "self", ",", "hash_prefix", "=", "None", ",", "threat_types", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "ga...
Gets the full hashes that match the requested hash prefix. This is used after a hash prefix is looked up in a threatList and there is a match. The client side threatList only holds partial hashes so the client must query this method to determine if there is a full hash match of a threat....
[ "Gets", "the", "full", "hashes", "that", "match", "the", "requested", "hash", "prefix", ".", "This", "is", "used", "after", "a", "hash", "prefix", "is", "looked", "up", "in", "a", "threatList", "and", "there", "is", "a", "match", ".", "The", "client", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/webrisk/google/cloud/webrisk_v1beta1/gapic/web_risk_service_v1_beta1_client.py#L307-L368
train
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.asset_path
def asset_path(cls, organization, asset): """Return a fully-qualified asset string.""" return google.api_core.path_template.expand( "organizations/{organization}/assets/{asset}", organization=organization, asset=asset, )
python
def asset_path(cls, organization, asset): """Return a fully-qualified asset string.""" return google.api_core.path_template.expand( "organizations/{organization}/assets/{asset}", organization=organization, asset=asset, )
[ "def", "asset_path", "(", "cls", ",", "organization", ",", "asset", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/assets/{asset}\"", ",", "organization", "=", "organization", ",", "asset", ...
Return a fully-qualified asset string.
[ "Return", "a", "fully", "-", "qualified", "asset", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L104-L110
train
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.asset_security_marks_path
def asset_security_marks_path(cls, organization, asset): """Return a fully-qualified asset_security_marks string.""" return google.api_core.path_template.expand( "organizations/{organization}/assets/{asset}/securityMarks", organization=organization, asset=asset, ...
python
def asset_security_marks_path(cls, organization, asset): """Return a fully-qualified asset_security_marks string.""" return google.api_core.path_template.expand( "organizations/{organization}/assets/{asset}/securityMarks", organization=organization, asset=asset, ...
[ "def", "asset_security_marks_path", "(", "cls", ",", "organization", ",", "asset", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/assets/{asset}/securityMarks\"", ",", "organization", "=", "organi...
Return a fully-qualified asset_security_marks string.
[ "Return", "a", "fully", "-", "qualified", "asset_security_marks", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L113-L119
train
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.source_path
def source_path(cls, organization, source): """Return a fully-qualified source string.""" return google.api_core.path_template.expand( "organizations/{organization}/sources/{source}", organization=organization, source=source, )
python
def source_path(cls, organization, source): """Return a fully-qualified source string.""" return google.api_core.path_template.expand( "organizations/{organization}/sources/{source}", organization=organization, source=source, )
[ "def", "source_path", "(", "cls", ",", "organization", ",", "source", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/sources/{source}\"", ",", "organization", "=", "organization", ",", "source...
Return a fully-qualified source string.
[ "Return", "a", "fully", "-", "qualified", "source", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L122-L128
train
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.finding_path
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, ...
python
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", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"organizations/{organization}/sources/{source}/findings/{finding}\"", ",", "organization", ...
Return a fully-qualified finding string.
[ "Return", "a", "fully", "-", "qualified", "finding", "string", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L138-L145
train
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.create_source
def create_source( self, parent, source, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a source. Example: >>> from google.cloud import securitycenter_v...
python
def create_source( self, parent, source, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a source. Example: >>> from google.cloud import securitycenter_v...
[ "def", "create_source", "(", "self", ",", "parent", ",", "source", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT...
Creates a source. Example: >>> from google.cloud import securitycenter_v1 >>> >>> client = securitycenter_v1.SecurityCenterClient() >>> >>> parent = client.organization_path('[ORGANIZATION]') >>> >>> # TODO: Initialize `source`...
[ "Creates", "a", "source", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L256-L335
train
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.create_finding
def create_finding( self, parent, finding_id, finding, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a finding. The corresponding source must exist for finding crea...
python
def create_finding( self, parent, finding_id, finding, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a finding. The corresponding source must exist for finding crea...
[ "def", "create_finding", "(", "self", ",", "parent", ",", "finding_id", ",", "finding", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "m...
Creates a finding. The corresponding source must exist for finding creation to succeed. Example: >>> from google.cloud import securitycenter_v1 >>> >>> client = securitycenter_v1.SecurityCenterClient() >>> >>> parent = client.source_path('[ORG...
[ "Creates", "a", "finding", ".", "The", "corresponding", "source", "must", "exist", "for", "finding", "creation", "to", "succeed", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L337-L424
train
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.run_asset_discovery
def run_asset_discovery( self, parent, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Runs asset discovery. The discovery is tracked with a long-running operation. This API...
python
def run_asset_discovery( self, parent, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Runs asset discovery. The discovery is tracked with a long-running operation. This API...
[ "def", "run_asset_discovery", "(", "self", ",", "parent", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "...
Runs asset discovery. The discovery is tracked with a long-running operation. This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO\_MANY\_REQUESTS error. Example: >>> from google.cloud i...
[ "Runs", "asset", "discovery", ".", "The", "discovery", "is", "tracked", "with", "a", "long", "-", "running", "operation", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L1565-L1653
train
googleapis/google-cloud-python
securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py
SecurityCenterClient.update_security_marks
def update_security_marks( self, security_marks, update_mask=None, start_time=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Updates security marks. Example: ...
python
def update_security_marks( self, security_marks, update_mask=None, start_time=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Updates security marks. Example: ...
[ "def", "update_security_marks", "(", "self", ",", "security_marks", ",", "update_mask", "=", "None", ",", "start_time", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ...
Updates security marks. Example: >>> from google.cloud import securitycenter_v1 >>> >>> client = securitycenter_v1.SecurityCenterClient() >>> >>> # TODO: Initialize `security_marks`: >>> security_marks = {} >>> >>> ...
[ "Updates", "security", "marks", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/securitycenter/google/cloud/securitycenter_v1/gapic/security_center_client.py#L2165-L2256
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_LoggingAPI.list_entries
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...
python
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", ")", ":", "extra_params", "=", "{", "\"projectIds\"", ":", "projects", "}", "if...
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...
[ "Return", "a", "page", "of", "log", "entry", "resources", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L65-L127
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_LoggingAPI.write_entries
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...
python
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", ")", ":", "data", "=", "{", "\"entries\"", ":", "list", "(", "entries", ")", "}", "if", "logger_name", "is",...
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...
[ "API", "call", ":", "log", "an", "entry", "resource", "via", "a", "POST", "request" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L129-L161
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_LoggingAPI.logger_delete
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...
python
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", ")", ":", "path", "=", "\"/projects/%s/logs/%s\"", "%", "(", "project", ",", "logger_name", ")", "self", ".", "api_request", "(", "method", "=", "\"DELETE\"", ",", "path", "=", "path", ...
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...
[ "API", "call", ":", "delete", "all", "entries", "in", "a", "logger", "via", "a", "DELETE", "request" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L163-L176
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_SinksAPI.list_sinks
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 ...
python
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", ")", ":", "extra_params", "=", "{", "}", "if", "page_size", "is", "not", "None", ":", "extra_params", "[", "\"pageSize\"", "]", "=", "page_si...
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 ...
[ "List", "sinks", "for", "the", "project", "associated", "with", "this", "client", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L193-L230
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_SinksAPI.sink_get
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...
python
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", ")", ":", "target", "=", "\"/projects/%s/sinks/%s\"", "%", "(", "project", ",", "sink_name", ")", "return", "self", ".", "api_request", "(", "method", "=", "\"GET\"", ",", "path", "=", "targ...
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:...
[ "API", "call", ":", "retrieve", "a", "sink", "resource", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L269-L285
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_SinksAPI.sink_update
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...
python
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", ")", ":", "target", "=", "\"/projects/%s/sinks/%s\"", "%", "(", "project", ",", "sink_name", ")", "data", "=",...
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 ...
[ "API", "call", ":", "update", "a", "sink", "resource", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L287-L322
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_SinksAPI.sink_delete
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 ...
python
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", ")", ":", "target", "=", "\"/projects/%s/sinks/%s\"", "%", "(", "project", ",", "sink_name", ")", "self", ".", "api_request", "(", "method", "=", "\"DELETE\"", ",", "path", "=", "target", ...
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
[ "API", "call", ":", "delete", "a", "sink", "resource", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L324-L337
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_MetricsAPI.list_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...
python
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", ")", ":", "extra_params", "=", "{", "}", "if", "page_size", "is", "not", "None", ":", "extra_params", "[", "\"pageSize\"", "]", "=", "page_...
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...
[ "List", "metrics", "for", "the", "project", "associated", "with", "this", "client", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L354-L391
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_MetricsAPI.metric_create
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...
python
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", ")", ":", "target", "=", "\"/projects/%s/metrics\"", "%", "(", "project", ",", ")", "data", "=", "{", "\"name\"", ":", "metric_name", ...
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...
[ "API", "call", ":", "create", "a", "metric", "resource", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L393-L414
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_MetricsAPI.metric_get
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 ...
python
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", ")", ":", "target", "=", "\"/projects/%s/metrics/%s\"", "%", "(", "project", ",", "metric_name", ")", "return", "self", ".", "api_request", "(", "method", "=", "\"GET\"", ",", "path", "=",...
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 ...
[ "API", "call", ":", "retrieve", "a", "metric", "resource", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L416-L432
train
googleapis/google-cloud-python
logging/google/cloud/logging/_http.py
_MetricsAPI.metric_delete
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: ...
python
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", ")", ":", "target", "=", "\"/projects/%s/metrics/%s\"", "%", "(", "project", ",", "metric_name", ")", "self", ".", "api_request", "(", "method", "=", "\"DELETE\"", ",", "path", "=", "ta...
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.
[ "API", "call", ":", "delete", "a", "metric", "resource", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/logging/google/cloud/logging/_http.py#L460-L473
train
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_set.py
RowSet.add_row_range_from_keys
def add_row_range_from_keys( self, start_key=None, end_key=None, start_inclusive=True, end_inclusive=False ): """Add row range to row_ranges list from the row keys For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_range_from_keys] ...
python
def add_row_range_from_keys( self, start_key=None, end_key=None, start_inclusive=True, end_inclusive=False ): """Add row range to row_ranges list from the row keys For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_range_from_keys] ...
[ "def", "add_row_range_from_keys", "(", "self", ",", "start_key", "=", "None", ",", "end_key", "=", "None", ",", "start_inclusive", "=", "True", ",", "end_inclusive", "=", "False", ")", ":", "row_range", "=", "RowRange", "(", "start_key", ",", "end_key", ",",...
Add row range to row_ranges list from the row keys For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_range_from_keys] :end-before: [END bigtable_row_range_from_keys] :type start_key: bytes :param start_key: (Optional) Start ke...
[ "Add", "row", "range", "to", "row_ranges", "list", "from", "the", "row", "keys" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L81-L110
train
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_set.py
RowSet._update_message_request
def _update_message_request(self, message): """Add row keys and row range to given request message :type message: class:`data_messages_v2_pb2.ReadRowsRequest` :param message: The ``ReadRowsRequest`` protobuf """ for each in self.row_keys: message.rows.row_keys.append...
python
def _update_message_request(self, message): """Add row keys and row range to given request message :type message: class:`data_messages_v2_pb2.ReadRowsRequest` :param message: The ``ReadRowsRequest`` protobuf """ for each in self.row_keys: message.rows.row_keys.append...
[ "def", "_update_message_request", "(", "self", ",", "message", ")", ":", "for", "each", "in", "self", ".", "row_keys", ":", "message", ".", "rows", ".", "row_keys", ".", "append", "(", "_to_bytes", "(", "each", ")", ")", "for", "each", "in", "self", "....
Add row keys and row range to given request message :type message: class:`data_messages_v2_pb2.ReadRowsRequest` :param message: The ``ReadRowsRequest`` protobuf
[ "Add", "row", "keys", "and", "row", "range", "to", "given", "request", "message" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L112-L123
train
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_set.py
RowRange._key
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_...
python
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", ")", ":", "return", "(", "self", ".", "start_key", ",", "self", ".", "start_inclusive", ",", "self", ".", "end_key", ",", "self", ".", "end_inclusive", ")" ]
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`.
[ "A", "tuple", "key", "that", "uniquely", "describes", "this", "field", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L155-L163
train
googleapis/google-cloud-python
bigtable/google/cloud/bigtable/row_set.py
RowRange.get_range_kwargs
def get_range_kwargs(self): """ Convert row range object to dict which can be passed to google.bigtable.v2.RowRange add method. """ range_kwargs = {} if self.start_key is not None: start_key_key = "start_key_open" if self.start_inclusive: s...
python
def get_range_kwargs(self): """ Convert row range object to dict which can be passed to google.bigtable.v2.RowRange add method. """ range_kwargs = {} if self.start_key is not None: start_key_key = "start_key_open" if self.start_inclusive: s...
[ "def", "get_range_kwargs", "(", "self", ")", ":", "range_kwargs", "=", "{", "}", "if", "self", ".", "start_key", "is", "not", "None", ":", "start_key_key", "=", "\"start_key_open\"", "if", "self", ".", "start_inclusive", ":", "start_key_key", "=", "\"start_key...
Convert row range object to dict which can be passed to google.bigtable.v2.RowRange add method.
[ "Convert", "row", "range", "object", "to", "dict", "which", "can", "be", "passed", "to", "google", ".", "bigtable", ".", "v2", ".", "RowRange", "add", "method", "." ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row_set.py#L176-L192
train