diff --git a/owl-bot-staging/google-shopping-css/v1/.coveragerc b/owl-bot-staging/google-shopping-css/v1/.coveragerc deleted file mode 100644 index 11afeda0e930..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/.coveragerc +++ /dev/null @@ -1,13 +0,0 @@ -[run] -branch = True - -[report] -show_missing = True -omit = - google/shopping/css/__init__.py - google/shopping/css/gapic_version.py -exclude_lines = - # Re-enable the standard pragma - pragma: NO COVER - # Ignore debug-only repr - def __repr__ diff --git a/owl-bot-staging/google-shopping-css/v1/.flake8 b/owl-bot-staging/google-shopping-css/v1/.flake8 deleted file mode 100644 index 29227d4cf419..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/.flake8 +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright 2020 Google LLC -# -# 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 -# -# https://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. - -# Generated by synthtool. DO NOT EDIT! -[flake8] -ignore = E203, E266, E501, W503 -exclude = - # Exclude generated code. - **/proto/** - **/gapic/** - **/services/** - **/types/** - *_pb2.py - - # Standard linting exemptions. - **/.nox/** - __pycache__, - .git, - *.pyc, - conf.py diff --git a/owl-bot-staging/google-shopping-css/v1/MANIFEST.in b/owl-bot-staging/google-shopping-css/v1/MANIFEST.in deleted file mode 100644 index 3900fed3feb8..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -recursive-include google/shopping/css *.py -recursive-include google/shopping/css_v1 *.py diff --git a/owl-bot-staging/google-shopping-css/v1/README.rst b/owl-bot-staging/google-shopping-css/v1/README.rst deleted file mode 100644 index f1280f804a56..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/README.rst +++ /dev/null @@ -1,49 +0,0 @@ -Python Client for Google Shopping Css API -================================================= - -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 billing for your project.`_ -3. Enable the Google Shopping Css API. -4. `Setup Authentication.`_ - -.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project -.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project -.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html - -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 - - python3 -m venv - source /bin/activate - /bin/pip install /path/to/library - - -Windows -^^^^^^^ - -.. code-block:: console - - python3 -m venv - \Scripts\activate - \Scripts\pip.exe install \path\to\library diff --git a/owl-bot-staging/google-shopping-css/v1/docs/_static/custom.css b/owl-bot-staging/google-shopping-css/v1/docs/_static/custom.css deleted file mode 100644 index 06423be0b592..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/docs/_static/custom.css +++ /dev/null @@ -1,3 +0,0 @@ -dl.field-list > dt { - min-width: 100px -} diff --git a/owl-bot-staging/google-shopping-css/v1/docs/conf.py b/owl-bot-staging/google-shopping-css/v1/docs/conf.py deleted file mode 100644 index 5f01860f95d7..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/docs/conf.py +++ /dev/null @@ -1,376 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2024 Google LLC -# -# 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. -# -# -# google-shopping-css 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.1.0" - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "4.0.1" - -# 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.todo", - "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"] - -# Allow markdown includes (so releases.md can include CHANGLEOG.md) -# http://www.sphinx-doc.org/en/master/markdown.html -source_parsers = {".md": "recommonmark.parser.CommonMarkParser"} - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -source_suffix = [".rst", ".md"] - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The root toctree document. -root_doc = "index" - -# General information about the project. -project = u"google-shopping-css" -copyright = u"2023, Google, LLC" -author = u"Google APIs" # TODO: autogenerate this bit - -# 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 = 'en' - -# 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 = "alabaster" - -# 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 = { - "description": "Google Shopping Client Libraries for Python", - "github_user": "googleapis", - "github_repo": "google-cloud-python", - "github_banner": True, - "font_family": "'Roboto', Georgia, sans", - "head_font_family": "'Roboto', Georgia, serif", - "code_font_family": "'Roboto Mono', 'Consolas', monospace", -} - -# 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 = ["_static"] - -# 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 = "google-shopping-css-doc" - -# -- Options for warnings ------------------------------------------------------ - - -suppress_warnings = [ - # Temporarily suppress this to avoid "more than one target found for - # cross-reference" warning, which are intractable for us to avoid while in - # a mono-repo. - # See https://github.com/sphinx-doc/sphinx/blob - # /2a65ffeef5c107c19084fabdd706cdff3f52d93c/sphinx/domains/python.py#L843 - "ref.python" -] - -# -- 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 = [ - ( - root_doc, - "google-shopping-css.tex", - u"google-shopping-css 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 = [ - ( - root_doc, - "google-shopping-css", - u"Google Shopping Css 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 = [ - ( - root_doc, - "google-shopping-css", - u"google-shopping-css Documentation", - author, - "google-shopping-css", - "GAPIC library for Google Shopping Css API", - "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), - "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), - "google-gax": ("https://gax-python.readthedocs.io/en/latest/", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None), - "grpc": ("https://grpc.io/grpc/python/", None), - "requests": ("http://requests.kennethreitz.org/en/stable/", None), - "proto": ("https://proto-plus-python.readthedocs.io/en/stable", None), - "protobuf": ("https://googleapis.dev/python/protobuf/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/owl-bot-staging/google-shopping-css/v1/docs/css_v1/account_labels_service.rst b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/account_labels_service.rst deleted file mode 100644 index 8738d1d2b3e5..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/account_labels_service.rst +++ /dev/null @@ -1,10 +0,0 @@ -AccountLabelsService --------------------------------------- - -.. automodule:: google.shopping.css_v1.services.account_labels_service - :members: - :inherited-members: - -.. automodule:: google.shopping.css_v1.services.account_labels_service.pagers - :members: - :inherited-members: diff --git a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/accounts_service.rst b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/accounts_service.rst deleted file mode 100644 index c749ba01122c..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/accounts_service.rst +++ /dev/null @@ -1,10 +0,0 @@ -AccountsService ---------------------------------- - -.. automodule:: google.shopping.css_v1.services.accounts_service - :members: - :inherited-members: - -.. automodule:: google.shopping.css_v1.services.accounts_service.pagers - :members: - :inherited-members: diff --git a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/css_product_inputs_service.rst b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/css_product_inputs_service.rst deleted file mode 100644 index 628fe0c9c05b..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/css_product_inputs_service.rst +++ /dev/null @@ -1,6 +0,0 @@ -CssProductInputsService ------------------------------------------ - -.. automodule:: google.shopping.css_v1.services.css_product_inputs_service - :members: - :inherited-members: diff --git a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/css_products_service.rst b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/css_products_service.rst deleted file mode 100644 index 53df112bb801..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/css_products_service.rst +++ /dev/null @@ -1,10 +0,0 @@ -CssProductsService ------------------------------------- - -.. automodule:: google.shopping.css_v1.services.css_products_service - :members: - :inherited-members: - -.. automodule:: google.shopping.css_v1.services.css_products_service.pagers - :members: - :inherited-members: diff --git a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/services_.rst b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/services_.rst deleted file mode 100644 index 496beecd39dc..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/services_.rst +++ /dev/null @@ -1,9 +0,0 @@ -Services for Google Shopping Css v1 API -======================================= -.. toctree:: - :maxdepth: 2 - - account_labels_service - accounts_service - css_product_inputs_service - css_products_service diff --git a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/types_.rst b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/types_.rst deleted file mode 100644 index 165888559c88..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/docs/css_v1/types_.rst +++ /dev/null @@ -1,6 +0,0 @@ -Types for Google Shopping Css v1 API -==================================== - -.. automodule:: google.shopping.css_v1.types - :members: - :show-inheritance: diff --git a/owl-bot-staging/google-shopping-css/v1/docs/index.rst b/owl-bot-staging/google-shopping-css/v1/docs/index.rst deleted file mode 100644 index 3c1f735d0295..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/docs/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -API Reference -------------- -.. toctree:: - :maxdepth: 2 - - css_v1/services - css_v1/types diff --git a/owl-bot-staging/google-shopping-css/v1/google/shopping/css/__init__.py b/owl-bot-staging/google-shopping-css/v1/google/shopping/css/__init__.py deleted file mode 100644 index e145a4ed7bdc..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css/__init__.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2024 Google LLC -# -# 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 google.shopping.css import gapic_version as package_version - -__version__ = package_version.__version__ - - -from google.shopping.css_v1.services.account_labels_service.client import AccountLabelsServiceClient -from google.shopping.css_v1.services.account_labels_service.async_client import AccountLabelsServiceAsyncClient -from google.shopping.css_v1.services.accounts_service.client import AccountsServiceClient -from google.shopping.css_v1.services.accounts_service.async_client import AccountsServiceAsyncClient -from google.shopping.css_v1.services.css_product_inputs_service.client import CssProductInputsServiceClient -from google.shopping.css_v1.services.css_product_inputs_service.async_client import CssProductInputsServiceAsyncClient -from google.shopping.css_v1.services.css_products_service.client import CssProductsServiceClient -from google.shopping.css_v1.services.css_products_service.async_client import CssProductsServiceAsyncClient - -from google.shopping.css_v1.types.accounts import Account -from google.shopping.css_v1.types.accounts import GetAccountRequest -from google.shopping.css_v1.types.accounts import ListChildAccountsRequest -from google.shopping.css_v1.types.accounts import ListChildAccountsResponse -from google.shopping.css_v1.types.accounts import UpdateAccountLabelsRequest -from google.shopping.css_v1.types.accounts_labels import AccountLabel -from google.shopping.css_v1.types.accounts_labels import CreateAccountLabelRequest -from google.shopping.css_v1.types.accounts_labels import DeleteAccountLabelRequest -from google.shopping.css_v1.types.accounts_labels import ListAccountLabelsRequest -from google.shopping.css_v1.types.accounts_labels import ListAccountLabelsResponse -from google.shopping.css_v1.types.accounts_labels import UpdateAccountLabelRequest -from google.shopping.css_v1.types.css_product_common import Attributes -from google.shopping.css_v1.types.css_product_common import Certification -from google.shopping.css_v1.types.css_product_common import CssProductStatus -from google.shopping.css_v1.types.css_product_common import HeadlineOfferInstallment -from google.shopping.css_v1.types.css_product_common import HeadlineOfferSubscriptionCost -from google.shopping.css_v1.types.css_product_common import ProductDetail -from google.shopping.css_v1.types.css_product_common import ProductDimension -from google.shopping.css_v1.types.css_product_common import ProductWeight -from google.shopping.css_v1.types.css_product_common import SubscriptionPeriod -from google.shopping.css_v1.types.css_product_inputs import CssProductInput -from google.shopping.css_v1.types.css_product_inputs import DeleteCssProductInputRequest -from google.shopping.css_v1.types.css_product_inputs import InsertCssProductInputRequest -from google.shopping.css_v1.types.css_products import CssProduct -from google.shopping.css_v1.types.css_products import GetCssProductRequest -from google.shopping.css_v1.types.css_products import ListCssProductsRequest -from google.shopping.css_v1.types.css_products import ListCssProductsResponse - -__all__ = ('AccountLabelsServiceClient', - 'AccountLabelsServiceAsyncClient', - 'AccountsServiceClient', - 'AccountsServiceAsyncClient', - 'CssProductInputsServiceClient', - 'CssProductInputsServiceAsyncClient', - 'CssProductsServiceClient', - 'CssProductsServiceAsyncClient', - 'Account', - 'GetAccountRequest', - 'ListChildAccountsRequest', - 'ListChildAccountsResponse', - 'UpdateAccountLabelsRequest', - 'AccountLabel', - 'CreateAccountLabelRequest', - 'DeleteAccountLabelRequest', - 'ListAccountLabelsRequest', - 'ListAccountLabelsResponse', - 'UpdateAccountLabelRequest', - 'Attributes', - 'Certification', - 'CssProductStatus', - 'HeadlineOfferInstallment', - 'HeadlineOfferSubscriptionCost', - 'ProductDetail', - 'ProductDimension', - 'ProductWeight', - 'SubscriptionPeriod', - 'CssProductInput', - 'DeleteCssProductInputRequest', - 'InsertCssProductInputRequest', - 'CssProduct', - 'GetCssProductRequest', - 'ListCssProductsRequest', - 'ListCssProductsResponse', -) diff --git a/owl-bot-staging/google-shopping-css/v1/google/shopping/css/gapic_version.py b/owl-bot-staging/google-shopping-css/v1/google/shopping/css/gapic_version.py deleted file mode 100644 index 558c8aab67c5..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css/gapic_version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2024 Google LLC -# -# 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. -# -__version__ = "0.0.0" # {x-release-please-version} diff --git a/owl-bot-staging/google-shopping-css/v1/google/shopping/css/py.typed b/owl-bot-staging/google-shopping-css/v1/google/shopping/css/py.typed deleted file mode 100644 index 29c7b3690029..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-shopping-css package uses inline types. diff --git a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/__init__.py b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/__init__.py deleted file mode 100644 index 612e6f15ad23..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/__init__.py +++ /dev/null @@ -1,94 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2024 Google LLC -# -# 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 google.shopping.css_v1 import gapic_version as package_version - -__version__ = package_version.__version__ - - -from .services.account_labels_service import AccountLabelsServiceClient -from .services.account_labels_service import AccountLabelsServiceAsyncClient -from .services.accounts_service import AccountsServiceClient -from .services.accounts_service import AccountsServiceAsyncClient -from .services.css_product_inputs_service import CssProductInputsServiceClient -from .services.css_product_inputs_service import CssProductInputsServiceAsyncClient -from .services.css_products_service import CssProductsServiceClient -from .services.css_products_service import CssProductsServiceAsyncClient - -from .types.accounts import Account -from .types.accounts import GetAccountRequest -from .types.accounts import ListChildAccountsRequest -from .types.accounts import ListChildAccountsResponse -from .types.accounts import UpdateAccountLabelsRequest -from .types.accounts_labels import AccountLabel -from .types.accounts_labels import CreateAccountLabelRequest -from .types.accounts_labels import DeleteAccountLabelRequest -from .types.accounts_labels import ListAccountLabelsRequest -from .types.accounts_labels import ListAccountLabelsResponse -from .types.accounts_labels import UpdateAccountLabelRequest -from .types.css_product_common import Attributes -from .types.css_product_common import Certification -from .types.css_product_common import CssProductStatus -from .types.css_product_common import HeadlineOfferInstallment -from .types.css_product_common import HeadlineOfferSubscriptionCost -from .types.css_product_common import ProductDetail -from .types.css_product_common import ProductDimension -from .types.css_product_common import ProductWeight -from .types.css_product_common import SubscriptionPeriod -from .types.css_product_inputs import CssProductInput -from .types.css_product_inputs import DeleteCssProductInputRequest -from .types.css_product_inputs import InsertCssProductInputRequest -from .types.css_products import CssProduct -from .types.css_products import GetCssProductRequest -from .types.css_products import ListCssProductsRequest -from .types.css_products import ListCssProductsResponse - -__all__ = ( - 'AccountLabelsServiceAsyncClient', - 'AccountsServiceAsyncClient', - 'CssProductInputsServiceAsyncClient', - 'CssProductsServiceAsyncClient', -'Account', -'AccountLabel', -'AccountLabelsServiceClient', -'AccountsServiceClient', -'Attributes', -'Certification', -'CreateAccountLabelRequest', -'CssProduct', -'CssProductInput', -'CssProductInputsServiceClient', -'CssProductStatus', -'CssProductsServiceClient', -'DeleteAccountLabelRequest', -'DeleteCssProductInputRequest', -'GetAccountRequest', -'GetCssProductRequest', -'HeadlineOfferInstallment', -'HeadlineOfferSubscriptionCost', -'InsertCssProductInputRequest', -'ListAccountLabelsRequest', -'ListAccountLabelsResponse', -'ListChildAccountsRequest', -'ListChildAccountsResponse', -'ListCssProductsRequest', -'ListCssProductsResponse', -'ProductDetail', -'ProductDimension', -'ProductWeight', -'SubscriptionPeriod', -'UpdateAccountLabelRequest', -'UpdateAccountLabelsRequest', -) diff --git a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/gapic_metadata.json b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/gapic_metadata.json deleted file mode 100644 index f67d8636033b..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/gapic_metadata.json +++ /dev/null @@ -1,250 +0,0 @@ - { - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "python", - "libraryPackage": "google.shopping.css_v1", - "protoPackage": "google.shopping.css.v1", - "schema": "1.0", - "services": { - "AccountLabelsService": { - "clients": { - "grpc": { - "libraryClient": "AccountLabelsServiceClient", - "rpcs": { - "CreateAccountLabel": { - "methods": [ - "create_account_label" - ] - }, - "DeleteAccountLabel": { - "methods": [ - "delete_account_label" - ] - }, - "ListAccountLabels": { - "methods": [ - "list_account_labels" - ] - }, - "UpdateAccountLabel": { - "methods": [ - "update_account_label" - ] - } - } - }, - "grpc-async": { - "libraryClient": "AccountLabelsServiceAsyncClient", - "rpcs": { - "CreateAccountLabel": { - "methods": [ - "create_account_label" - ] - }, - "DeleteAccountLabel": { - "methods": [ - "delete_account_label" - ] - }, - "ListAccountLabels": { - "methods": [ - "list_account_labels" - ] - }, - "UpdateAccountLabel": { - "methods": [ - "update_account_label" - ] - } - } - }, - "rest": { - "libraryClient": "AccountLabelsServiceClient", - "rpcs": { - "CreateAccountLabel": { - "methods": [ - "create_account_label" - ] - }, - "DeleteAccountLabel": { - "methods": [ - "delete_account_label" - ] - }, - "ListAccountLabels": { - "methods": [ - "list_account_labels" - ] - }, - "UpdateAccountLabel": { - "methods": [ - "update_account_label" - ] - } - } - } - } - }, - "AccountsService": { - "clients": { - "grpc": { - "libraryClient": "AccountsServiceClient", - "rpcs": { - "GetAccount": { - "methods": [ - "get_account" - ] - }, - "ListChildAccounts": { - "methods": [ - "list_child_accounts" - ] - }, - "UpdateLabels": { - "methods": [ - "update_labels" - ] - } - } - }, - "grpc-async": { - "libraryClient": "AccountsServiceAsyncClient", - "rpcs": { - "GetAccount": { - "methods": [ - "get_account" - ] - }, - "ListChildAccounts": { - "methods": [ - "list_child_accounts" - ] - }, - "UpdateLabels": { - "methods": [ - "update_labels" - ] - } - } - }, - "rest": { - "libraryClient": "AccountsServiceClient", - "rpcs": { - "GetAccount": { - "methods": [ - "get_account" - ] - }, - "ListChildAccounts": { - "methods": [ - "list_child_accounts" - ] - }, - "UpdateLabels": { - "methods": [ - "update_labels" - ] - } - } - } - } - }, - "CssProductInputsService": { - "clients": { - "grpc": { - "libraryClient": "CssProductInputsServiceClient", - "rpcs": { - "DeleteCssProductInput": { - "methods": [ - "delete_css_product_input" - ] - }, - "InsertCssProductInput": { - "methods": [ - "insert_css_product_input" - ] - } - } - }, - "grpc-async": { - "libraryClient": "CssProductInputsServiceAsyncClient", - "rpcs": { - "DeleteCssProductInput": { - "methods": [ - "delete_css_product_input" - ] - }, - "InsertCssProductInput": { - "methods": [ - "insert_css_product_input" - ] - } - } - }, - "rest": { - "libraryClient": "CssProductInputsServiceClient", - "rpcs": { - "DeleteCssProductInput": { - "methods": [ - "delete_css_product_input" - ] - }, - "InsertCssProductInput": { - "methods": [ - "insert_css_product_input" - ] - } - } - } - } - }, - "CssProductsService": { - "clients": { - "grpc": { - "libraryClient": "CssProductsServiceClient", - "rpcs": { - "GetCssProduct": { - "methods": [ - "get_css_product" - ] - }, - "ListCssProducts": { - "methods": [ - "list_css_products" - ] - } - } - }, - "grpc-async": { - "libraryClient": "CssProductsServiceAsyncClient", - "rpcs": { - "GetCssProduct": { - "methods": [ - "get_css_product" - ] - }, - "ListCssProducts": { - "methods": [ - "list_css_products" - ] - } - } - }, - "rest": { - "libraryClient": "CssProductsServiceClient", - "rpcs": { - "GetCssProduct": { - "methods": [ - "get_css_product" - ] - }, - "ListCssProducts": { - "methods": [ - "list_css_products" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/gapic_version.py b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/gapic_version.py deleted file mode 100644 index 558c8aab67c5..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/gapic_version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2024 Google LLC -# -# 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. -# -__version__ = "0.0.0" # {x-release-please-version} diff --git a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/py.typed b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/py.typed deleted file mode 100644 index 29c7b3690029..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-shopping-css package uses inline types. diff --git a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/__init__.py b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/__init__.py deleted file mode 100644 index 8f6cf068242c..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2024 Google LLC -# -# 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/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/__init__.py b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/__init__.py deleted file mode 100644 index ee28b5bb0084..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2024 Google LLC -# -# 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 .client import AccountLabelsServiceClient -from .async_client import AccountLabelsServiceAsyncClient - -__all__ = ( - 'AccountLabelsServiceClient', - 'AccountLabelsServiceAsyncClient', -) diff --git a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/async_client.py b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/async_client.py deleted file mode 100644 index d541ae0ee4d2..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/async_client.py +++ /dev/null @@ -1,659 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2024 Google LLC -# -# 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 collections import OrderedDict -import re -from typing import Dict, Callable, Mapping, MutableMapping, MutableSequence, Optional, Sequence, Tuple, Type, Union - -from google.shopping.css_v1 import gapic_version as package_version - -from google.api_core.client_options import ClientOptions -from google.api_core import exceptions as core_exceptions -from google.api_core import gapic_v1 -from google.api_core import retry_async as retries -from google.auth import credentials as ga_credentials # type: ignore -from google.oauth2 import service_account # type: ignore - - -try: - OptionalRetry = Union[retries.AsyncRetry, gapic_v1.method._MethodDefault, None] -except AttributeError: # pragma: NO COVER - OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore - -from google.shopping.css_v1.services.account_labels_service import pagers -from google.shopping.css_v1.types import accounts_labels -from .transports.base import AccountLabelsServiceTransport, DEFAULT_CLIENT_INFO -from .transports.grpc_asyncio import AccountLabelsServiceGrpcAsyncIOTransport -from .client import AccountLabelsServiceClient - - -class AccountLabelsServiceAsyncClient: - """Manages Merchant Center and CSS accounts labels.""" - - _client: AccountLabelsServiceClient - - # Copy defaults from the synchronous client for use here. - # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. - DEFAULT_ENDPOINT = AccountLabelsServiceClient.DEFAULT_ENDPOINT - DEFAULT_MTLS_ENDPOINT = AccountLabelsServiceClient.DEFAULT_MTLS_ENDPOINT - _DEFAULT_ENDPOINT_TEMPLATE = AccountLabelsServiceClient._DEFAULT_ENDPOINT_TEMPLATE - _DEFAULT_UNIVERSE = AccountLabelsServiceClient._DEFAULT_UNIVERSE - - account_label_path = staticmethod(AccountLabelsServiceClient.account_label_path) - parse_account_label_path = staticmethod(AccountLabelsServiceClient.parse_account_label_path) - common_billing_account_path = staticmethod(AccountLabelsServiceClient.common_billing_account_path) - parse_common_billing_account_path = staticmethod(AccountLabelsServiceClient.parse_common_billing_account_path) - common_folder_path = staticmethod(AccountLabelsServiceClient.common_folder_path) - parse_common_folder_path = staticmethod(AccountLabelsServiceClient.parse_common_folder_path) - common_organization_path = staticmethod(AccountLabelsServiceClient.common_organization_path) - parse_common_organization_path = staticmethod(AccountLabelsServiceClient.parse_common_organization_path) - common_project_path = staticmethod(AccountLabelsServiceClient.common_project_path) - parse_common_project_path = staticmethod(AccountLabelsServiceClient.parse_common_project_path) - common_location_path = staticmethod(AccountLabelsServiceClient.common_location_path) - parse_common_location_path = staticmethod(AccountLabelsServiceClient.parse_common_location_path) - - @classmethod - def from_service_account_info(cls, info: dict, *args, **kwargs): - """Creates an instance of this client using the provided credentials - info. - - Args: - info (dict): The service account private key info. - args: Additional arguments to pass to the constructor. - kwargs: Additional arguments to pass to the constructor. - - Returns: - AccountLabelsServiceAsyncClient: The constructed client. - """ - return AccountLabelsServiceClient.from_service_account_info.__func__(AccountLabelsServiceAsyncClient, info, *args, **kwargs) # type: ignore - - @classmethod - def from_service_account_file(cls, filename: str, *args, **kwargs): - """Creates an instance of this client using the provided credentials - file. - - Args: - filename (str): The path to the service account private key json - file. - args: Additional arguments to pass to the constructor. - kwargs: Additional arguments to pass to the constructor. - - Returns: - AccountLabelsServiceAsyncClient: The constructed client. - """ - return AccountLabelsServiceClient.from_service_account_file.__func__(AccountLabelsServiceAsyncClient, filename, *args, **kwargs) # type: ignore - - from_service_account_json = from_service_account_file - - @classmethod - def get_mtls_endpoint_and_cert_source(cls, client_options: Optional[ClientOptions] = None): - """Return the API endpoint and client cert source for mutual TLS. - - The client cert source is determined in the following order: - (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the - client cert source is None. - (2) if `client_options.client_cert_source` is provided, use the provided one; if the - default client cert source exists, use the default one; otherwise the client cert - source is None. - - The API endpoint is determined in the following order: - (1) if `client_options.api_endpoint` if provided, use the provided one. - (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the - default mTLS endpoint; if the environment variable is "never", use the default API - endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise - use the default API endpoint. - - More details can be found at https://google.aip.dev/auth/4114. - - Args: - client_options (google.api_core.client_options.ClientOptions): Custom options for the - client. Only the `api_endpoint` and `client_cert_source` properties may be used - in this method. - - Returns: - Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the - client cert source to use. - - Raises: - google.auth.exceptions.MutualTLSChannelError: If any errors happen. - """ - return AccountLabelsServiceClient.get_mtls_endpoint_and_cert_source(client_options) # type: ignore - - @property - def transport(self) -> AccountLabelsServiceTransport: - """Returns the transport used by the client instance. - - Returns: - AccountLabelsServiceTransport: The transport used by the client instance. - """ - return self._client.transport - - @property - def api_endpoint(self): - """Return the API endpoint used by the client instance. - - Returns: - str: The API endpoint used by the client instance. - """ - return self._client._api_endpoint - - @property - def universe_domain(self) -> str: - """Return the universe domain used by the client instance. - - Returns: - str: The universe domain used - by the client instance. - """ - return self._client._universe_domain - - get_transport_class = AccountLabelsServiceClient.get_transport_class - - def __init__(self, *, - credentials: Optional[ga_credentials.Credentials] = None, - transport: Optional[Union[str, AccountLabelsServiceTransport, Callable[..., AccountLabelsServiceTransport]]] = "grpc_asyncio", - client_options: Optional[ClientOptions] = None, - client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, - ) -> None: - """Instantiates the account labels service async client. - - Args: - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - transport (Optional[Union[str,AccountLabelsServiceTransport,Callable[..., AccountLabelsServiceTransport]]]): - The transport to use, or a Callable that constructs and returns a new transport to use. - If a Callable is given, it will be called with the same set of initialization - arguments as used in the AccountLabelsServiceTransport constructor. - If set to None, a transport is chosen automatically. - client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): - Custom options for the client. - - 1. The ``api_endpoint`` property can be used to override the - default endpoint provided by the client when ``transport`` is - not explicitly provided. Only if this property is not set and - ``transport`` was not explicitly provided, the endpoint is - determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment - variable, which have one of the following values: - "always" (always use the default mTLS endpoint), "never" (always - use the default regular endpoint) and "auto" (auto-switch to the - default mTLS endpoint if client certificate is present; this is - the default value). - - 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable - is "true", then the ``client_cert_source`` property can be used - to provide a client certificate for mTLS transport. If - not provided, the default SSL client certificate will be used if - present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not - set, no client certificate will be used. - - 3. The ``universe_domain`` property can be used to override the - default "googleapis.com" universe. Note that ``api_endpoint`` - property still takes precedence; and ``universe_domain`` is - currently not supported for mTLS. - - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you're developing - your own client library. - - Raises: - google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport - creation failed for any reason. - """ - self._client = AccountLabelsServiceClient( - credentials=credentials, - transport=transport, - client_options=client_options, - client_info=client_info, - - ) - - async def list_account_labels(self, - request: Optional[Union[accounts_labels.ListAccountLabelsRequest, dict]] = None, - *, - parent: Optional[str] = None, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Union[float, object] = gapic_v1.method.DEFAULT, - metadata: Sequence[Tuple[str, str]] = (), - ) -> pagers.ListAccountLabelsAsyncPager: - r"""Lists the labels assigned to an account. - - .. code-block:: python - - # This snippet has been automatically generated and should be regarded as a - # code template only. - # It will require modifications to work: - # - It may require correct/in-range values for request initialization. - # - It may require specifying regional endpoints when creating the service - # client as shown in: - # https://googleapis.dev/python/google-api-core/latest/client_options.html - from google.shopping import css_v1 - - async def sample_list_account_labels(): - # Create a client - client = css_v1.AccountLabelsServiceAsyncClient() - - # Initialize request argument(s) - request = css_v1.ListAccountLabelsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_account_labels(request=request) - - # Handle the response - async for response in page_result: - print(response) - - Args: - request (Optional[Union[google.shopping.css_v1.types.ListAccountLabelsRequest, dict]]): - The request object. Request message for the ``ListAccountLabels`` method. - parent (:class:`str`): - Required. The parent account. - Format: accounts/{account} - - This corresponds to the ``parent`` field - on the ``request`` instance; if ``request`` is provided, this - should not be set. - retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, - should be retried. - timeout (float): The timeout for this request. - metadata (Sequence[Tuple[str, str]]): Strings which should be - sent along with the request as metadata. - - Returns: - google.shopping.css_v1.services.account_labels_service.pagers.ListAccountLabelsAsyncPager: - Response message for the ListAccountLabels method. - - Iterating over this object will yield results and - resolve additional pages automatically. - - """ - # Create or coerce a protobuf request object. - # - Quick check: If we got a request object, we should *not* have - # gotten any keyword arguments that map to the request. - has_flattened_params = any([parent]) - if request is not None and has_flattened_params: - raise ValueError("If the `request` argument is set, then none of " - "the individual field arguments should be set.") - - # - Use the request object if provided (there's no risk of modifying the input as - # there are no flattened fields), or create one. - if not isinstance(request, accounts_labels.ListAccountLabelsRequest): - request = accounts_labels.ListAccountLabelsRequest(request) - - # If we have keyword arguments corresponding to fields on the - # request, apply these. - if parent is not None: - request.parent = parent - - # Wrap the RPC method; this adds retry and timeout information, - # and friendly error handling. - rpc = self._client._transport._wrapped_methods[self._client._transport.list_account_labels] - - # Certain fields should be provided within the metadata header; - # add these here. - metadata = tuple(metadata) + ( - gapic_v1.routing_header.to_grpc_metadata(( - ("parent", request.parent), - )), - ) - - # Validate the universe domain. - self._client._validate_universe_domain() - - # Send the request. - response = await rpc( - request, - retry=retry, - timeout=timeout, - metadata=metadata, - ) - - # This method is paged; wrap the response in a pager, which provides - # an `__aiter__` convenience method. - response = pagers.ListAccountLabelsAsyncPager( - method=rpc, - request=request, - response=response, - retry=retry, - timeout=timeout, - metadata=metadata, - ) - - # Done; return the response. - return response - - async def create_account_label(self, - request: Optional[Union[accounts_labels.CreateAccountLabelRequest, dict]] = None, - *, - parent: Optional[str] = None, - account_label: Optional[accounts_labels.AccountLabel] = None, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Union[float, object] = gapic_v1.method.DEFAULT, - metadata: Sequence[Tuple[str, str]] = (), - ) -> accounts_labels.AccountLabel: - r"""Creates a new label, not assigned to any account. - - .. code-block:: python - - # This snippet has been automatically generated and should be regarded as a - # code template only. - # It will require modifications to work: - # - It may require correct/in-range values for request initialization. - # - It may require specifying regional endpoints when creating the service - # client as shown in: - # https://googleapis.dev/python/google-api-core/latest/client_options.html - from google.shopping import css_v1 - - async def sample_create_account_label(): - # Create a client - client = css_v1.AccountLabelsServiceAsyncClient() - - # Initialize request argument(s) - request = css_v1.CreateAccountLabelRequest( - parent="parent_value", - ) - - # Make the request - response = await client.create_account_label(request=request) - - # Handle the response - print(response) - - Args: - request (Optional[Union[google.shopping.css_v1.types.CreateAccountLabelRequest, dict]]): - The request object. Request message for the - 'CreateAccountLanel' method. - parent (:class:`str`): - Required. The parent account. - Format: accounts/{account} - - This corresponds to the ``parent`` field - on the ``request`` instance; if ``request`` is provided, this - should not be set. - account_label (:class:`google.shopping.css_v1.types.AccountLabel`): - Required. The label to create. - This corresponds to the ``account_label`` field - on the ``request`` instance; if ``request`` is provided, this - should not be set. - retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, - should be retried. - timeout (float): The timeout for this request. - metadata (Sequence[Tuple[str, str]]): Strings which should be - sent along with the request as metadata. - - Returns: - google.shopping.css_v1.types.AccountLabel: - Label assigned by CSS domain or CSS - group to one of its sub-accounts. - - """ - # Create or coerce a protobuf request object. - # - Quick check: If we got a request object, we should *not* have - # gotten any keyword arguments that map to the request. - has_flattened_params = any([parent, account_label]) - if request is not None and has_flattened_params: - raise ValueError("If the `request` argument is set, then none of " - "the individual field arguments should be set.") - - # - Use the request object if provided (there's no risk of modifying the input as - # there are no flattened fields), or create one. - if not isinstance(request, accounts_labels.CreateAccountLabelRequest): - request = accounts_labels.CreateAccountLabelRequest(request) - - # If we have keyword arguments corresponding to fields on the - # request, apply these. - if parent is not None: - request.parent = parent - if account_label is not None: - request.account_label = account_label - - # Wrap the RPC method; this adds retry and timeout information, - # and friendly error handling. - rpc = self._client._transport._wrapped_methods[self._client._transport.create_account_label] - - # Certain fields should be provided within the metadata header; - # add these here. - metadata = tuple(metadata) + ( - gapic_v1.routing_header.to_grpc_metadata(( - ("parent", request.parent), - )), - ) - - # Validate the universe domain. - self._client._validate_universe_domain() - - # Send the request. - response = await rpc( - request, - retry=retry, - timeout=timeout, - metadata=metadata, - ) - - # Done; return the response. - return response - - async def update_account_label(self, - request: Optional[Union[accounts_labels.UpdateAccountLabelRequest, dict]] = None, - *, - account_label: Optional[accounts_labels.AccountLabel] = None, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Union[float, object] = gapic_v1.method.DEFAULT, - metadata: Sequence[Tuple[str, str]] = (), - ) -> accounts_labels.AccountLabel: - r"""Updates a label. - - .. code-block:: python - - # This snippet has been automatically generated and should be regarded as a - # code template only. - # It will require modifications to work: - # - It may require correct/in-range values for request initialization. - # - It may require specifying regional endpoints when creating the service - # client as shown in: - # https://googleapis.dev/python/google-api-core/latest/client_options.html - from google.shopping import css_v1 - - async def sample_update_account_label(): - # Create a client - client = css_v1.AccountLabelsServiceAsyncClient() - - # Initialize request argument(s) - request = css_v1.UpdateAccountLabelRequest( - ) - - # Make the request - response = await client.update_account_label(request=request) - - # Handle the response - print(response) - - Args: - request (Optional[Union[google.shopping.css_v1.types.UpdateAccountLabelRequest, dict]]): - The request object. Request message for the ``UpdateAccountLabel`` method. - account_label (:class:`google.shopping.css_v1.types.AccountLabel`): - Required. The updated label. All - fields must be provided. - - This corresponds to the ``account_label`` field - on the ``request`` instance; if ``request`` is provided, this - should not be set. - retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, - should be retried. - timeout (float): The timeout for this request. - metadata (Sequence[Tuple[str, str]]): Strings which should be - sent along with the request as metadata. - - Returns: - google.shopping.css_v1.types.AccountLabel: - Label assigned by CSS domain or CSS - group to one of its sub-accounts. - - """ - # Create or coerce a protobuf request object. - # - Quick check: If we got a request object, we should *not* have - # gotten any keyword arguments that map to the request. - has_flattened_params = any([account_label]) - if request is not None and has_flattened_params: - raise ValueError("If the `request` argument is set, then none of " - "the individual field arguments should be set.") - - # - Use the request object if provided (there's no risk of modifying the input as - # there are no flattened fields), or create one. - if not isinstance(request, accounts_labels.UpdateAccountLabelRequest): - request = accounts_labels.UpdateAccountLabelRequest(request) - - # If we have keyword arguments corresponding to fields on the - # request, apply these. - if account_label is not None: - request.account_label = account_label - - # Wrap the RPC method; this adds retry and timeout information, - # and friendly error handling. - rpc = self._client._transport._wrapped_methods[self._client._transport.update_account_label] - - # Certain fields should be provided within the metadata header; - # add these here. - metadata = tuple(metadata) + ( - gapic_v1.routing_header.to_grpc_metadata(( - ("account_label.name", request.account_label.name), - )), - ) - - # Validate the universe domain. - self._client._validate_universe_domain() - - # Send the request. - response = await rpc( - request, - retry=retry, - timeout=timeout, - metadata=metadata, - ) - - # Done; return the response. - return response - - async def delete_account_label(self, - request: Optional[Union[accounts_labels.DeleteAccountLabelRequest, dict]] = None, - *, - name: Optional[str] = None, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Union[float, object] = gapic_v1.method.DEFAULT, - metadata: Sequence[Tuple[str, str]] = (), - ) -> None: - r"""Deletes a label and removes it from all accounts to - which it was assigned. - - .. code-block:: python - - # This snippet has been automatically generated and should be regarded as a - # code template only. - # It will require modifications to work: - # - It may require correct/in-range values for request initialization. - # - It may require specifying regional endpoints when creating the service - # client as shown in: - # https://googleapis.dev/python/google-api-core/latest/client_options.html - from google.shopping import css_v1 - - async def sample_delete_account_label(): - # Create a client - client = css_v1.AccountLabelsServiceAsyncClient() - - # Initialize request argument(s) - request = css_v1.DeleteAccountLabelRequest( - name="name_value", - ) - - # Make the request - await client.delete_account_label(request=request) - - Args: - request (Optional[Union[google.shopping.css_v1.types.DeleteAccountLabelRequest, dict]]): - The request object. Request message for the - 'DeleteAccountLabel' method. - name (:class:`str`): - Required. The name of the label to - delete. Format: - accounts/{account}/labels/{label} - - This corresponds to the ``name`` field - on the ``request`` instance; if ``request`` is provided, this - should not be set. - retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, - should be retried. - timeout (float): The timeout for this request. - metadata (Sequence[Tuple[str, str]]): Strings which should be - sent along with the request as metadata. - """ - # Create or coerce a protobuf request object. - # - Quick check: If we got a request object, we should *not* have - # gotten any keyword arguments that map to the request. - has_flattened_params = any([name]) - if request is not None and has_flattened_params: - raise ValueError("If the `request` argument is set, then none of " - "the individual field arguments should be set.") - - # - Use the request object if provided (there's no risk of modifying the input as - # there are no flattened fields), or create one. - if not isinstance(request, accounts_labels.DeleteAccountLabelRequest): - request = accounts_labels.DeleteAccountLabelRequest(request) - - # If we have keyword arguments corresponding to fields on the - # request, apply these. - if name is not None: - request.name = name - - # Wrap the RPC method; this adds retry and timeout information, - # and friendly error handling. - rpc = self._client._transport._wrapped_methods[self._client._transport.delete_account_label] - - # Certain fields should be provided within the metadata header; - # add these here. - metadata = tuple(metadata) + ( - gapic_v1.routing_header.to_grpc_metadata(( - ("name", request.name), - )), - ) - - # Validate the universe domain. - self._client._validate_universe_domain() - - # Send the request. - await rpc( - request, - retry=retry, - timeout=timeout, - metadata=metadata, - ) - - async def __aenter__(self) -> "AccountLabelsServiceAsyncClient": - return self - - async def __aexit__(self, exc_type, exc, tb): - await self.transport.close() - -DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__) - - -__all__ = ( - "AccountLabelsServiceAsyncClient", -) diff --git a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/client.py b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/client.py deleted file mode 100644 index c8a86d95f874..000000000000 --- a/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/client.py +++ /dev/null @@ -1,1012 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2024 Google LLC -# -# 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 collections import OrderedDict -import os -import re -from typing import Dict, Callable, Mapping, MutableMapping, MutableSequence, Optional, Sequence, Tuple, Type, Union, cast -import warnings - -from google.shopping.css_v1 import gapic_version as package_version - -from google.api_core import client_options as client_options_lib -from google.api_core import exceptions as core_exceptions -from google.api_core import gapic_v1 -from google.api_core import retry as retries -from google.auth import credentials as ga_credentials # type: ignore -from google.auth.transport import mtls # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth.exceptions import MutualTLSChannelError # type: ignore -from google.oauth2 import service_account # type: ignore - -try: - OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] -except AttributeError: # pragma: NO COVER - OptionalRetry = Union[retries.Retry, object, None] # type: ignore - -from google.shopping.css_v1.services.account_labels_service import pagers -from google.shopping.css_v1.types import accounts_labels -from .transports.base import AccountLabelsServiceTransport, DEFAULT_CLIENT_INFO -from .transports.grpc import AccountLabelsServiceGrpcTransport -from .transports.grpc_asyncio import AccountLabelsServiceGrpcAsyncIOTransport -from .transports.rest import AccountLabelsServiceRestTransport - - -class AccountLabelsServiceClientMeta(type): - """Metaclass for the AccountLabelsService client. - - This provides class-level methods for building and retrieving - support objects (e.g. transport) without polluting the client instance - objects. - """ - _transport_registry = OrderedDict() # type: Dict[str, Type[AccountLabelsServiceTransport]] - _transport_registry["grpc"] = AccountLabelsServiceGrpcTransport - _transport_registry["grpc_asyncio"] = AccountLabelsServiceGrpcAsyncIOTransport - _transport_registry["rest"] = AccountLabelsServiceRestTransport - - def get_transport_class(cls, - label: Optional[str] = None, - ) -> Type[AccountLabelsServiceTransport]: - """Returns an appropriate transport class. - - Args: - label: The name of the desired transport. If none is - provided, then the first transport in the registry is used. - - Returns: - The transport class to use. - """ - # If a specific transport is requested, return that one. - if label: - return cls._transport_registry[label] - - # No transport is requested; return the default (that is, the first one - # in the dictionary). - return next(iter(cls._transport_registry.values())) - - -class AccountLabelsServiceClient(metaclass=AccountLabelsServiceClientMeta): - """Manages Merchant Center and CSS accounts labels.""" - - @staticmethod - def _get_default_mtls_endpoint(api_endpoint): - """Converts api endpoint to mTLS endpoint. - - Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to - "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. - Args: - api_endpoint (Optional[str]): the api endpoint to convert. - Returns: - str: converted mTLS api endpoint. - """ - if not api_endpoint: - return api_endpoint - - mtls_endpoint_re = re.compile( - r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" - ) - - m = mtls_endpoint_re.match(api_endpoint) - name, mtls, sandbox, googledomain = m.groups() - if mtls or not googledomain: - return api_endpoint - - if sandbox: - return api_endpoint.replace( - "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" - ) - - return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") - - # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. - DEFAULT_ENDPOINT = "css.googleapis.com" - DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore - DEFAULT_ENDPOINT - ) - - _DEFAULT_ENDPOINT_TEMPLATE = "css.{UNIVERSE_DOMAIN}" - _DEFAULT_UNIVERSE = "googleapis.com" - - @classmethod - def from_service_account_info(cls, info: dict, *args, **kwargs): - """Creates an instance of this client using the provided credentials - info. - - Args: - info (dict): The service account private key info. - args: Additional arguments to pass to the constructor. - kwargs: Additional arguments to pass to the constructor. - - Returns: - AccountLabelsServiceClient: The constructed client. - """ - credentials = service_account.Credentials.from_service_account_info(info) - kwargs["credentials"] = credentials - return cls(*args, **kwargs) - - @classmethod - def from_service_account_file(cls, filename: str, *args, **kwargs): - """Creates an instance of this client using the provided credentials - file. - - Args: - filename (str): The path to the service account private key json - file. - args: Additional arguments to pass to the constructor. - kwargs: Additional arguments to pass to the constructor. - - Returns: - AccountLabelsServiceClient: The constructed client. - """ - credentials = service_account.Credentials.from_service_account_file( - filename) - kwargs["credentials"] = credentials - return cls(*args, **kwargs) - - from_service_account_json = from_service_account_file - - @property - def transport(self) -> AccountLabelsServiceTransport: - """Returns the transport used by the client instance. - - Returns: - AccountLabelsServiceTransport: The transport used by the client - instance. - """ - return self._transport - - @staticmethod - def account_label_path(account: str,label: str,) -> str: - """Returns a fully-qualified account_label string.""" - return "accounts/{account}/labels/{label}".format(account=account, label=label, ) - - @staticmethod - def parse_account_label_path(path: str) -> Dict[str,str]: - """Parses a account_label path into its component segments.""" - m = re.match(r"^accounts/(?P.+?)/labels/(?P