diff --git a/dlp/LICENSE b/dlp/LICENSE new file mode 100644 index 000000000000..724a8807144b --- /dev/null +++ b/dlp/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dlp/MANIFEST.in b/dlp/MANIFEST.in new file mode 100644 index 000000000000..5fffff88c833 --- /dev/null +++ b/dlp/MANIFEST.in @@ -0,0 +1,6 @@ +include README.rst LICENSE +global-include *.json +graft google +global-exclude *.py[co] +global-exclude __pycache__ +prune .tox diff --git a/dlp/PUBLISHING.rst b/dlp/PUBLISHING.rst new file mode 100644 index 000000000000..a6d81225248b --- /dev/null +++ b/dlp/PUBLISHING.rst @@ -0,0 +1,46 @@ +PUBLISHING +---------- + +Note: This folder has been generated by the GAPIC code generator. + +The instructions assumes that no changes have been made to folder and its +contents since it was created. + +PREREQUISITES +------------- + +- Python must installed +- [tox](https://testrun.org/tox/latest/) must be installed + + +TO PUBLISH +---------- + +- Make sure you have `an account`_ on pypi_. +- Publish your package using tox. +- *tox must be used here or the uploaded package will be invalid!!* + + :: + + tox -e upload-package + + +TO PUBLISH THE DOCS +------------------- + +- Create the docs + + :: + + tox -e docs + +- Publish them to pythonhosted.org + + :: + + tox -e upload-docs + + +_`Packaging and Distributing projects`: https://packaging.python.org/en/latest/distributing.html#uploading-your-project-to-pypi +_`an account`: https://pypi.python.org/pypi?%3Aaction=register_form +_pypi: http://pypi.python.org diff --git a/dlp/README.rst b/dlp/README.rst new file mode 100644 index 000000000000..965319f85f39 --- /dev/null +++ b/dlp/README.rst @@ -0,0 +1,73 @@ +Python Client for DLP API (`Alpha`_) +================================================================================================== + +Idiomatic Python client for `DLP API`_ + +- `Client Library Documentation`_ +- `Product Documentation`_ + +.. _Alpha: https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/README.rst +.. _DLP API: https://cloud.google.com/dlp +.. _Client Library Documentation: https://googlecloudplatform.github.io/google-cloud-python/stable/dlp-usage +.. _Product Documentation: https://cloud.google.com/dlp + +Quick Start +----------- + +In order to use this library, you first need to go through the following steps: + +1. `Select or create a Cloud Platform project.`_ +2. `Enable the monitoring api.`_ +3. `Setup Authentication.`_ + +.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project +.. _Enable the dlp api.: https://cloud.google.com/dlp +.. _Setup Authentication.: https://googlecloudplatform.github.io/google-cloud-python/stable/google-cloud-auth + +Installation +~~~~~~~~~~~~ + +Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to +create isolated Python environments. The basic problem it addresses is one of +dependencies and versions, and indirectly permissions. + +With `virtualenv`_, it's possible to install this library without needing system +install permissions, and without clashing with the installed system +dependencies. + +.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ + + +Mac/Linux +^^^^^^^^^ + +.. code-block:: console + + pip install virtualenv + virtualenv + source /bin/activate + /bin/pip install gapic-google-cloud-dlp-v2beta1 + + +Windows +^^^^^^^ + +.. code-block:: console + + pip install virtualenv + virtualenv + \Scripts\activate + \Scripts\pip.exe install gapic-google-cloud-dlp-v2beta1 + +Next Steps +~~~~~~~~~~ + +- Read the `Client Library Documentation`_ for DLP API + API to see other available methods on the client. +- Read the `DLP API Product documentation`_ to learn + more about the product and see How-to Guides. +- View this `repository’s main README`_ to see the full list of Cloud + APIs that we cover. + +.. _DLP API Product documentation: https://cloud.google.com/dlp +.. _repository’s main README: https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/README.rst \ No newline at end of file diff --git a/dlp/docs/apis.rst b/dlp/docs/apis.rst new file mode 100644 index 000000000000..c2fcc5259a3e --- /dev/null +++ b/dlp/docs/apis.rst @@ -0,0 +1,19 @@ +API Reference +============= + +APIs +---- + +.. autosummary:: + :toctree: + + google.cloud.gapic.privacy.dlp.v2beta1.dlp_service_client + + +API types +~~~~~~~~~ + +.. autosummary:: + :toctree: + + google.cloud.gapic.privacy.dlp.v2beta1.enums diff --git a/dlp/docs/conf.py b/dlp/docs/conf.py new file mode 100644 index 000000000000..0986e55d392a --- /dev/null +++ b/dlp/docs/conf.py @@ -0,0 +1,311 @@ +# -*- coding: utf-8 -*- +# +# gapic-google-cloud-dlp-v2beta1 documentation build configuration file +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os +import shlex + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('..')) + +__version__ = '0.15.4' + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.intersphinx', + 'sphinx.ext.coverage', + 'sphinx.ext.napoleon', + 'sphinx.ext.viewcode', +] + +# autodoc/autosummary flags +autoclass_content = 'both' +autodoc_default_flags = ['members'] +autosummary_generate = True + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'gapic-google-cloud-dlp-v2beta1' +copyright = u'2017, Google' +author = u'Google APIs' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = __version__ +# The short X.Y version. +version = '.'.join(release.split('.')[0:2]) + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = [] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' +#html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# Now only 'ja' uses this config value +#html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +#html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'gapic-google-cloud-dlp-v2beta1-doc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + #'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + #'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + #'preamble': '', + + # Latex figure (float) alignment + #'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'gapic-google-cloud-dlp-v2beta1.tex', + u'gapic-google-cloud-dlp-v2beta1 Documentation', author, 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [(master_doc, 'gapic-google-cloud-dlp-v2beta1', + u'gapic-google-cloud-dlp-v2beta1 Documentation', [author], 1)] + +# If true, show URL addresses after external links. +#man_show_urls = False + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'gapic-google-cloud-dlp-v2beta1', + u'gapic-google-cloud-dlp-v2beta1 Documentation', author, + 'gapic-google-cloud-dlp-v2beta1', + 'GAPIC library for the {metadata.shortName} v2beta1 service', 'APIs'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = { + 'python': ('http://python.readthedocs.org/en/latest/', None), + 'gax': ('https://gax-python.readthedocs.org/en/latest/', None), +} + +# Napoleon settings +napoleon_google_docstring = True +napoleon_numpy_docstring = True +napoleon_include_private_with_doc = False +napoleon_include_special_with_doc = True +napoleon_use_admonition_for_examples = False +napoleon_use_admonition_for_notes = False +napoleon_use_admonition_for_references = False +napoleon_use_ivar = False +napoleon_use_param = True +napoleon_use_rtype = True diff --git a/dlp/docs/index.rst b/dlp/docs/index.rst new file mode 100644 index 000000000000..17ea55b93753 --- /dev/null +++ b/dlp/docs/index.rst @@ -0,0 +1,41 @@ +.. gapic-google-cloud-dlp-v2beta1 sphinx documentation master file + + +GAPIC library for the DLP API +============================================================================================================= + +This is the API documentation for ``gapic-google-cloud-dlp-v2beta1``. + +gapic-google-cloud-dlp-v2beta1 uses google-gax_ (Google API extensions) to provide an +easy-to-use client library for the `DLP API`_ (v2beta1) defined in the googleapis_ git repository + + +.. _`google-gax`: https://github.com/googleapis/gax-python +.. _`googleapis`: https://github.com/googleapis/googleapis/tree/master/google/privacy/dlp/v2beta1 +.. _`DLP API`: https://developers.google.com/apis-explorer/?hl=en_US#p/dlp/v2beta1/ + + +APIs +---- + +.. autosummary:: + + google.cloud.gapic.privacy.dlp.v2beta1.dlp_service_client + + +Contents +-------- + +.. toctree:: + + self + starting + apis + + +Indices and tables +------------------ + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/dlp/docs/starting.rst b/dlp/docs/starting.rst new file mode 100644 index 000000000000..a35fedb1d31c --- /dev/null +++ b/dlp/docs/starting.rst @@ -0,0 +1,78 @@ +Getting started +=============== + +gapic-google-cloud-dlp-v2beta1 will allow you to connect to the `DLP API`_ and access all its methods. In order to achieve this, you need to set up authentication as well as install the library locally. + +.. _`DLP API`: https://developers.google.com/apis-explorer/?hl=en_US#p/dlp/v2beta1/ + + +Installation +------------ + + +Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to +create isolated Python environments. The basic problem it addresses is one of +dependencies and versions, and indirectly permissions. + +With `virtualenv`_, it's possible to install this library without needing system +install permissions, and without clashing with the installed system +dependencies. + +.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ + + +Mac/Linux +~~~~~~~~~~ + +.. code-block:: console + + pip install virtualenv + virtualenv + source /bin/activate + /bin/pip install gapic-google-cloud-dlp-v2beta1 + +Windows +~~~~~~~ + +.. code-block:: console + + pip install virtualenv + virtualenv + \Scripts\activate + \Scripts\pip.exe install gapic-google-cloud-dlp-v2beta1 + + +Using the API +------------- + + +Authentication +~~~~~~~~~~~~~~ + +To authenticate all your API calls, first install and setup the `Google Cloud SDK`_. +Once done, you can then run the following command in your terminal: + +.. code-block:: console + + $ gcloud beta auth application-default login + +or + +.. code-block:: console + + $ gcloud auth login + +Please see `gcloud beta auth application-default login`_ document for the difference between these commands. + +.. _Google Cloud SDK: https://cloud.google.com/sdk/ +.. _gcloud beta auth application-default login: https://cloud.google.com/sdk/gcloud/reference/beta/auth/application-default/login +.. code-block:: console + +At this point you are all set to continue. + + +Examples +~~~~~~~~ + +To see example usage, please read through the :doc:`API reference `. The +documentation for each API method includes simple examples. diff --git a/dlp/google/__init__.py b/dlp/google/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/dlp/google/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/dlp/google/cloud/__init__.py b/dlp/google/cloud/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/dlp/google/cloud/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/dlp/google/cloud/dlp.py b/dlp/google/cloud/dlp.py new file mode 100644 index 000000000000..95c424f82676 --- /dev/null +++ b/dlp/google/cloud/dlp.py @@ -0,0 +1,26 @@ +# Copyright 2017, Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import absolute_import + +from google.cloud.dlp_v2beta1 import enums +from google.cloud.dlp_v2beta1 import types +from google.cloud.dlp_v2beta1 import DlpServiceClient + + +__all__ = ( + 'enums', + 'types', + 'DlpServiceClient', +) diff --git a/dlp/google/cloud/dlp_v2beta1/__init__.py b/dlp/google/cloud/dlp_v2beta1/__init__.py new file mode 100644 index 000000000000..7fc4d7fe9463 --- /dev/null +++ b/dlp/google/cloud/dlp_v2beta1/__init__.py @@ -0,0 +1,28 @@ +# Copyright 2017, Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import absolute_import + +from google.cloud.gapic.privacy.dlp.v2beta1.dlp_service_client import DlpServiceClient +from google.cloud.gapic.privacy.dlp.v2beta1 import enums + +from google.cloud.dlp_v2beta1 import types + + + +__all__ = ( + 'enums', + 'types', + 'DlpServiceClient', +) diff --git a/dlp/google/cloud/dlp_v2beta1/types.py b/dlp/google/cloud/dlp_v2beta1/types.py new file mode 100644 index 000000000000..c4f520a56a37 --- /dev/null +++ b/dlp/google/cloud/dlp_v2beta1/types.py @@ -0,0 +1,30 @@ +# Copyright 2017, Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import absolute_import +import sys + +from google.cloud.proto.privacy.dlp.v2beta1 import dlp_pb2 +from google.cloud.proto.privacy.dlp.v2beta1 import storage_pb2 +from google.gax.utils.messages import get_messages + + +names = [] +for pb2_module in (dlp_pb2, storage_pb2): + for name, message in get_messages(pb2_module).items(): + setattr(sys.modules[__name__], name, message) + names.append(name) + + +__all__ = tuple(sorted(names)) diff --git a/dlp/google/cloud/gapic/__init__.py b/dlp/google/cloud/gapic/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/dlp/google/cloud/gapic/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/dlp/google/cloud/gapic/privacy/__init__.py b/dlp/google/cloud/gapic/privacy/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/dlp/google/cloud/gapic/privacy/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/dlp/google/cloud/gapic/privacy/dlp/__init__.py b/dlp/google/cloud/gapic/privacy/dlp/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/dlp/google/cloud/gapic/privacy/dlp/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/dlp/google/cloud/gapic/privacy/dlp/v2beta1/__init__.py b/dlp/google/cloud/gapic/privacy/dlp/v2beta1/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/dlp/google/cloud/gapic/privacy/dlp/v2beta1/dlp_service_client.py b/dlp/google/cloud/gapic/privacy/dlp/v2beta1/dlp_service_client.py new file mode 100644 index 000000000000..bbf595e2d262 --- /dev/null +++ b/dlp/google/cloud/gapic/privacy/dlp/v2beta1/dlp_service_client.py @@ -0,0 +1,417 @@ +# Copyright 2017, Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# EDITING INSTRUCTIONS +# This file was generated from the file +# https://github.com/google/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto, +# and updates to that file get reflected here through a refresh process. +# For the short term, the refresh process will only be runnable by Google engineers. +# +# The only allowed edits are to method and file documentation. A 3-way +# merge preserves those additions if the generated source changes. +"""Accesses the google.privacy.dlp.v2beta1 DlpService API.""" + +import collections +import json +import os +import pkg_resources +import platform + +from google.gax import api_callable +from google.gax import config +from google.gax import path_template +import google.gax + +from google.cloud.gapic.privacy.dlp.v2beta1 import enums +from google.cloud.proto.privacy.dlp.v2beta1 import dlp_pb2 +from google.cloud.proto.privacy.dlp.v2beta1 import storage_pb2 + + +class DlpServiceClient(object): + """ + The DLP API is a service that allows clients + to detect the presence of Personally Identifiable Information (PII) and other + privacy-sensitive data in user-supplied, unstructured data streams, like text + blocks or images. + The service also includes methods for sensitive data redaction and + scheduling of data scans on Google Cloud Platform based data sets. + """ + + SERVICE_ADDRESS = 'dlp.googleapis.com' + """The default address of the service.""" + + DEFAULT_SERVICE_PORT = 443 + """The default port of the service.""" + + # The scopes needed to make gRPC calls to all of the methods defined in + # this service + _ALL_SCOPES = ('https://www.googleapis.com/auth/cloud-platform', ) + + _RESULT_PATH_TEMPLATE = path_template.PathTemplate( + 'inspect/results/{result}') + + @classmethod + def result_path(cls, result): + """Returns a fully-qualified result resource name string.""" + return cls._RESULT_PATH_TEMPLATE.render({ + 'result': result, + }) + + @classmethod + def match_result_from_result_name(cls, result_name): + """Parses the result from a result resource. + + Args: + result_name (string): A fully-qualified path representing a result + resource. + + Returns: + A string representing the result. + """ + return cls._RESULT_PATH_TEMPLATE.match(result_name).get('result') + + def __init__(self, + service_path=SERVICE_ADDRESS, + port=DEFAULT_SERVICE_PORT, + channel=None, + credentials=None, + ssl_credentials=None, + scopes=None, + client_config=None, + app_name=None, + app_version='', + lib_name=None, + lib_version='', + metrics_headers=()): + """Constructor. + + Args: + service_path (string): The domain name of the API remote host. + port (int): The port on which to connect to the remote host. + channel (:class:`grpc.Channel`): A ``Channel`` instance through + which to make calls. + credentials (object): The authorization credentials to attach to + requests. These credentials identify this application to the + service. + ssl_credentials (:class:`grpc.ChannelCredentials`): A + ``ChannelCredentials`` instance for use with an SSL-enabled + channel. + scopes (list[string]): A list of OAuth2 scopes to attach to requests. + client_config (dict): + A dictionary for call options for each method. See + :func:`google.gax.construct_settings` for the structure of + this data. Falls back to the default config if not specified + or the specified config is missing data points. + app_name (string): The name of the application calling + the service. Recommended for analytics purposes. + app_version (string): The version of the application calling + the service. Recommended for analytics purposes. + lib_name (string): The API library software used for calling + the service. (Unless you are writing an API client itself, + leave this as default.) + lib_version (string): The API library software version used + for calling the service. (Unless you are writing an API client + itself, leave this as default.) + metrics_headers (dict): A dictionary of values for tracking + client library metrics. Ultimately serializes to a string + (e.g. 'foo/1.2.3 bar/3.14.1'). This argument should be + considered private. + + Returns: + A DlpServiceClient object. + """ + # Unless the calling application specifically requested + # OAuth scopes, request everything. + if scopes is None: + scopes = self._ALL_SCOPES + + # Initialize an empty client config, if none is set. + if client_config is None: + client_config = {} + + # Initialize metrics_headers as an ordered dictionary + # (cuts down on cardinality of the resulting string slightly). + metrics_headers = collections.OrderedDict(metrics_headers) + metrics_headers['gl-python'] = platform.python_version() + + # The library may or may not be set, depending on what is + # calling this client. Newer client libraries set the library name + # and version. + if lib_name: + metrics_headers[lib_name] = lib_version + + # Finally, track the GAPIC package version. + metrics_headers['gapic'] = pkg_resources.get_distribution( + 'google-cloud-dlp', ).version + + # Load the configuration defaults. + default_client_config = json.loads( + pkg_resources.resource_string( + __name__, 'dlp_service_client_config.json').decode()) + defaults = api_callable.construct_settings( + 'google.privacy.dlp.v2beta1.DlpService', + default_client_config, + client_config, + config.STATUS_CODE_NAMES, + metrics_headers=metrics_headers, ) + self.dlp_service_stub = config.create_stub( + dlp_pb2.DlpServiceStub, + channel=channel, + service_path=service_path, + service_port=port, + credentials=credentials, + scopes=scopes, + ssl_credentials=ssl_credentials) + + self._inspect_content = api_callable.create_api_call( + self.dlp_service_stub.InspectContent, + settings=defaults['inspect_content']) + self._redact_content = api_callable.create_api_call( + self.dlp_service_stub.RedactContent, + settings=defaults['redact_content']) + self._create_inspect_operation = api_callable.create_api_call( + self.dlp_service_stub.CreateInspectOperation, + settings=defaults['create_inspect_operation']) + self._list_inspect_findings = api_callable.create_api_call( + self.dlp_service_stub.ListInspectFindings, + settings=defaults['list_inspect_findings']) + self._list_info_types = api_callable.create_api_call( + self.dlp_service_stub.ListInfoTypes, + settings=defaults['list_info_types']) + self._list_root_categories = api_callable.create_api_call( + self.dlp_service_stub.ListRootCategories, + settings=defaults['list_root_categories']) + + # Service calls + def inspect_content(self, inspect_config, items, options=None): + """ + Find potentially sensitive info in a list of strings. + This method has limits on input size, processing time, and output size. + + Example: + >>> from google.cloud.gapic.privacy.dlp.v2beta1 import dlp_service_client + >>> from google.cloud.proto.privacy.dlp.v2beta1 import dlp_pb2 + >>> client = dlp_service_client.DlpServiceClient() + >>> inspect_config = dlp_pb2.InspectConfig() + >>> items = [] + >>> response = client.inspect_content(inspect_config, items) + + Args: + inspect_config (:class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.InspectConfig`): Configuration for the inspector. + items (list[:class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.ContentItem`]): The list of items to inspect. Items in a single request are + considered \"related\" unless inspect_config.independent_inputs is true. + Up to 100 are allowed per request. + options (:class:`google.gax.CallOptions`): Overrides the default + settings for this call, e.g, timeout, retries etc. + + Returns: + A :class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.InspectContentResponse` instance. + + Raises: + :exc:`google.gax.errors.GaxError` if the RPC is aborted. + :exc:`ValueError` if the parameters are invalid. + """ + # Create the request object. + request = dlp_pb2.InspectContentRequest( + inspect_config=inspect_config, items=items) + return self._inspect_content(request, options) + + def redact_content(self, + inspect_config, + items, + replace_configs, + options=None): + """ + Redact potentially sensitive info from a list of strings. + This method has limits on input size, processing time, and output size. + + Example: + >>> from google.cloud.gapic.privacy.dlp.v2beta1 import dlp_service_client + >>> from google.cloud.proto.privacy.dlp.v2beta1 import dlp_pb2 + >>> client = dlp_service_client.DlpServiceClient() + >>> inspect_config = dlp_pb2.InspectConfig() + >>> items = [] + >>> replace_configs = [] + >>> response = client.redact_content(inspect_config, items, replace_configs) + + Args: + inspect_config (:class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.InspectConfig`): Configuration for the inspector. + items (list[:class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.ContentItem`]): The list of items to inspect. Up to 100 are allowed per request. + replace_configs (list[:class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.RedactContentRequest.ReplaceConfig`]): The strings to replace findings with. Must specify at least one. + options (:class:`google.gax.CallOptions`): Overrides the default + settings for this call, e.g, timeout, retries etc. + + Returns: + A :class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.RedactContentResponse` instance. + + Raises: + :exc:`google.gax.errors.GaxError` if the RPC is aborted. + :exc:`ValueError` if the parameters are invalid. + """ + # Create the request object. + request = dlp_pb2.RedactContentRequest( + inspect_config=inspect_config, + items=items, + replace_configs=replace_configs) + return self._redact_content(request, options) + + def create_inspect_operation(self, + inspect_config, + storage_config, + output_config, + options=None): + """ + Schedule a job scanning content in a Google Cloud Platform data repository. + + Example: + >>> from google.cloud.gapic.privacy.dlp.v2beta1 import dlp_service_client + >>> from google.cloud.proto.privacy.dlp.v2beta1 import dlp_pb2 + >>> from google.cloud.proto.privacy.dlp.v2beta1 import storage_pb2 + >>> client = dlp_service_client.DlpServiceClient() + >>> inspect_config = dlp_pb2.InspectConfig() + >>> storage_config = storage_pb2.StorageConfig() + >>> output_config = dlp_pb2.OutputStorageConfig() + >>> response = client.create_inspect_operation(inspect_config, storage_config, output_config) + + Args: + inspect_config (:class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.InspectConfig`): Configuration for the inspector. + storage_config (:class:`google.cloud.proto.privacy.dlp.v2beta1.storage_pb2.StorageConfig`): Specification of the data set to process. + output_config (:class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.OutputStorageConfig`): Optional location to store findings. The bucket must already exist and + the Google APIs service account for DLP must have write permission to + write to the given bucket. + Results will be split over multiple csv files with each file name matching + the pattern \"[operation_id] + [count].csv\". + The operation_id will match the identifier for the Operation, + and the [count] is a counter used for tracking the number of files written. + The CSV file(s) contain the following columns regardless of storage type + scanned: id, info_type, likelihood, byte size of finding, quote, time_stamp + For cloud storage the next two columns are: file_path, start_offset + For datastore the next two columns are: project_id, namespace_id, path, + :: + + column_name, offset. + options (:class:`google.gax.CallOptions`): Overrides the default + settings for this call, e.g, timeout, retries etc. + + Returns: + A :class:`google.longrunning.operations_pb2.Operation` instance. + + Raises: + :exc:`google.gax.errors.GaxError` if the RPC is aborted. + :exc:`ValueError` if the parameters are invalid. + """ + # Create the request object. + request = dlp_pb2.CreateInspectOperationRequest( + inspect_config=inspect_config, + storage_config=storage_config, + output_config=output_config) + return self._create_inspect_operation(request, options) + + def list_inspect_findings(self, + name, + page_size=None, + page_token=None, + options=None): + """ + Returns list of results for given inspect operation result set id. + + Example: + >>> from google.cloud.gapic.privacy.dlp.v2beta1 import dlp_service_client + >>> client = dlp_service_client.DlpServiceClient() + >>> name = client.result_path('[RESULT]') + >>> response = client.list_inspect_findings(name) + + Args: + name (string): Identifier of the results set returned as metadata of + the longrunning operation created by a call to CreateInspectOperation. + Should be in the format of ``inspect/results/{id}. + page_size (int): Maximum number of results to return. + If 0, the implementation will select a reasonable value. + page_token (string): The value returned by the last ``ListInspectFindingsResponse``; indicates + that this is a continuation of a prior ``ListInspectFindings`` call, and that + the system should return the next page of data. + options (:class:`google.gax.CallOptions`): Overrides the default + settings for this call, e.g, timeout, retries etc. + + Returns: + A :class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.ListInspectFindingsResponse` instance. + + Raises: + :exc:`google.gax.errors.GaxError` if the RPC is aborted. + :exc:`ValueError` if the parameters are invalid. + """ + # Create the request object. + request = dlp_pb2.ListInspectFindingsRequest( + name=name, page_size=page_size, page_token=page_token) + return self._list_inspect_findings(request, options) + + def list_info_types(self, category, language_code, options=None): + """ + Returns sensitive information types for given category. + + Example: + >>> from google.cloud.gapic.privacy.dlp.v2beta1 import dlp_service_client + >>> client = dlp_service_client.DlpServiceClient() + >>> category = '' + >>> language_code = '' + >>> response = client.list_info_types(category, language_code) + + Args: + category (string): Category name as returned by ListRootCategories. + language_code (string): Optional BCP-47 language code for localized info type friendly + names. If omitted, or if localized strings are not available, + en-US strings will be returned. + options (:class:`google.gax.CallOptions`): Overrides the default + settings for this call, e.g, timeout, retries etc. + + Returns: + A :class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.ListInfoTypesResponse` instance. + + Raises: + :exc:`google.gax.errors.GaxError` if the RPC is aborted. + :exc:`ValueError` if the parameters are invalid. + """ + # Create the request object. + request = dlp_pb2.ListInfoTypesRequest( + category=category, language_code=language_code) + return self._list_info_types(request, options) + + def list_root_categories(self, language_code, options=None): + """ + Returns the list of root categories of sensitive information. + + Example: + >>> from google.cloud.gapic.privacy.dlp.v2beta1 import dlp_service_client + >>> client = dlp_service_client.DlpServiceClient() + >>> language_code = '' + >>> response = client.list_root_categories(language_code) + + Args: + language_code (string): Optional language code for localized friendly category names. + If omitted or if localized strings are not available, + en-US strings will be returned. + options (:class:`google.gax.CallOptions`): Overrides the default + settings for this call, e.g, timeout, retries etc. + + Returns: + A :class:`google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2.ListRootCategoriesResponse` instance. + + Raises: + :exc:`google.gax.errors.GaxError` if the RPC is aborted. + :exc:`ValueError` if the parameters are invalid. + """ + # Create the request object. + request = dlp_pb2.ListRootCategoriesRequest( + language_code=language_code) + return self._list_root_categories(request, options) diff --git a/dlp/google/cloud/gapic/privacy/dlp/v2beta1/dlp_service_client_config.json b/dlp/google/cloud/gapic/privacy/dlp/v2beta1/dlp_service_client_config.json new file mode 100644 index 000000000000..0e7d58accfe5 --- /dev/null +++ b/dlp/google/cloud/gapic/privacy/dlp/v2beta1/dlp_service_client_config.json @@ -0,0 +1,58 @@ +{ + "interfaces": { + "google.privacy.dlp.v2beta1.DlpService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "InspectContent": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RedactContent": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateInspectOperation": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListInspectFindings": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListInfoTypes": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListRootCategories": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/dlp/google/cloud/gapic/privacy/dlp/v2beta1/enums.py b/dlp/google/cloud/gapic/privacy/dlp/v2beta1/enums.py new file mode 100644 index 000000000000..5964dfcae254 --- /dev/null +++ b/dlp/google/cloud/gapic/privacy/dlp/v2beta1/enums.py @@ -0,0 +1,35 @@ +# Copyright 2016 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Wrappers for protocol buffer enum types.""" + + +class Likelihood(object): + """ + Categorization of results based on how likely they are to represent a match, + based on the number of elements they contain which imply a match. + + Attributes: + LIKELIHOOD_UNSPECIFIED (int): Default value; information with all likelihoods will be included. + VERY_UNLIKELY (int): Few matching elements. + UNLIKELY (int) + POSSIBLE (int): Some matching elements. + LIKELY (int) + VERY_LIKELY (int): Many matching elements. + """ + LIKELIHOOD_UNSPECIFIED = 0 + VERY_UNLIKELY = 1 + UNLIKELY = 2 + POSSIBLE = 3 + LIKELY = 4 + VERY_LIKELY = 5 diff --git a/dlp/google/cloud/proto/__init__.py b/dlp/google/cloud/proto/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/dlp/google/cloud/proto/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/dlp/google/cloud/proto/privacy/__init__.py b/dlp/google/cloud/proto/privacy/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/dlp/google/cloud/proto/privacy/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/dlp/google/cloud/proto/privacy/dlp/__init__.py b/dlp/google/cloud/proto/privacy/dlp/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/dlp/google/cloud/proto/privacy/dlp/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/dlp/google/cloud/proto/privacy/dlp/v2beta1/__init__.py b/dlp/google/cloud/proto/privacy/dlp/v2beta1/__init__.py new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/dlp/google/cloud/proto/privacy/dlp/v2beta1/__init__.py @@ -0,0 +1 @@ + diff --git a/dlp/google/cloud/proto/privacy/dlp/v2beta1/dlp_pb2.py b/dlp/google/cloud/proto/privacy/dlp/v2beta1/dlp_pb2.py new file mode 100644 index 000000000000..c0f79fd52d97 --- /dev/null +++ b/dlp/google/cloud/proto/privacy/dlp/v2beta1/dlp_pb2.py @@ -0,0 +1,1686 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/proto/privacy/dlp/v2beta1/dlp.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.longrunning import operations_pb2 as google_dot_longrunning_dot_operations__pb2 +from google.cloud.proto.privacy.dlp.v2beta1 import storage_pb2 as google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='google/cloud/proto/privacy/dlp/v2beta1/dlp.proto', + package='google.privacy.dlp.v2beta1', + syntax='proto3', + serialized_pb=_b('\n0google/cloud/proto/privacy/dlp/v2beta1/dlp.proto\x12\x1agoogle.privacy.dlp.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a#google/longrunning/operations.proto\x1a\x34google/cloud/proto/privacy/dlp/v2beta1/storage.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcd\x01\n\rInspectConfig\x12\x38\n\ninfo_types\x18\x01 \x03(\x0b\x32$.google.privacy.dlp.v2beta1.InfoType\x12>\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32&.google.privacy.dlp.v2beta1.Likelihood\x12\x14\n\x0cmax_findings\x18\x03 \x01(\x05\x12\x15\n\rinclude_quote\x18\x04 \x01(\x08\x12\x15\n\rexclude_types\x18\x06 \x01(\x08\"I\n\x0b\x43ontentItem\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0e\n\x04\x64\x61ta\x18\x02 \x01(\x0cH\x00\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x42\x0b\n\tdata_item\"b\n\rInspectResult\x12\x35\n\x08\x66indings\x18\x01 \x03(\x0b\x32#.google.privacy.dlp.v2beta1.Finding\x12\x1a\n\x12\x66indings_truncated\x18\x02 \x01(\x08\"\xf6\x01\n\x07\x46inding\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x37\n\tinfo_type\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2beta1.InfoType\x12:\n\nlikelihood\x18\x03 \x01(\x0e\x32&.google.privacy.dlp.v2beta1.Likelihood\x12\x36\n\x08location\x18\x04 \x01(\x0b\x32$.google.privacy.dlp.v2beta1.Location\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xaf\x02\n\x08Location\x12\x35\n\nbyte_range\x18\x01 \x01(\x0b\x32!.google.privacy.dlp.v2beta1.Range\x12:\n\x0f\x63odepoint_range\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2beta1.Range\x12>\n\x0bimage_boxes\x18\x03 \x03(\x0b\x32).google.privacy.dlp.v2beta1.ImageLocation\x12\x39\n\nrecord_key\x18\x04 \x01(\x0b\x32%.google.privacy.dlp.v2beta1.RecordKey\x12\x35\n\x08\x66ield_id\x18\x05 \x01(\x0b\x32#.google.privacy.dlp.v2beta1.FieldId\"#\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"I\n\rImageLocation\x12\x0b\n\x03top\x18\x01 \x01(\x05\x12\x0c\n\x04left\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xca\x02\n\x14RedactContentRequest\x12\x41\n\x0einspect_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2beta1.InspectConfig\x12\x36\n\x05items\x18\x02 \x03(\x0b\x32\'.google.privacy.dlp.v2beta1.ContentItem\x12W\n\x0freplace_configs\x18\x03 \x03(\x0b\x32>.google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig\x1a^\n\rReplaceConfig\x12\x37\n\tinfo_type\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2beta1.InfoType\x12\x14\n\x0creplace_with\x18\x02 \x01(\t\"O\n\x15RedactContentResponse\x12\x36\n\x05items\x18\x01 \x03(\x0b\x32\'.google.privacy.dlp.v2beta1.ContentItem\"\x92\x01\n\x15InspectContentRequest\x12\x41\n\x0einspect_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2beta1.InspectConfig\x12\x36\n\x05items\x18\x02 \x03(\x0b\x32\'.google.privacy.dlp.v2beta1.ContentItem\"T\n\x16InspectContentResponse\x12:\n\x07results\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2beta1.InspectResult\"\xed\x01\n\x1d\x43reateInspectOperationRequest\x12\x41\n\x0einspect_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2beta1.InspectConfig\x12\x41\n\x0estorage_config\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2beta1.StorageConfig\x12\x46\n\routput_config\x18\x03 \x01(\x0b\x32/.google.privacy.dlp.v2beta1.OutputStorageConfig\"c\n\x13OutputStorageConfig\x12\x44\n\x0cstorage_path\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2beta1.CloudStoragePathH\x00\x42\x06\n\x04type\"\\\n\x12InfoTypeStatistics\x12\x37\n\tinfo_type\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2beta1.InfoType\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xb2\x03\n\x18InspectOperationMetadata\x12\x17\n\x0fprocessed_bytes\x18\x01 \x01(\x03\x12\x1d\n\x15total_estimated_bytes\x18\x04 \x01(\x03\x12G\n\x0finfo_type_stats\x18\x02 \x03(\x0b\x32..google.privacy.dlp.v2beta1.InfoTypeStatistics\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x16request_inspect_config\x18\x05 \x01(\x0b\x32).google.privacy.dlp.v2beta1.InspectConfig\x12I\n\x16request_storage_config\x18\x06 \x01(\x0b\x32).google.privacy.dlp.v2beta1.StorageConfig\x12N\n\x15request_output_config\x18\x07 \x01(\x0b\x32/.google.privacy.dlp.v2beta1.OutputStorageConfig\"&\n\x16InspectOperationResult\x12\x0c\n\x04name\x18\x01 \x01(\t\"Q\n\x1aListInspectFindingsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"q\n\x1bListInspectFindingsResponse\x12\x39\n\x06result\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2beta1.InspectResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"~\n\x13InfoTypeDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x43\n\ncategories\x18\x03 \x03(\x0b\x32/.google.privacy.dlp.v2beta1.CategoryDescription\"?\n\x14ListInfoTypesRequest\x12\x10\n\x08\x63\x61tegory\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\"\\\n\x15ListInfoTypesResponse\x12\x43\n\ninfo_types\x18\x01 \x03(\x0b\x32/.google.privacy.dlp.v2beta1.InfoTypeDescription\"9\n\x13\x43\x61tegoryDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"2\n\x19ListRootCategoriesRequest\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\"a\n\x1aListRootCategoriesResponse\x12\x43\n\ncategories\x18\x01 \x03(\x0b\x32/.google.privacy.dlp.v2beta1.CategoryDescription*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xf6\x07\n\nDlpService\x12\x9c\x01\n\x0eInspectContent\x12\x31.google.privacy.dlp.v2beta1.InspectContentRequest\x1a\x32.google.privacy.dlp.v2beta1.InspectContentResponse\"#\x82\xd3\xe4\x93\x02\x1d\"\x18/v2beta1/content:inspect:\x01*\x12\x98\x01\n\rRedactContent\x12\x30.google.privacy.dlp.v2beta1.RedactContentRequest\x1a\x31.google.privacy.dlp.v2beta1.RedactContentResponse\"\"\x82\xd3\xe4\x93\x02\x1c\"\x17/v2beta1/content:redact:\x01*\x12\x9a\x01\n\x16\x43reateInspectOperation\x12\x39.google.privacy.dlp.v2beta1.CreateInspectOperationRequest\x1a\x1d.google.longrunning.Operation\"&\x82\xd3\xe4\x93\x02 \"\x1b/v2beta1/inspect/operations:\x01*\x12\xba\x01\n\x13ListInspectFindings\x12\x36.google.privacy.dlp.v2beta1.ListInspectFindingsRequest\x1a\x37.google.privacy.dlp.v2beta1.ListInspectFindingsResponse\"2\x82\xd3\xe4\x93\x02,\x12*/v2beta1/{name=inspect/results/*}/findings\x12\xac\x01\n\rListInfoTypes\x12\x30.google.privacy.dlp.v2beta1.ListInfoTypesRequest\x1a\x31.google.privacy.dlp.v2beta1.ListInfoTypesResponse\"6\x82\xd3\xe4\x93\x02\x30\x12./v2beta1/rootCategories/{category=*}/infoTypes\x12\xa4\x01\n\x12ListRootCategories\x12\x35.google.privacy.dlp.v2beta1.ListRootCategoriesRequest\x1a\x36.google.privacy.dlp.v2beta1.ListRootCategoriesResponse\"\x1f\x82\xd3\xe4\x93\x02\x19\x12\x17/v2beta1/rootCategoriesBk\n\x1e\x63om.google.privacy.dlp.v2beta1B\x08\x44lpProtoP\x01Z=google.golang.org/genproto/googleapis/privacy/dlp/v2beta1;dlpb\x06proto3') + , + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_longrunning_dot_operations__pb2.DESCRIPTOR,google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +_LIKELIHOOD = _descriptor.EnumDescriptor( + name='Likelihood', + full_name='google.privacy.dlp.v2beta1.Likelihood', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='LIKELIHOOD_UNSPECIFIED', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='VERY_UNLIKELY', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UNLIKELY', index=2, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='POSSIBLE', index=3, number=3, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='LIKELY', index=4, number=4, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='VERY_LIKELY', index=5, number=5, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=3540, + serialized_end=3656, +) +_sym_db.RegisterEnumDescriptor(_LIKELIHOOD) + +Likelihood = enum_type_wrapper.EnumTypeWrapper(_LIKELIHOOD) +LIKELIHOOD_UNSPECIFIED = 0 +VERY_UNLIKELY = 1 +UNLIKELY = 2 +POSSIBLE = 3 +LIKELY = 4 +VERY_LIKELY = 5 + + + +_INSPECTCONFIG = _descriptor.Descriptor( + name='InspectConfig', + full_name='google.privacy.dlp.v2beta1.InspectConfig', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='info_types', full_name='google.privacy.dlp.v2beta1.InspectConfig.info_types', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='min_likelihood', full_name='google.privacy.dlp.v2beta1.InspectConfig.min_likelihood', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='max_findings', full_name='google.privacy.dlp.v2beta1.InspectConfig.max_findings', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='include_quote', full_name='google.privacy.dlp.v2beta1.InspectConfig.include_quote', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='exclude_types', full_name='google.privacy.dlp.v2beta1.InspectConfig.exclude_types', index=4, + number=6, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=235, + serialized_end=440, +) + + +_CONTENTITEM = _descriptor.Descriptor( + name='ContentItem', + full_name='google.privacy.dlp.v2beta1.ContentItem', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='google.privacy.dlp.v2beta1.ContentItem.type', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='data', full_name='google.privacy.dlp.v2beta1.ContentItem.data', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='google.privacy.dlp.v2beta1.ContentItem.value', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='data_item', full_name='google.privacy.dlp.v2beta1.ContentItem.data_item', + index=0, containing_type=None, fields=[]), + ], + serialized_start=442, + serialized_end=515, +) + + +_INSPECTRESULT = _descriptor.Descriptor( + name='InspectResult', + full_name='google.privacy.dlp.v2beta1.InspectResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='findings', full_name='google.privacy.dlp.v2beta1.InspectResult.findings', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='findings_truncated', full_name='google.privacy.dlp.v2beta1.InspectResult.findings_truncated', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=517, + serialized_end=615, +) + + +_FINDING = _descriptor.Descriptor( + name='Finding', + full_name='google.privacy.dlp.v2beta1.Finding', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='quote', full_name='google.privacy.dlp.v2beta1.Finding.quote', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='info_type', full_name='google.privacy.dlp.v2beta1.Finding.info_type', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='likelihood', full_name='google.privacy.dlp.v2beta1.Finding.likelihood', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='location', full_name='google.privacy.dlp.v2beta1.Finding.location', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='create_time', full_name='google.privacy.dlp.v2beta1.Finding.create_time', index=4, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=618, + serialized_end=864, +) + + +_LOCATION = _descriptor.Descriptor( + name='Location', + full_name='google.privacy.dlp.v2beta1.Location', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='byte_range', full_name='google.privacy.dlp.v2beta1.Location.byte_range', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='codepoint_range', full_name='google.privacy.dlp.v2beta1.Location.codepoint_range', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='image_boxes', full_name='google.privacy.dlp.v2beta1.Location.image_boxes', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='record_key', full_name='google.privacy.dlp.v2beta1.Location.record_key', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='field_id', full_name='google.privacy.dlp.v2beta1.Location.field_id', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=867, + serialized_end=1170, +) + + +_RANGE = _descriptor.Descriptor( + name='Range', + full_name='google.privacy.dlp.v2beta1.Range', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='start', full_name='google.privacy.dlp.v2beta1.Range.start', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='end', full_name='google.privacy.dlp.v2beta1.Range.end', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1172, + serialized_end=1207, +) + + +_IMAGELOCATION = _descriptor.Descriptor( + name='ImageLocation', + full_name='google.privacy.dlp.v2beta1.ImageLocation', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='top', full_name='google.privacy.dlp.v2beta1.ImageLocation.top', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='left', full_name='google.privacy.dlp.v2beta1.ImageLocation.left', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='width', full_name='google.privacy.dlp.v2beta1.ImageLocation.width', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='height', full_name='google.privacy.dlp.v2beta1.ImageLocation.height', index=3, + number=4, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1209, + serialized_end=1282, +) + + +_REDACTCONTENTREQUEST_REPLACECONFIG = _descriptor.Descriptor( + name='ReplaceConfig', + full_name='google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='info_type', full_name='google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig.info_type', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='replace_with', full_name='google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig.replace_with', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1521, + serialized_end=1615, +) + +_REDACTCONTENTREQUEST = _descriptor.Descriptor( + name='RedactContentRequest', + full_name='google.privacy.dlp.v2beta1.RedactContentRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='inspect_config', full_name='google.privacy.dlp.v2beta1.RedactContentRequest.inspect_config', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='items', full_name='google.privacy.dlp.v2beta1.RedactContentRequest.items', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='replace_configs', full_name='google.privacy.dlp.v2beta1.RedactContentRequest.replace_configs', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_REDACTCONTENTREQUEST_REPLACECONFIG, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1285, + serialized_end=1615, +) + + +_REDACTCONTENTRESPONSE = _descriptor.Descriptor( + name='RedactContentResponse', + full_name='google.privacy.dlp.v2beta1.RedactContentResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='items', full_name='google.privacy.dlp.v2beta1.RedactContentResponse.items', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1617, + serialized_end=1696, +) + + +_INSPECTCONTENTREQUEST = _descriptor.Descriptor( + name='InspectContentRequest', + full_name='google.privacy.dlp.v2beta1.InspectContentRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='inspect_config', full_name='google.privacy.dlp.v2beta1.InspectContentRequest.inspect_config', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='items', full_name='google.privacy.dlp.v2beta1.InspectContentRequest.items', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1699, + serialized_end=1845, +) + + +_INSPECTCONTENTRESPONSE = _descriptor.Descriptor( + name='InspectContentResponse', + full_name='google.privacy.dlp.v2beta1.InspectContentResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='results', full_name='google.privacy.dlp.v2beta1.InspectContentResponse.results', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1847, + serialized_end=1931, +) + + +_CREATEINSPECTOPERATIONREQUEST = _descriptor.Descriptor( + name='CreateInspectOperationRequest', + full_name='google.privacy.dlp.v2beta1.CreateInspectOperationRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='inspect_config', full_name='google.privacy.dlp.v2beta1.CreateInspectOperationRequest.inspect_config', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='storage_config', full_name='google.privacy.dlp.v2beta1.CreateInspectOperationRequest.storage_config', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='output_config', full_name='google.privacy.dlp.v2beta1.CreateInspectOperationRequest.output_config', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1934, + serialized_end=2171, +) + + +_OUTPUTSTORAGECONFIG = _descriptor.Descriptor( + name='OutputStorageConfig', + full_name='google.privacy.dlp.v2beta1.OutputStorageConfig', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='storage_path', full_name='google.privacy.dlp.v2beta1.OutputStorageConfig.storage_path', index=0, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='type', full_name='google.privacy.dlp.v2beta1.OutputStorageConfig.type', + index=0, containing_type=None, fields=[]), + ], + serialized_start=2173, + serialized_end=2272, +) + + +_INFOTYPESTATISTICS = _descriptor.Descriptor( + name='InfoTypeStatistics', + full_name='google.privacy.dlp.v2beta1.InfoTypeStatistics', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='info_type', full_name='google.privacy.dlp.v2beta1.InfoTypeStatistics.info_type', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='count', full_name='google.privacy.dlp.v2beta1.InfoTypeStatistics.count', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2274, + serialized_end=2366, +) + + +_INSPECTOPERATIONMETADATA = _descriptor.Descriptor( + name='InspectOperationMetadata', + full_name='google.privacy.dlp.v2beta1.InspectOperationMetadata', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='processed_bytes', full_name='google.privacy.dlp.v2beta1.InspectOperationMetadata.processed_bytes', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='total_estimated_bytes', full_name='google.privacy.dlp.v2beta1.InspectOperationMetadata.total_estimated_bytes', index=1, + number=4, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='info_type_stats', full_name='google.privacy.dlp.v2beta1.InspectOperationMetadata.info_type_stats', index=2, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='create_time', full_name='google.privacy.dlp.v2beta1.InspectOperationMetadata.create_time', index=3, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='request_inspect_config', full_name='google.privacy.dlp.v2beta1.InspectOperationMetadata.request_inspect_config', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='request_storage_config', full_name='google.privacy.dlp.v2beta1.InspectOperationMetadata.request_storage_config', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='request_output_config', full_name='google.privacy.dlp.v2beta1.InspectOperationMetadata.request_output_config', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2369, + serialized_end=2803, +) + + +_INSPECTOPERATIONRESULT = _descriptor.Descriptor( + name='InspectOperationResult', + full_name='google.privacy.dlp.v2beta1.InspectOperationResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.privacy.dlp.v2beta1.InspectOperationResult.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2805, + serialized_end=2843, +) + + +_LISTINSPECTFINDINGSREQUEST = _descriptor.Descriptor( + name='ListInspectFindingsRequest', + full_name='google.privacy.dlp.v2beta1.ListInspectFindingsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.privacy.dlp.v2beta1.ListInspectFindingsRequest.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='page_size', full_name='google.privacy.dlp.v2beta1.ListInspectFindingsRequest.page_size', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='page_token', full_name='google.privacy.dlp.v2beta1.ListInspectFindingsRequest.page_token', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2845, + serialized_end=2926, +) + + +_LISTINSPECTFINDINGSRESPONSE = _descriptor.Descriptor( + name='ListInspectFindingsResponse', + full_name='google.privacy.dlp.v2beta1.ListInspectFindingsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='result', full_name='google.privacy.dlp.v2beta1.ListInspectFindingsResponse.result', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='google.privacy.dlp.v2beta1.ListInspectFindingsResponse.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2928, + serialized_end=3041, +) + + +_INFOTYPEDESCRIPTION = _descriptor.Descriptor( + name='InfoTypeDescription', + full_name='google.privacy.dlp.v2beta1.InfoTypeDescription', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.privacy.dlp.v2beta1.InfoTypeDescription.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='display_name', full_name='google.privacy.dlp.v2beta1.InfoTypeDescription.display_name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='categories', full_name='google.privacy.dlp.v2beta1.InfoTypeDescription.categories', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3043, + serialized_end=3169, +) + + +_LISTINFOTYPESREQUEST = _descriptor.Descriptor( + name='ListInfoTypesRequest', + full_name='google.privacy.dlp.v2beta1.ListInfoTypesRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='category', full_name='google.privacy.dlp.v2beta1.ListInfoTypesRequest.category', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='language_code', full_name='google.privacy.dlp.v2beta1.ListInfoTypesRequest.language_code', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3171, + serialized_end=3234, +) + + +_LISTINFOTYPESRESPONSE = _descriptor.Descriptor( + name='ListInfoTypesResponse', + full_name='google.privacy.dlp.v2beta1.ListInfoTypesResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='info_types', full_name='google.privacy.dlp.v2beta1.ListInfoTypesResponse.info_types', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3236, + serialized_end=3328, +) + + +_CATEGORYDESCRIPTION = _descriptor.Descriptor( + name='CategoryDescription', + full_name='google.privacy.dlp.v2beta1.CategoryDescription', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.privacy.dlp.v2beta1.CategoryDescription.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='display_name', full_name='google.privacy.dlp.v2beta1.CategoryDescription.display_name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3330, + serialized_end=3387, +) + + +_LISTROOTCATEGORIESREQUEST = _descriptor.Descriptor( + name='ListRootCategoriesRequest', + full_name='google.privacy.dlp.v2beta1.ListRootCategoriesRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='language_code', full_name='google.privacy.dlp.v2beta1.ListRootCategoriesRequest.language_code', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3389, + serialized_end=3439, +) + + +_LISTROOTCATEGORIESRESPONSE = _descriptor.Descriptor( + name='ListRootCategoriesResponse', + full_name='google.privacy.dlp.v2beta1.ListRootCategoriesResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='categories', full_name='google.privacy.dlp.v2beta1.ListRootCategoriesResponse.categories', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3441, + serialized_end=3538, +) + +_INSPECTCONFIG.fields_by_name['info_types'].message_type = google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2._INFOTYPE +_INSPECTCONFIG.fields_by_name['min_likelihood'].enum_type = _LIKELIHOOD +_CONTENTITEM.oneofs_by_name['data_item'].fields.append( + _CONTENTITEM.fields_by_name['data']) +_CONTENTITEM.fields_by_name['data'].containing_oneof = _CONTENTITEM.oneofs_by_name['data_item'] +_CONTENTITEM.oneofs_by_name['data_item'].fields.append( + _CONTENTITEM.fields_by_name['value']) +_CONTENTITEM.fields_by_name['value'].containing_oneof = _CONTENTITEM.oneofs_by_name['data_item'] +_INSPECTRESULT.fields_by_name['findings'].message_type = _FINDING +_FINDING.fields_by_name['info_type'].message_type = google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2._INFOTYPE +_FINDING.fields_by_name['likelihood'].enum_type = _LIKELIHOOD +_FINDING.fields_by_name['location'].message_type = _LOCATION +_FINDING.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOCATION.fields_by_name['byte_range'].message_type = _RANGE +_LOCATION.fields_by_name['codepoint_range'].message_type = _RANGE +_LOCATION.fields_by_name['image_boxes'].message_type = _IMAGELOCATION +_LOCATION.fields_by_name['record_key'].message_type = google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2._RECORDKEY +_LOCATION.fields_by_name['field_id'].message_type = google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2._FIELDID +_REDACTCONTENTREQUEST_REPLACECONFIG.fields_by_name['info_type'].message_type = google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2._INFOTYPE +_REDACTCONTENTREQUEST_REPLACECONFIG.containing_type = _REDACTCONTENTREQUEST +_REDACTCONTENTREQUEST.fields_by_name['inspect_config'].message_type = _INSPECTCONFIG +_REDACTCONTENTREQUEST.fields_by_name['items'].message_type = _CONTENTITEM +_REDACTCONTENTREQUEST.fields_by_name['replace_configs'].message_type = _REDACTCONTENTREQUEST_REPLACECONFIG +_REDACTCONTENTRESPONSE.fields_by_name['items'].message_type = _CONTENTITEM +_INSPECTCONTENTREQUEST.fields_by_name['inspect_config'].message_type = _INSPECTCONFIG +_INSPECTCONTENTREQUEST.fields_by_name['items'].message_type = _CONTENTITEM +_INSPECTCONTENTRESPONSE.fields_by_name['results'].message_type = _INSPECTRESULT +_CREATEINSPECTOPERATIONREQUEST.fields_by_name['inspect_config'].message_type = _INSPECTCONFIG +_CREATEINSPECTOPERATIONREQUEST.fields_by_name['storage_config'].message_type = google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2._STORAGECONFIG +_CREATEINSPECTOPERATIONREQUEST.fields_by_name['output_config'].message_type = _OUTPUTSTORAGECONFIG +_OUTPUTSTORAGECONFIG.fields_by_name['storage_path'].message_type = google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2._CLOUDSTORAGEPATH +_OUTPUTSTORAGECONFIG.oneofs_by_name['type'].fields.append( + _OUTPUTSTORAGECONFIG.fields_by_name['storage_path']) +_OUTPUTSTORAGECONFIG.fields_by_name['storage_path'].containing_oneof = _OUTPUTSTORAGECONFIG.oneofs_by_name['type'] +_INFOTYPESTATISTICS.fields_by_name['info_type'].message_type = google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2._INFOTYPE +_INSPECTOPERATIONMETADATA.fields_by_name['info_type_stats'].message_type = _INFOTYPESTATISTICS +_INSPECTOPERATIONMETADATA.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_INSPECTOPERATIONMETADATA.fields_by_name['request_inspect_config'].message_type = _INSPECTCONFIG +_INSPECTOPERATIONMETADATA.fields_by_name['request_storage_config'].message_type = google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_storage__pb2._STORAGECONFIG +_INSPECTOPERATIONMETADATA.fields_by_name['request_output_config'].message_type = _OUTPUTSTORAGECONFIG +_LISTINSPECTFINDINGSRESPONSE.fields_by_name['result'].message_type = _INSPECTRESULT +_INFOTYPEDESCRIPTION.fields_by_name['categories'].message_type = _CATEGORYDESCRIPTION +_LISTINFOTYPESRESPONSE.fields_by_name['info_types'].message_type = _INFOTYPEDESCRIPTION +_LISTROOTCATEGORIESRESPONSE.fields_by_name['categories'].message_type = _CATEGORYDESCRIPTION +DESCRIPTOR.message_types_by_name['InspectConfig'] = _INSPECTCONFIG +DESCRIPTOR.message_types_by_name['ContentItem'] = _CONTENTITEM +DESCRIPTOR.message_types_by_name['InspectResult'] = _INSPECTRESULT +DESCRIPTOR.message_types_by_name['Finding'] = _FINDING +DESCRIPTOR.message_types_by_name['Location'] = _LOCATION +DESCRIPTOR.message_types_by_name['Range'] = _RANGE +DESCRIPTOR.message_types_by_name['ImageLocation'] = _IMAGELOCATION +DESCRIPTOR.message_types_by_name['RedactContentRequest'] = _REDACTCONTENTREQUEST +DESCRIPTOR.message_types_by_name['RedactContentResponse'] = _REDACTCONTENTRESPONSE +DESCRIPTOR.message_types_by_name['InspectContentRequest'] = _INSPECTCONTENTREQUEST +DESCRIPTOR.message_types_by_name['InspectContentResponse'] = _INSPECTCONTENTRESPONSE +DESCRIPTOR.message_types_by_name['CreateInspectOperationRequest'] = _CREATEINSPECTOPERATIONREQUEST +DESCRIPTOR.message_types_by_name['OutputStorageConfig'] = _OUTPUTSTORAGECONFIG +DESCRIPTOR.message_types_by_name['InfoTypeStatistics'] = _INFOTYPESTATISTICS +DESCRIPTOR.message_types_by_name['InspectOperationMetadata'] = _INSPECTOPERATIONMETADATA +DESCRIPTOR.message_types_by_name['InspectOperationResult'] = _INSPECTOPERATIONRESULT +DESCRIPTOR.message_types_by_name['ListInspectFindingsRequest'] = _LISTINSPECTFINDINGSREQUEST +DESCRIPTOR.message_types_by_name['ListInspectFindingsResponse'] = _LISTINSPECTFINDINGSRESPONSE +DESCRIPTOR.message_types_by_name['InfoTypeDescription'] = _INFOTYPEDESCRIPTION +DESCRIPTOR.message_types_by_name['ListInfoTypesRequest'] = _LISTINFOTYPESREQUEST +DESCRIPTOR.message_types_by_name['ListInfoTypesResponse'] = _LISTINFOTYPESRESPONSE +DESCRIPTOR.message_types_by_name['CategoryDescription'] = _CATEGORYDESCRIPTION +DESCRIPTOR.message_types_by_name['ListRootCategoriesRequest'] = _LISTROOTCATEGORIESREQUEST +DESCRIPTOR.message_types_by_name['ListRootCategoriesResponse'] = _LISTROOTCATEGORIESRESPONSE +DESCRIPTOR.enum_types_by_name['Likelihood'] = _LIKELIHOOD + +InspectConfig = _reflection.GeneratedProtocolMessageType('InspectConfig', (_message.Message,), dict( + DESCRIPTOR = _INSPECTCONFIG, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.InspectConfig) + )) +_sym_db.RegisterMessage(InspectConfig) + +ContentItem = _reflection.GeneratedProtocolMessageType('ContentItem', (_message.Message,), dict( + DESCRIPTOR = _CONTENTITEM, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.ContentItem) + )) +_sym_db.RegisterMessage(ContentItem) + +InspectResult = _reflection.GeneratedProtocolMessageType('InspectResult', (_message.Message,), dict( + DESCRIPTOR = _INSPECTRESULT, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.InspectResult) + )) +_sym_db.RegisterMessage(InspectResult) + +Finding = _reflection.GeneratedProtocolMessageType('Finding', (_message.Message,), dict( + DESCRIPTOR = _FINDING, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.Finding) + )) +_sym_db.RegisterMessage(Finding) + +Location = _reflection.GeneratedProtocolMessageType('Location', (_message.Message,), dict( + DESCRIPTOR = _LOCATION, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.Location) + )) +_sym_db.RegisterMessage(Location) + +Range = _reflection.GeneratedProtocolMessageType('Range', (_message.Message,), dict( + DESCRIPTOR = _RANGE, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.Range) + )) +_sym_db.RegisterMessage(Range) + +ImageLocation = _reflection.GeneratedProtocolMessageType('ImageLocation', (_message.Message,), dict( + DESCRIPTOR = _IMAGELOCATION, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.ImageLocation) + )) +_sym_db.RegisterMessage(ImageLocation) + +RedactContentRequest = _reflection.GeneratedProtocolMessageType('RedactContentRequest', (_message.Message,), dict( + + ReplaceConfig = _reflection.GeneratedProtocolMessageType('ReplaceConfig', (_message.Message,), dict( + DESCRIPTOR = _REDACTCONTENTREQUEST_REPLACECONFIG, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig) + )) + , + DESCRIPTOR = _REDACTCONTENTREQUEST, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.RedactContentRequest) + )) +_sym_db.RegisterMessage(RedactContentRequest) +_sym_db.RegisterMessage(RedactContentRequest.ReplaceConfig) + +RedactContentResponse = _reflection.GeneratedProtocolMessageType('RedactContentResponse', (_message.Message,), dict( + DESCRIPTOR = _REDACTCONTENTRESPONSE, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.RedactContentResponse) + )) +_sym_db.RegisterMessage(RedactContentResponse) + +InspectContentRequest = _reflection.GeneratedProtocolMessageType('InspectContentRequest', (_message.Message,), dict( + DESCRIPTOR = _INSPECTCONTENTREQUEST, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.InspectContentRequest) + )) +_sym_db.RegisterMessage(InspectContentRequest) + +InspectContentResponse = _reflection.GeneratedProtocolMessageType('InspectContentResponse', (_message.Message,), dict( + DESCRIPTOR = _INSPECTCONTENTRESPONSE, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.InspectContentResponse) + )) +_sym_db.RegisterMessage(InspectContentResponse) + +CreateInspectOperationRequest = _reflection.GeneratedProtocolMessageType('CreateInspectOperationRequest', (_message.Message,), dict( + DESCRIPTOR = _CREATEINSPECTOPERATIONREQUEST, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.CreateInspectOperationRequest) + )) +_sym_db.RegisterMessage(CreateInspectOperationRequest) + +OutputStorageConfig = _reflection.GeneratedProtocolMessageType('OutputStorageConfig', (_message.Message,), dict( + DESCRIPTOR = _OUTPUTSTORAGECONFIG, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.OutputStorageConfig) + )) +_sym_db.RegisterMessage(OutputStorageConfig) + +InfoTypeStatistics = _reflection.GeneratedProtocolMessageType('InfoTypeStatistics', (_message.Message,), dict( + DESCRIPTOR = _INFOTYPESTATISTICS, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.InfoTypeStatistics) + )) +_sym_db.RegisterMessage(InfoTypeStatistics) + +InspectOperationMetadata = _reflection.GeneratedProtocolMessageType('InspectOperationMetadata', (_message.Message,), dict( + DESCRIPTOR = _INSPECTOPERATIONMETADATA, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.InspectOperationMetadata) + )) +_sym_db.RegisterMessage(InspectOperationMetadata) + +InspectOperationResult = _reflection.GeneratedProtocolMessageType('InspectOperationResult', (_message.Message,), dict( + DESCRIPTOR = _INSPECTOPERATIONRESULT, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.InspectOperationResult) + )) +_sym_db.RegisterMessage(InspectOperationResult) + +ListInspectFindingsRequest = _reflection.GeneratedProtocolMessageType('ListInspectFindingsRequest', (_message.Message,), dict( + DESCRIPTOR = _LISTINSPECTFINDINGSREQUEST, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.ListInspectFindingsRequest) + )) +_sym_db.RegisterMessage(ListInspectFindingsRequest) + +ListInspectFindingsResponse = _reflection.GeneratedProtocolMessageType('ListInspectFindingsResponse', (_message.Message,), dict( + DESCRIPTOR = _LISTINSPECTFINDINGSRESPONSE, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.ListInspectFindingsResponse) + )) +_sym_db.RegisterMessage(ListInspectFindingsResponse) + +InfoTypeDescription = _reflection.GeneratedProtocolMessageType('InfoTypeDescription', (_message.Message,), dict( + DESCRIPTOR = _INFOTYPEDESCRIPTION, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.InfoTypeDescription) + )) +_sym_db.RegisterMessage(InfoTypeDescription) + +ListInfoTypesRequest = _reflection.GeneratedProtocolMessageType('ListInfoTypesRequest', (_message.Message,), dict( + DESCRIPTOR = _LISTINFOTYPESREQUEST, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.ListInfoTypesRequest) + )) +_sym_db.RegisterMessage(ListInfoTypesRequest) + +ListInfoTypesResponse = _reflection.GeneratedProtocolMessageType('ListInfoTypesResponse', (_message.Message,), dict( + DESCRIPTOR = _LISTINFOTYPESRESPONSE, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.ListInfoTypesResponse) + )) +_sym_db.RegisterMessage(ListInfoTypesResponse) + +CategoryDescription = _reflection.GeneratedProtocolMessageType('CategoryDescription', (_message.Message,), dict( + DESCRIPTOR = _CATEGORYDESCRIPTION, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.CategoryDescription) + )) +_sym_db.RegisterMessage(CategoryDescription) + +ListRootCategoriesRequest = _reflection.GeneratedProtocolMessageType('ListRootCategoriesRequest', (_message.Message,), dict( + DESCRIPTOR = _LISTROOTCATEGORIESREQUEST, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.ListRootCategoriesRequest) + )) +_sym_db.RegisterMessage(ListRootCategoriesRequest) + +ListRootCategoriesResponse = _reflection.GeneratedProtocolMessageType('ListRootCategoriesResponse', (_message.Message,), dict( + DESCRIPTOR = _LISTROOTCATEGORIESRESPONSE, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.ListRootCategoriesResponse) + )) +_sym_db.RegisterMessage(ListRootCategoriesResponse) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\036com.google.privacy.dlp.v2beta1B\010DlpProtoP\001Z=google.golang.org/genproto/googleapis/privacy/dlp/v2beta1;dlp')) +try: + # THESE ELEMENTS WILL BE DEPRECATED. + # Please use the generated *_pb2_grpc.py files instead. + import grpc + from grpc.beta import implementations as beta_implementations + from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities + + + class DlpServiceStub(object): + """The DLP API is a service that allows clients + to detect the presence of Personally Identifiable Information (PII) and other + privacy-sensitive data in user-supplied, unstructured data streams, like text + blocks or images. + The service also includes methods for sensitive data redaction and + scheduling of data scans on Google Cloud Platform based data sets. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.InspectContent = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/InspectContent', + request_serializer=InspectContentRequest.SerializeToString, + response_deserializer=InspectContentResponse.FromString, + ) + self.RedactContent = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/RedactContent', + request_serializer=RedactContentRequest.SerializeToString, + response_deserializer=RedactContentResponse.FromString, + ) + self.CreateInspectOperation = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/CreateInspectOperation', + request_serializer=CreateInspectOperationRequest.SerializeToString, + response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, + ) + self.ListInspectFindings = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/ListInspectFindings', + request_serializer=ListInspectFindingsRequest.SerializeToString, + response_deserializer=ListInspectFindingsResponse.FromString, + ) + self.ListInfoTypes = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/ListInfoTypes', + request_serializer=ListInfoTypesRequest.SerializeToString, + response_deserializer=ListInfoTypesResponse.FromString, + ) + self.ListRootCategories = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/ListRootCategories', + request_serializer=ListRootCategoriesRequest.SerializeToString, + response_deserializer=ListRootCategoriesResponse.FromString, + ) + + + class DlpServiceServicer(object): + """The DLP API is a service that allows clients + to detect the presence of Personally Identifiable Information (PII) and other + privacy-sensitive data in user-supplied, unstructured data streams, like text + blocks or images. + The service also includes methods for sensitive data redaction and + scheduling of data scans on Google Cloud Platform based data sets. + """ + + def InspectContent(self, request, context): + """Find potentially sensitive info in a list of strings. + This method has limits on input size, processing time, and output size. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RedactContent(self, request, context): + """Redact potentially sensitive info from a list of strings. + This method has limits on input size, processing time, and output size. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateInspectOperation(self, request, context): + """Schedule a job scanning content in a Google Cloud Platform data repository. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListInspectFindings(self, request, context): + """Returns list of results for given inspect operation result set id. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListInfoTypes(self, request, context): + """Returns sensitive information types for given category. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListRootCategories(self, request, context): + """Returns the list of root categories of sensitive information. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + + def add_DlpServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'InspectContent': grpc.unary_unary_rpc_method_handler( + servicer.InspectContent, + request_deserializer=InspectContentRequest.FromString, + response_serializer=InspectContentResponse.SerializeToString, + ), + 'RedactContent': grpc.unary_unary_rpc_method_handler( + servicer.RedactContent, + request_deserializer=RedactContentRequest.FromString, + response_serializer=RedactContentResponse.SerializeToString, + ), + 'CreateInspectOperation': grpc.unary_unary_rpc_method_handler( + servicer.CreateInspectOperation, + request_deserializer=CreateInspectOperationRequest.FromString, + response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, + ), + 'ListInspectFindings': grpc.unary_unary_rpc_method_handler( + servicer.ListInspectFindings, + request_deserializer=ListInspectFindingsRequest.FromString, + response_serializer=ListInspectFindingsResponse.SerializeToString, + ), + 'ListInfoTypes': grpc.unary_unary_rpc_method_handler( + servicer.ListInfoTypes, + request_deserializer=ListInfoTypesRequest.FromString, + response_serializer=ListInfoTypesResponse.SerializeToString, + ), + 'ListRootCategories': grpc.unary_unary_rpc_method_handler( + servicer.ListRootCategories, + request_deserializer=ListRootCategoriesRequest.FromString, + response_serializer=ListRootCategoriesResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'google.privacy.dlp.v2beta1.DlpService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + class BetaDlpServiceServicer(object): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This class was generated + only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" + """The DLP API is a service that allows clients + to detect the presence of Personally Identifiable Information (PII) and other + privacy-sensitive data in user-supplied, unstructured data streams, like text + blocks or images. + The service also includes methods for sensitive data redaction and + scheduling of data scans on Google Cloud Platform based data sets. + """ + def InspectContent(self, request, context): + """Find potentially sensitive info in a list of strings. + This method has limits on input size, processing time, and output size. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def RedactContent(self, request, context): + """Redact potentially sensitive info from a list of strings. + This method has limits on input size, processing time, and output size. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def CreateInspectOperation(self, request, context): + """Schedule a job scanning content in a Google Cloud Platform data repository. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ListInspectFindings(self, request, context): + """Returns list of results for given inspect operation result set id. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ListInfoTypes(self, request, context): + """Returns sensitive information types for given category. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ListRootCategories(self, request, context): + """Returns the list of root categories of sensitive information. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + + class BetaDlpServiceStub(object): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This class was generated + only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" + """The DLP API is a service that allows clients + to detect the presence of Personally Identifiable Information (PII) and other + privacy-sensitive data in user-supplied, unstructured data streams, like text + blocks or images. + The service also includes methods for sensitive data redaction and + scheduling of data scans on Google Cloud Platform based data sets. + """ + def InspectContent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Find potentially sensitive info in a list of strings. + This method has limits on input size, processing time, and output size. + """ + raise NotImplementedError() + InspectContent.future = None + def RedactContent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Redact potentially sensitive info from a list of strings. + This method has limits on input size, processing time, and output size. + """ + raise NotImplementedError() + RedactContent.future = None + def CreateInspectOperation(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Schedule a job scanning content in a Google Cloud Platform data repository. + """ + raise NotImplementedError() + CreateInspectOperation.future = None + def ListInspectFindings(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Returns list of results for given inspect operation result set id. + """ + raise NotImplementedError() + ListInspectFindings.future = None + def ListInfoTypes(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Returns sensitive information types for given category. + """ + raise NotImplementedError() + ListInfoTypes.future = None + def ListRootCategories(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Returns the list of root categories of sensitive information. + """ + raise NotImplementedError() + ListRootCategories.future = None + + + def beta_create_DlpService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This function was + generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" + request_deserializers = { + ('google.privacy.dlp.v2beta1.DlpService', 'CreateInspectOperation'): CreateInspectOperationRequest.FromString, + ('google.privacy.dlp.v2beta1.DlpService', 'InspectContent'): InspectContentRequest.FromString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListInfoTypes'): ListInfoTypesRequest.FromString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListInspectFindings'): ListInspectFindingsRequest.FromString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListRootCategories'): ListRootCategoriesRequest.FromString, + ('google.privacy.dlp.v2beta1.DlpService', 'RedactContent'): RedactContentRequest.FromString, + } + response_serializers = { + ('google.privacy.dlp.v2beta1.DlpService', 'CreateInspectOperation'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, + ('google.privacy.dlp.v2beta1.DlpService', 'InspectContent'): InspectContentResponse.SerializeToString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListInfoTypes'): ListInfoTypesResponse.SerializeToString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListInspectFindings'): ListInspectFindingsResponse.SerializeToString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListRootCategories'): ListRootCategoriesResponse.SerializeToString, + ('google.privacy.dlp.v2beta1.DlpService', 'RedactContent'): RedactContentResponse.SerializeToString, + } + method_implementations = { + ('google.privacy.dlp.v2beta1.DlpService', 'CreateInspectOperation'): face_utilities.unary_unary_inline(servicer.CreateInspectOperation), + ('google.privacy.dlp.v2beta1.DlpService', 'InspectContent'): face_utilities.unary_unary_inline(servicer.InspectContent), + ('google.privacy.dlp.v2beta1.DlpService', 'ListInfoTypes'): face_utilities.unary_unary_inline(servicer.ListInfoTypes), + ('google.privacy.dlp.v2beta1.DlpService', 'ListInspectFindings'): face_utilities.unary_unary_inline(servicer.ListInspectFindings), + ('google.privacy.dlp.v2beta1.DlpService', 'ListRootCategories'): face_utilities.unary_unary_inline(servicer.ListRootCategories), + ('google.privacy.dlp.v2beta1.DlpService', 'RedactContent'): face_utilities.unary_unary_inline(servicer.RedactContent), + } + server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) + return beta_implementations.server(method_implementations, options=server_options) + + + def beta_create_DlpService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This function was + generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" + request_serializers = { + ('google.privacy.dlp.v2beta1.DlpService', 'CreateInspectOperation'): CreateInspectOperationRequest.SerializeToString, + ('google.privacy.dlp.v2beta1.DlpService', 'InspectContent'): InspectContentRequest.SerializeToString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListInfoTypes'): ListInfoTypesRequest.SerializeToString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListInspectFindings'): ListInspectFindingsRequest.SerializeToString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListRootCategories'): ListRootCategoriesRequest.SerializeToString, + ('google.privacy.dlp.v2beta1.DlpService', 'RedactContent'): RedactContentRequest.SerializeToString, + } + response_deserializers = { + ('google.privacy.dlp.v2beta1.DlpService', 'CreateInspectOperation'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, + ('google.privacy.dlp.v2beta1.DlpService', 'InspectContent'): InspectContentResponse.FromString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListInfoTypes'): ListInfoTypesResponse.FromString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListInspectFindings'): ListInspectFindingsResponse.FromString, + ('google.privacy.dlp.v2beta1.DlpService', 'ListRootCategories'): ListRootCategoriesResponse.FromString, + ('google.privacy.dlp.v2beta1.DlpService', 'RedactContent'): RedactContentResponse.FromString, + } + cardinalities = { + 'CreateInspectOperation': cardinality.Cardinality.UNARY_UNARY, + 'InspectContent': cardinality.Cardinality.UNARY_UNARY, + 'ListInfoTypes': cardinality.Cardinality.UNARY_UNARY, + 'ListInspectFindings': cardinality.Cardinality.UNARY_UNARY, + 'ListRootCategories': cardinality.Cardinality.UNARY_UNARY, + 'RedactContent': cardinality.Cardinality.UNARY_UNARY, + } + stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) + return beta_implementations.dynamic_stub(channel, 'google.privacy.dlp.v2beta1.DlpService', cardinalities, options=stub_options) +except ImportError: + pass +# @@protoc_insertion_point(module_scope) diff --git a/dlp/google/cloud/proto/privacy/dlp/v2beta1/dlp_pb2_grpc.py b/dlp/google/cloud/proto/privacy/dlp/v2beta1/dlp_pb2_grpc.py new file mode 100644 index 000000000000..4a30465f7d61 --- /dev/null +++ b/dlp/google/cloud/proto/privacy/dlp/v2beta1/dlp_pb2_grpc.py @@ -0,0 +1,144 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc + +import google.cloud.proto.privacy.dlp.v2beta1.dlp_pb2 as google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2 +import google.longrunning.operations_pb2 as google_dot_longrunning_dot_operations__pb2 + + +class DlpServiceStub(object): + """The DLP API is a service that allows clients + to detect the presence of Personally Identifiable Information (PII) and other + privacy-sensitive data in user-supplied, unstructured data streams, like text + blocks or images. + The service also includes methods for sensitive data redaction and + scheduling of data scans on Google Cloud Platform based data sets. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.InspectContent = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/InspectContent', + request_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.InspectContentRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.InspectContentResponse.FromString, + ) + self.RedactContent = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/RedactContent', + request_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.RedactContentRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.RedactContentResponse.FromString, + ) + self.CreateInspectOperation = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/CreateInspectOperation', + request_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.CreateInspectOperationRequest.SerializeToString, + response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, + ) + self.ListInspectFindings = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/ListInspectFindings', + request_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListInspectFindingsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListInspectFindingsResponse.FromString, + ) + self.ListInfoTypes = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/ListInfoTypes', + request_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListInfoTypesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListInfoTypesResponse.FromString, + ) + self.ListRootCategories = channel.unary_unary( + '/google.privacy.dlp.v2beta1.DlpService/ListRootCategories', + request_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListRootCategoriesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListRootCategoriesResponse.FromString, + ) + + +class DlpServiceServicer(object): + """The DLP API is a service that allows clients + to detect the presence of Personally Identifiable Information (PII) and other + privacy-sensitive data in user-supplied, unstructured data streams, like text + blocks or images. + The service also includes methods for sensitive data redaction and + scheduling of data scans on Google Cloud Platform based data sets. + """ + + def InspectContent(self, request, context): + """Find potentially sensitive info in a list of strings. + This method has limits on input size, processing time, and output size. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RedactContent(self, request, context): + """Redact potentially sensitive info from a list of strings. + This method has limits on input size, processing time, and output size. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateInspectOperation(self, request, context): + """Schedule a job scanning content in a Google Cloud Platform data repository. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListInspectFindings(self, request, context): + """Returns list of results for given inspect operation result set id. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListInfoTypes(self, request, context): + """Returns sensitive information types for given category. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListRootCategories(self, request, context): + """Returns the list of root categories of sensitive information. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DlpServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'InspectContent': grpc.unary_unary_rpc_method_handler( + servicer.InspectContent, + request_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.InspectContentRequest.FromString, + response_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.InspectContentResponse.SerializeToString, + ), + 'RedactContent': grpc.unary_unary_rpc_method_handler( + servicer.RedactContent, + request_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.RedactContentRequest.FromString, + response_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.RedactContentResponse.SerializeToString, + ), + 'CreateInspectOperation': grpc.unary_unary_rpc_method_handler( + servicer.CreateInspectOperation, + request_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.CreateInspectOperationRequest.FromString, + response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, + ), + 'ListInspectFindings': grpc.unary_unary_rpc_method_handler( + servicer.ListInspectFindings, + request_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListInspectFindingsRequest.FromString, + response_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListInspectFindingsResponse.SerializeToString, + ), + 'ListInfoTypes': grpc.unary_unary_rpc_method_handler( + servicer.ListInfoTypes, + request_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListInfoTypesRequest.FromString, + response_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListInfoTypesResponse.SerializeToString, + ), + 'ListRootCategories': grpc.unary_unary_rpc_method_handler( + servicer.ListRootCategories, + request_deserializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListRootCategoriesRequest.FromString, + response_serializer=google_dot_cloud_dot_proto_dot_privacy_dot_dlp_dot_v2beta1_dot_dlp__pb2.ListRootCategoriesResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'google.privacy.dlp.v2beta1.DlpService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) diff --git a/dlp/google/cloud/proto/privacy/dlp/v2beta1/storage_pb2.py b/dlp/google/cloud/proto/privacy/dlp/v2beta1/storage_pb2.py new file mode 100644 index 000000000000..8766a43b7e36 --- /dev/null +++ b/dlp/google/cloud/proto/privacy/dlp/v2beta1/storage_pb2.py @@ -0,0 +1,770 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/proto/privacy/dlp/v2beta1/storage.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='google/cloud/proto/privacy/dlp/v2beta1/storage.proto', + package='google.privacy.dlp.v2beta1', + syntax='proto3', + serialized_pb=_b('\n4google/cloud/proto/privacy/dlp/v2beta1/storage.proto\x12\x1agoogle.privacy.dlp.v2beta1\x1a\x1cgoogle/api/annotations.proto\"\x18\n\x08InfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1e\n\x07\x46ieldId\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\"7\n\x0bPartitionId\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x04 \x01(\t\"\x1e\n\x0eKindExpression\x12\x0c\n\x04name\x18\x01 \x01(\t\"!\n\x11PropertyReference\x12\x0c\n\x04name\x18\x02 \x01(\t\"M\n\nProjection\x12?\n\x08property\x18\x01 \x01(\x0b\x32-.google.privacy.dlp.v2beta1.PropertyReference\"\xc7\x01\n\x10\x44\x61tastoreOptions\x12=\n\x0cpartition_id\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2beta1.PartitionId\x12\x38\n\x04kind\x18\x02 \x01(\x0b\x32*.google.privacy.dlp.v2beta1.KindExpression\x12:\n\nprojection\x18\x03 \x03(\x0b\x32&.google.privacy.dlp.v2beta1.Projection\"x\n\x13\x43loudStorageOptions\x12I\n\x08\x66ile_set\x18\x01 \x01(\x0b\x32\x37.google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet\x1a\x16\n\x07\x46ileSet\x12\x0b\n\x03url\x18\x01 \x01(\t\" \n\x10\x43loudStoragePath\x12\x0c\n\x04path\x18\x01 \x01(\t\"\xb4\x01\n\rStorageConfig\x12I\n\x11\x64\x61tastore_options\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2beta1.DatastoreOptionsH\x00\x12P\n\x15\x63loud_storage_options\x18\x03 \x01(\x0b\x32/.google.privacy.dlp.v2beta1.CloudStorageOptionsH\x00\x42\x06\n\x04type\":\n\x0f\x43loudStorageKey\x12\x11\n\tfile_path\x18\x01 \x01(\t\x12\x14\n\x0cstart_offset\x18\x02 \x01(\x03\"C\n\x0c\x44\x61tastoreKey\x12\x33\n\nentity_key\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2beta1.Key\"\xc5\x01\n\x03Key\x12=\n\x0cpartition_id\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2beta1.PartitionId\x12\x39\n\x04path\x18\x02 \x03(\x0b\x32+.google.privacy.dlp.v2beta1.Key.PathElement\x1a\x44\n\x0bPathElement\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x02id\x18\x02 \x01(\x03H\x00\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x42\t\n\x07id_type\"\xa0\x01\n\tRecordKey\x12H\n\x11\x63loud_storage_key\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2beta1.CloudStorageKeyH\x00\x12\x41\n\rdatastore_key\x18\x02 \x01(\x0b\x32(.google.privacy.dlp.v2beta1.DatastoreKeyH\x00\x42\x06\n\x04typeBm\n\x1e\x63om.google.privacy.dlp.v2beta1B\nDlpStorageP\x01Z=google.golang.org/genproto/googleapis/privacy/dlp/v2beta1;dlpb\x06proto3') + , + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + + + +_INFOTYPE = _descriptor.Descriptor( + name='InfoType', + full_name='google.privacy.dlp.v2beta1.InfoType', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.privacy.dlp.v2beta1.InfoType.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=114, + serialized_end=138, +) + + +_FIELDID = _descriptor.Descriptor( + name='FieldId', + full_name='google.privacy.dlp.v2beta1.FieldId', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='column_name', full_name='google.privacy.dlp.v2beta1.FieldId.column_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=140, + serialized_end=170, +) + + +_PARTITIONID = _descriptor.Descriptor( + name='PartitionId', + full_name='google.privacy.dlp.v2beta1.PartitionId', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='project_id', full_name='google.privacy.dlp.v2beta1.PartitionId.project_id', index=0, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='namespace_id', full_name='google.privacy.dlp.v2beta1.PartitionId.namespace_id', index=1, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=172, + serialized_end=227, +) + + +_KINDEXPRESSION = _descriptor.Descriptor( + name='KindExpression', + full_name='google.privacy.dlp.v2beta1.KindExpression', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.privacy.dlp.v2beta1.KindExpression.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=229, + serialized_end=259, +) + + +_PROPERTYREFERENCE = _descriptor.Descriptor( + name='PropertyReference', + full_name='google.privacy.dlp.v2beta1.PropertyReference', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.privacy.dlp.v2beta1.PropertyReference.name', index=0, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=261, + serialized_end=294, +) + + +_PROJECTION = _descriptor.Descriptor( + name='Projection', + full_name='google.privacy.dlp.v2beta1.Projection', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='property', full_name='google.privacy.dlp.v2beta1.Projection.property', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=296, + serialized_end=373, +) + + +_DATASTOREOPTIONS = _descriptor.Descriptor( + name='DatastoreOptions', + full_name='google.privacy.dlp.v2beta1.DatastoreOptions', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='partition_id', full_name='google.privacy.dlp.v2beta1.DatastoreOptions.partition_id', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='kind', full_name='google.privacy.dlp.v2beta1.DatastoreOptions.kind', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='projection', full_name='google.privacy.dlp.v2beta1.DatastoreOptions.projection', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=376, + serialized_end=575, +) + + +_CLOUDSTORAGEOPTIONS_FILESET = _descriptor.Descriptor( + name='FileSet', + full_name='google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='url', full_name='google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet.url', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=675, + serialized_end=697, +) + +_CLOUDSTORAGEOPTIONS = _descriptor.Descriptor( + name='CloudStorageOptions', + full_name='google.privacy.dlp.v2beta1.CloudStorageOptions', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='file_set', full_name='google.privacy.dlp.v2beta1.CloudStorageOptions.file_set', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_CLOUDSTORAGEOPTIONS_FILESET, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=577, + serialized_end=697, +) + + +_CLOUDSTORAGEPATH = _descriptor.Descriptor( + name='CloudStoragePath', + full_name='google.privacy.dlp.v2beta1.CloudStoragePath', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='path', full_name='google.privacy.dlp.v2beta1.CloudStoragePath.path', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=699, + serialized_end=731, +) + + +_STORAGECONFIG = _descriptor.Descriptor( + name='StorageConfig', + full_name='google.privacy.dlp.v2beta1.StorageConfig', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='datastore_options', full_name='google.privacy.dlp.v2beta1.StorageConfig.datastore_options', index=0, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='cloud_storage_options', full_name='google.privacy.dlp.v2beta1.StorageConfig.cloud_storage_options', index=1, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='type', full_name='google.privacy.dlp.v2beta1.StorageConfig.type', + index=0, containing_type=None, fields=[]), + ], + serialized_start=734, + serialized_end=914, +) + + +_CLOUDSTORAGEKEY = _descriptor.Descriptor( + name='CloudStorageKey', + full_name='google.privacy.dlp.v2beta1.CloudStorageKey', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='file_path', full_name='google.privacy.dlp.v2beta1.CloudStorageKey.file_path', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='start_offset', full_name='google.privacy.dlp.v2beta1.CloudStorageKey.start_offset', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=916, + serialized_end=974, +) + + +_DATASTOREKEY = _descriptor.Descriptor( + name='DatastoreKey', + full_name='google.privacy.dlp.v2beta1.DatastoreKey', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='entity_key', full_name='google.privacy.dlp.v2beta1.DatastoreKey.entity_key', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=976, + serialized_end=1043, +) + + +_KEY_PATHELEMENT = _descriptor.Descriptor( + name='PathElement', + full_name='google.privacy.dlp.v2beta1.Key.PathElement', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='kind', full_name='google.privacy.dlp.v2beta1.Key.PathElement.kind', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='id', full_name='google.privacy.dlp.v2beta1.Key.PathElement.id', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='name', full_name='google.privacy.dlp.v2beta1.Key.PathElement.name', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='id_type', full_name='google.privacy.dlp.v2beta1.Key.PathElement.id_type', + index=0, containing_type=None, fields=[]), + ], + serialized_start=1175, + serialized_end=1243, +) + +_KEY = _descriptor.Descriptor( + name='Key', + full_name='google.privacy.dlp.v2beta1.Key', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='partition_id', full_name='google.privacy.dlp.v2beta1.Key.partition_id', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='path', full_name='google.privacy.dlp.v2beta1.Key.path', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_KEY_PATHELEMENT, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1046, + serialized_end=1243, +) + + +_RECORDKEY = _descriptor.Descriptor( + name='RecordKey', + full_name='google.privacy.dlp.v2beta1.RecordKey', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='cloud_storage_key', full_name='google.privacy.dlp.v2beta1.RecordKey.cloud_storage_key', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='datastore_key', full_name='google.privacy.dlp.v2beta1.RecordKey.datastore_key', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='type', full_name='google.privacy.dlp.v2beta1.RecordKey.type', + index=0, containing_type=None, fields=[]), + ], + serialized_start=1246, + serialized_end=1406, +) + +_PROJECTION.fields_by_name['property'].message_type = _PROPERTYREFERENCE +_DATASTOREOPTIONS.fields_by_name['partition_id'].message_type = _PARTITIONID +_DATASTOREOPTIONS.fields_by_name['kind'].message_type = _KINDEXPRESSION +_DATASTOREOPTIONS.fields_by_name['projection'].message_type = _PROJECTION +_CLOUDSTORAGEOPTIONS_FILESET.containing_type = _CLOUDSTORAGEOPTIONS +_CLOUDSTORAGEOPTIONS.fields_by_name['file_set'].message_type = _CLOUDSTORAGEOPTIONS_FILESET +_STORAGECONFIG.fields_by_name['datastore_options'].message_type = _DATASTOREOPTIONS +_STORAGECONFIG.fields_by_name['cloud_storage_options'].message_type = _CLOUDSTORAGEOPTIONS +_STORAGECONFIG.oneofs_by_name['type'].fields.append( + _STORAGECONFIG.fields_by_name['datastore_options']) +_STORAGECONFIG.fields_by_name['datastore_options'].containing_oneof = _STORAGECONFIG.oneofs_by_name['type'] +_STORAGECONFIG.oneofs_by_name['type'].fields.append( + _STORAGECONFIG.fields_by_name['cloud_storage_options']) +_STORAGECONFIG.fields_by_name['cloud_storage_options'].containing_oneof = _STORAGECONFIG.oneofs_by_name['type'] +_DATASTOREKEY.fields_by_name['entity_key'].message_type = _KEY +_KEY_PATHELEMENT.containing_type = _KEY +_KEY_PATHELEMENT.oneofs_by_name['id_type'].fields.append( + _KEY_PATHELEMENT.fields_by_name['id']) +_KEY_PATHELEMENT.fields_by_name['id'].containing_oneof = _KEY_PATHELEMENT.oneofs_by_name['id_type'] +_KEY_PATHELEMENT.oneofs_by_name['id_type'].fields.append( + _KEY_PATHELEMENT.fields_by_name['name']) +_KEY_PATHELEMENT.fields_by_name['name'].containing_oneof = _KEY_PATHELEMENT.oneofs_by_name['id_type'] +_KEY.fields_by_name['partition_id'].message_type = _PARTITIONID +_KEY.fields_by_name['path'].message_type = _KEY_PATHELEMENT +_RECORDKEY.fields_by_name['cloud_storage_key'].message_type = _CLOUDSTORAGEKEY +_RECORDKEY.fields_by_name['datastore_key'].message_type = _DATASTOREKEY +_RECORDKEY.oneofs_by_name['type'].fields.append( + _RECORDKEY.fields_by_name['cloud_storage_key']) +_RECORDKEY.fields_by_name['cloud_storage_key'].containing_oneof = _RECORDKEY.oneofs_by_name['type'] +_RECORDKEY.oneofs_by_name['type'].fields.append( + _RECORDKEY.fields_by_name['datastore_key']) +_RECORDKEY.fields_by_name['datastore_key'].containing_oneof = _RECORDKEY.oneofs_by_name['type'] +DESCRIPTOR.message_types_by_name['InfoType'] = _INFOTYPE +DESCRIPTOR.message_types_by_name['FieldId'] = _FIELDID +DESCRIPTOR.message_types_by_name['PartitionId'] = _PARTITIONID +DESCRIPTOR.message_types_by_name['KindExpression'] = _KINDEXPRESSION +DESCRIPTOR.message_types_by_name['PropertyReference'] = _PROPERTYREFERENCE +DESCRIPTOR.message_types_by_name['Projection'] = _PROJECTION +DESCRIPTOR.message_types_by_name['DatastoreOptions'] = _DATASTOREOPTIONS +DESCRIPTOR.message_types_by_name['CloudStorageOptions'] = _CLOUDSTORAGEOPTIONS +DESCRIPTOR.message_types_by_name['CloudStoragePath'] = _CLOUDSTORAGEPATH +DESCRIPTOR.message_types_by_name['StorageConfig'] = _STORAGECONFIG +DESCRIPTOR.message_types_by_name['CloudStorageKey'] = _CLOUDSTORAGEKEY +DESCRIPTOR.message_types_by_name['DatastoreKey'] = _DATASTOREKEY +DESCRIPTOR.message_types_by_name['Key'] = _KEY +DESCRIPTOR.message_types_by_name['RecordKey'] = _RECORDKEY + +InfoType = _reflection.GeneratedProtocolMessageType('InfoType', (_message.Message,), dict( + DESCRIPTOR = _INFOTYPE, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.InfoType) + )) +_sym_db.RegisterMessage(InfoType) + +FieldId = _reflection.GeneratedProtocolMessageType('FieldId', (_message.Message,), dict( + DESCRIPTOR = _FIELDID, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.FieldId) + )) +_sym_db.RegisterMessage(FieldId) + +PartitionId = _reflection.GeneratedProtocolMessageType('PartitionId', (_message.Message,), dict( + DESCRIPTOR = _PARTITIONID, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.PartitionId) + )) +_sym_db.RegisterMessage(PartitionId) + +KindExpression = _reflection.GeneratedProtocolMessageType('KindExpression', (_message.Message,), dict( + DESCRIPTOR = _KINDEXPRESSION, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.KindExpression) + )) +_sym_db.RegisterMessage(KindExpression) + +PropertyReference = _reflection.GeneratedProtocolMessageType('PropertyReference', (_message.Message,), dict( + DESCRIPTOR = _PROPERTYREFERENCE, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.PropertyReference) + )) +_sym_db.RegisterMessage(PropertyReference) + +Projection = _reflection.GeneratedProtocolMessageType('Projection', (_message.Message,), dict( + DESCRIPTOR = _PROJECTION, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.Projection) + )) +_sym_db.RegisterMessage(Projection) + +DatastoreOptions = _reflection.GeneratedProtocolMessageType('DatastoreOptions', (_message.Message,), dict( + DESCRIPTOR = _DATASTOREOPTIONS, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.DatastoreOptions) + )) +_sym_db.RegisterMessage(DatastoreOptions) + +CloudStorageOptions = _reflection.GeneratedProtocolMessageType('CloudStorageOptions', (_message.Message,), dict( + + FileSet = _reflection.GeneratedProtocolMessageType('FileSet', (_message.Message,), dict( + DESCRIPTOR = _CLOUDSTORAGEOPTIONS_FILESET, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet) + )) + , + DESCRIPTOR = _CLOUDSTORAGEOPTIONS, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.CloudStorageOptions) + )) +_sym_db.RegisterMessage(CloudStorageOptions) +_sym_db.RegisterMessage(CloudStorageOptions.FileSet) + +CloudStoragePath = _reflection.GeneratedProtocolMessageType('CloudStoragePath', (_message.Message,), dict( + DESCRIPTOR = _CLOUDSTORAGEPATH, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.CloudStoragePath) + )) +_sym_db.RegisterMessage(CloudStoragePath) + +StorageConfig = _reflection.GeneratedProtocolMessageType('StorageConfig', (_message.Message,), dict( + DESCRIPTOR = _STORAGECONFIG, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.StorageConfig) + )) +_sym_db.RegisterMessage(StorageConfig) + +CloudStorageKey = _reflection.GeneratedProtocolMessageType('CloudStorageKey', (_message.Message,), dict( + DESCRIPTOR = _CLOUDSTORAGEKEY, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.CloudStorageKey) + )) +_sym_db.RegisterMessage(CloudStorageKey) + +DatastoreKey = _reflection.GeneratedProtocolMessageType('DatastoreKey', (_message.Message,), dict( + DESCRIPTOR = _DATASTOREKEY, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.DatastoreKey) + )) +_sym_db.RegisterMessage(DatastoreKey) + +Key = _reflection.GeneratedProtocolMessageType('Key', (_message.Message,), dict( + + PathElement = _reflection.GeneratedProtocolMessageType('PathElement', (_message.Message,), dict( + DESCRIPTOR = _KEY_PATHELEMENT, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.Key.PathElement) + )) + , + DESCRIPTOR = _KEY, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.Key) + )) +_sym_db.RegisterMessage(Key) +_sym_db.RegisterMessage(Key.PathElement) + +RecordKey = _reflection.GeneratedProtocolMessageType('RecordKey', (_message.Message,), dict( + DESCRIPTOR = _RECORDKEY, + __module__ = 'google.cloud.proto.privacy.dlp.v2beta1.storage_pb2' + # @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.RecordKey) + )) +_sym_db.RegisterMessage(RecordKey) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\036com.google.privacy.dlp.v2beta1B\nDlpStorageP\001Z=google.golang.org/genproto/googleapis/privacy/dlp/v2beta1;dlp')) +try: + # THESE ELEMENTS WILL BE DEPRECATED. + # Please use the generated *_pb2_grpc.py files instead. + import grpc + from grpc.beta import implementations as beta_implementations + from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities +except ImportError: + pass +# @@protoc_insertion_point(module_scope) diff --git a/dlp/google/cloud/proto/privacy/dlp/v2beta1/storage_pb2_grpc.py b/dlp/google/cloud/proto/privacy/dlp/v2beta1/storage_pb2_grpc.py new file mode 100644 index 000000000000..a89435267cb2 --- /dev/null +++ b/dlp/google/cloud/proto/privacy/dlp/v2beta1/storage_pb2_grpc.py @@ -0,0 +1,3 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc + diff --git a/dlp/nox.py b/dlp/nox.py new file mode 100644 index 000000000000..0f6bd713afbe --- /dev/null +++ b/dlp/nox.py @@ -0,0 +1,41 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import absolute_import + +import nox + + +@nox.session +@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6']) +def unit_tests(session, python_version): + """Run the unit test suite.""" + + # Run unit tests against all supported versions of Python. + session.interpreter = 'python{}'.format(python_version) + + # Install all test dependencies, then install this package in-place. + session.install('mock', 'pytest', 'pytest-cov') + session.install('-e', '.') + + # Run py.test against the unit tests. + session.run('py.test', '--quiet', 'tests/') + +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') diff --git a/dlp/setup.py b/dlp/setup.py new file mode 100644 index 000000000000..d9579389a4ce --- /dev/null +++ b/dlp/setup.py @@ -0,0 +1,45 @@ +"""A setup module for the GAPIC DLP API library. + +See: +https://packaging.python.org/en/latest/distributing.html +https://github.com/pypa/sampleproject +""" + +from setuptools import setup, find_packages +import sys + +install_requires = [ + 'google-gax>=0.15.7, <0.16dev', + 'oauth2client>=2.0.0, <4.0dev', + 'googleapis-common-protos[grpc]>=1.5.2, <2.0dev', +] + +setup( + name='google-cloud-dlp', + version='0.1.0', + author='Google Inc', + author_email='googleapis-packages@google.com', + classifiers=[ + 'Intended Audience :: Developers', + 'Development Status :: 3 - Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: Implementation :: CPython', + ], + description='GAPIC library for the DLP API', + include_package_data=True, + long_description=open('README.rst').read(), + install_requires=install_requires, + license='Apache-2.0', + packages=find_packages(), + namespace_packages=[ + 'google', 'google.cloud', 'google.cloud.gapic', + 'google.cloud.gapic.privacy', 'google.cloud.gapic.privacy.dlp' + ], + url='https://github.com/googleapis/googleapis') diff --git a/dlp/tests/gapic/test_dlp_service_client_v2beta1.py b/dlp/tests/gapic/test_dlp_service_client_v2beta1.py new file mode 100644 index 000000000000..ebc6747e5ee1 --- /dev/null +++ b/dlp/tests/gapic/test_dlp_service_client_v2beta1.py @@ -0,0 +1,332 @@ +# Copyright 2017, Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Unit tests.""" + +import mock +import unittest + +from google.gax import errors + +from google.cloud.gapic.privacy.dlp.v2beta1 import dlp_service_client +from google.cloud.proto.privacy.dlp.v2beta1 import dlp_pb2 +from google.cloud.proto.privacy.dlp.v2beta1 import storage_pb2 +from google.longrunning import operations_pb2 + + +class CustomException(Exception): + pass + + +class TestDlpServiceClient(unittest.TestCase): + @mock.patch('google.gax.config.create_stub', spec=True) + def test_inspect_content(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + inspect_config = dlp_pb2.InspectConfig() + items = [] + + # Mock response + expected_response = dlp_pb2.InspectContentResponse() + grpc_stub.InspectContent.return_value = expected_response + + response = client.inspect_content(inspect_config, items) + self.assertEqual(expected_response, response) + + grpc_stub.InspectContent.assert_called_once() + args, kwargs = grpc_stub.InspectContent.call_args + self.assertEqual(len(args), 2) + self.assertEqual(len(kwargs), 1) + self.assertIn('metadata', kwargs) + actual_request = args[0] + + expected_request = dlp_pb2.InspectContentRequest( + inspect_config=inspect_config, items=items) + self.assertEqual(expected_request, actual_request) + + @mock.patch('google.gax.config.API_ERRORS', (CustomException, )) + @mock.patch('google.gax.config.create_stub', spec=True) + def test_inspect_content_exception(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + inspect_config = dlp_pb2.InspectConfig() + items = [] + + # Mock exception response + grpc_stub.InspectContent.side_effect = CustomException() + + self.assertRaises(errors.GaxError, client.inspect_content, + inspect_config, items) + + @mock.patch('google.gax.config.create_stub', spec=True) + def test_redact_content(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + inspect_config = dlp_pb2.InspectConfig() + items = [] + replace_configs = [] + + # Mock response + expected_response = dlp_pb2.RedactContentResponse() + grpc_stub.RedactContent.return_value = expected_response + + response = client.redact_content(inspect_config, items, + replace_configs) + self.assertEqual(expected_response, response) + + grpc_stub.RedactContent.assert_called_once() + args, kwargs = grpc_stub.RedactContent.call_args + self.assertEqual(len(args), 2) + self.assertEqual(len(kwargs), 1) + self.assertIn('metadata', kwargs) + actual_request = args[0] + + expected_request = dlp_pb2.RedactContentRequest( + inspect_config=inspect_config, + items=items, + replace_configs=replace_configs) + self.assertEqual(expected_request, actual_request) + + @mock.patch('google.gax.config.API_ERRORS', (CustomException, )) + @mock.patch('google.gax.config.create_stub', spec=True) + def test_redact_content_exception(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + inspect_config = dlp_pb2.InspectConfig() + items = [] + replace_configs = [] + + # Mock exception response + grpc_stub.RedactContent.side_effect = CustomException() + + self.assertRaises(errors.GaxError, client.redact_content, + inspect_config, items, replace_configs) + + @mock.patch('google.gax.config.create_stub', spec=True) + def test_create_inspect_operation(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + inspect_config = dlp_pb2.InspectConfig() + storage_config = storage_pb2.StorageConfig() + output_config = dlp_pb2.OutputStorageConfig() + + # Mock response + name = 'name3373707' + done = True + expected_response = operations_pb2.Operation(name=name, done=done) + grpc_stub.CreateInspectOperation.return_value = expected_response + + response = client.create_inspect_operation( + inspect_config, storage_config, output_config) + self.assertEqual(expected_response, response) + + grpc_stub.CreateInspectOperation.assert_called_once() + args, kwargs = grpc_stub.CreateInspectOperation.call_args + self.assertEqual(len(args), 2) + self.assertEqual(len(kwargs), 1) + self.assertIn('metadata', kwargs) + actual_request = args[0] + + expected_request = dlp_pb2.CreateInspectOperationRequest( + inspect_config=inspect_config, + storage_config=storage_config, + output_config=output_config) + self.assertEqual(expected_request, actual_request) + + @mock.patch('google.gax.config.API_ERRORS', (CustomException, )) + @mock.patch('google.gax.config.create_stub', spec=True) + def test_create_inspect_operation_exception(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + inspect_config = dlp_pb2.InspectConfig() + storage_config = storage_pb2.StorageConfig() + output_config = dlp_pb2.OutputStorageConfig() + + # Mock exception response + grpc_stub.CreateInspectOperation.side_effect = CustomException() + + self.assertRaises(errors.GaxError, client.create_inspect_operation, + inspect_config, storage_config, output_config) + + @mock.patch('google.gax.config.create_stub', spec=True) + def test_list_inspect_findings(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + name = client.result_path('[RESULT]') + + # Mock response + next_page_token = 'nextPageToken-1530815211' + expected_response = dlp_pb2.ListInspectFindingsResponse( + next_page_token=next_page_token) + grpc_stub.ListInspectFindings.return_value = expected_response + + response = client.list_inspect_findings(name) + self.assertEqual(expected_response, response) + + grpc_stub.ListInspectFindings.assert_called_once() + args, kwargs = grpc_stub.ListInspectFindings.call_args + self.assertEqual(len(args), 2) + self.assertEqual(len(kwargs), 1) + self.assertIn('metadata', kwargs) + actual_request = args[0] + + expected_request = dlp_pb2.ListInspectFindingsRequest(name=name) + self.assertEqual(expected_request, actual_request) + + @mock.patch('google.gax.config.API_ERRORS', (CustomException, )) + @mock.patch('google.gax.config.create_stub', spec=True) + def test_list_inspect_findings_exception(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + name = client.result_path('[RESULT]') + + # Mock exception response + grpc_stub.ListInspectFindings.side_effect = CustomException() + + self.assertRaises(errors.GaxError, client.list_inspect_findings, name) + + @mock.patch('google.gax.config.create_stub', spec=True) + def test_list_info_types(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + category = 'category50511102' + language_code = 'languageCode-412800396' + + # Mock response + expected_response = dlp_pb2.ListInfoTypesResponse() + grpc_stub.ListInfoTypes.return_value = expected_response + + response = client.list_info_types(category, language_code) + self.assertEqual(expected_response, response) + + grpc_stub.ListInfoTypes.assert_called_once() + args, kwargs = grpc_stub.ListInfoTypes.call_args + self.assertEqual(len(args), 2) + self.assertEqual(len(kwargs), 1) + self.assertIn('metadata', kwargs) + actual_request = args[0] + + expected_request = dlp_pb2.ListInfoTypesRequest( + category=category, language_code=language_code) + self.assertEqual(expected_request, actual_request) + + @mock.patch('google.gax.config.API_ERRORS', (CustomException, )) + @mock.patch('google.gax.config.create_stub', spec=True) + def test_list_info_types_exception(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + category = 'category50511102' + language_code = 'languageCode-412800396' + + # Mock exception response + grpc_stub.ListInfoTypes.side_effect = CustomException() + + self.assertRaises(errors.GaxError, client.list_info_types, category, + language_code) + + @mock.patch('google.gax.config.create_stub', spec=True) + def test_list_root_categories(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + language_code = 'languageCode-412800396' + + # Mock response + expected_response = dlp_pb2.ListRootCategoriesResponse() + grpc_stub.ListRootCategories.return_value = expected_response + + response = client.list_root_categories(language_code) + self.assertEqual(expected_response, response) + + grpc_stub.ListRootCategories.assert_called_once() + args, kwargs = grpc_stub.ListRootCategories.call_args + self.assertEqual(len(args), 2) + self.assertEqual(len(kwargs), 1) + self.assertIn('metadata', kwargs) + actual_request = args[0] + + expected_request = dlp_pb2.ListRootCategoriesRequest( + language_code=language_code) + self.assertEqual(expected_request, actual_request) + + @mock.patch('google.gax.config.API_ERRORS', (CustomException, )) + @mock.patch('google.gax.config.create_stub', spec=True) + def test_list_root_categories_exception(self, mock_create_stub): + # Mock gRPC layer + grpc_stub = mock.Mock() + mock_create_stub.return_value = grpc_stub + + client = dlp_service_client.DlpServiceClient() + + # Mock request + language_code = 'languageCode-412800396' + + # Mock exception response + grpc_stub.ListRootCategories.side_effect = CustomException() + + self.assertRaises(errors.GaxError, client.list_root_categories, + language_code)