From 18d77cf3c8b82093db2924a71df1c6fc012eb980 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 24 Oct 2024 02:08:38 +0000 Subject: [PATCH] chore: Configure Ruby clients for google-ads-ad_manager PiperOrigin-RevId: 689139590 Source-Link: https://github.com/googleapis/googleapis/commit/296f2ac1aa9abccb7708b639b7839faa1809087f Source-Link: https://github.com/googleapis/googleapis-gen/commit/26927362e0aa1293258fc23fe3ce83c5c21d5fbb Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLWNzcy8uT3dsQm90LnlhbWwiLCJoIjoiMjY5MjczNjJlMGFhMTI5MzI1OGZjMjNmZTNjZTgzYzVjMjFkNWZiYiJ9 --- .../google-shopping-css/v1/.coveragerc | 13 + .../google-shopping-css/v1/.flake8 | 33 + .../google-shopping-css/v1/MANIFEST.in | 2 + .../google-shopping-css/v1/README.rst | 49 + .../v1/docs/_static/custom.css | 3 + .../google-shopping-css/v1/docs/conf.py | 376 ++ .../v1/docs/css_v1/account_labels_service.rst | 10 + .../v1/docs/css_v1/accounts_service.rst | 10 + .../css_v1/css_product_inputs_service.rst | 6 + .../v1/docs/css_v1/css_products_service.rst | 10 + .../v1/docs/css_v1/services_.rst | 9 + .../v1/docs/css_v1/types_.rst | 6 + .../google-shopping-css/v1/docs/index.rst | 7 + .../v1/google/shopping/css/__init__.py | 93 + .../v1/google/shopping/css/gapic_version.py | 16 + .../v1/google/shopping/css/py.typed | 2 + .../v1/google/shopping/css_v1/__init__.py | 94 + .../shopping/css_v1/gapic_metadata.json | 250 + .../google/shopping/css_v1/gapic_version.py | 16 + .../v1/google/shopping/css_v1/py.typed | 2 + .../shopping/css_v1/services/__init__.py | 15 + .../account_labels_service/__init__.py | 22 + .../account_labels_service/async_client.py | 659 +++ .../services/account_labels_service/client.py | 1012 ++++ .../services/account_labels_service/pagers.py | 162 + .../transports/README.rst | 9 + .../transports/__init__.py | 38 + .../account_labels_service/transports/base.py | 206 + .../account_labels_service/transports/grpc.py | 350 ++ .../transports/grpc_asyncio.py | 395 ++ .../account_labels_service/transports/rest.py | 572 +++ .../transports/rest_base.py | 260 + .../services/accounts_service/__init__.py | 22 + .../services/accounts_service/async_client.py | 560 ++ .../services/accounts_service/client.py | 914 ++++ .../services/accounts_service/pagers.py | 162 + .../accounts_service/transports/README.rst | 9 + .../accounts_service/transports/__init__.py | 38 + .../accounts_service/transports/base.py | 200 + .../accounts_service/transports/grpc.py | 325 ++ .../transports/grpc_asyncio.py | 374 ++ .../accounts_service/transports/rest.py | 484 ++ .../accounts_service/transports/rest_base.py | 212 + .../css_product_inputs_service/__init__.py | 22 + .../async_client.py | 437 ++ .../css_product_inputs_service/client.py | 793 +++ .../transports/README.rst | 9 + .../transports/__init__.py | 38 + .../transports/base.py | 169 + .../transports/grpc.py | 308 ++ .../transports/grpc_asyncio.py | 334 ++ .../transports/rest.py | 363 ++ .../transports/rest_base.py | 176 + .../services/css_products_service/__init__.py | 22 + .../css_products_service/async_client.py | 473 ++ .../services/css_products_service/client.py | 828 +++ .../services/css_products_service/pagers.py | 162 + .../transports/README.rst | 9 + .../transports/__init__.py | 38 + .../css_products_service/transports/base.py | 186 + .../css_products_service/transports/grpc.py | 307 ++ .../transports/grpc_asyncio.py | 351 ++ .../css_products_service/transports/rest.py | 382 ++ .../transports/rest_base.py | 165 + .../google/shopping/css_v1/types/__init__.py | 82 + .../google/shopping/css_v1/types/accounts.py | 297 ++ .../shopping/css_v1/types/accounts_labels.py | 225 + .../css_v1/types/css_product_common.py | 865 ++++ .../css_v1/types/css_product_inputs.py | 202 + .../shopping/css_v1/types/css_products.py | 183 + .../google-shopping-css/v1/mypy.ini | 3 + .../google-shopping-css/v1/noxfile.py | 280 + ...bels_service_create_account_label_async.py | 52 + ...abels_service_create_account_label_sync.py | 52 + ...bels_service_delete_account_label_async.py | 50 + ...abels_service_delete_account_label_sync.py | 50 + ...abels_service_list_account_labels_async.py | 53 + ...labels_service_list_account_labels_sync.py | 53 + ...bels_service_update_account_label_async.py | 51 + ...abels_service_update_account_label_sync.py | 51 + ...ated_accounts_service_get_account_async.py | 52 + ...rated_accounts_service_get_account_sync.py | 52 + ...ounts_service_list_child_accounts_async.py | 53 + ...counts_service_list_child_accounts_sync.py | 53 + ...ed_accounts_service_update_labels_async.py | 52 + ...ted_accounts_service_update_labels_sync.py | 52 + ..._service_delete_css_product_input_async.py | 50 + ...s_service_delete_css_product_input_sync.py | 50 + ..._service_insert_css_product_input_async.py | 59 + ...s_service_insert_css_product_input_sync.py | 59 + ..._products_service_get_css_product_async.py | 52 + ...s_products_service_get_css_product_sync.py | 52 + ...roducts_service_list_css_products_async.py | 53 + ...products_service_list_css_products_sync.py | 53 + ...ippet_metadata_google.shopping.css.v1.json | 1774 +++++++ .../v1/scripts/fixup_css_v1_keywords.py | 186 + .../google-shopping-css/v1/setup.py | 99 + .../v1/testing/constraints-3.10.txt | 7 + .../v1/testing/constraints-3.11.txt | 7 + .../v1/testing/constraints-3.12.txt | 7 + .../v1/testing/constraints-3.13.txt | 7 + .../v1/testing/constraints-3.7.txt | 11 + .../v1/testing/constraints-3.8.txt | 7 + .../v1/testing/constraints-3.9.txt | 7 + .../google-shopping-css/v1/tests/__init__.py | 16 + .../v1/tests/unit/__init__.py | 16 + .../v1/tests/unit/gapic/__init__.py | 16 + .../v1/tests/unit/gapic/css_v1/__init__.py | 16 + .../css_v1/test_account_labels_service.py | 4529 +++++++++++++++++ .../gapic/css_v1/test_accounts_service.py | 3805 ++++++++++++++ .../css_v1/test_css_product_inputs_service.py | 2739 ++++++++++ .../gapic/css_v1/test_css_products_service.py | 3075 +++++++++++ 112 files changed, 33194 insertions(+) create mode 100644 owl-bot-staging/google-shopping-css/v1/.coveragerc create mode 100644 owl-bot-staging/google-shopping-css/v1/.flake8 create mode 100644 owl-bot-staging/google-shopping-css/v1/MANIFEST.in create mode 100644 owl-bot-staging/google-shopping-css/v1/README.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/docs/_static/custom.css create mode 100644 owl-bot-staging/google-shopping-css/v1/docs/conf.py create mode 100644 owl-bot-staging/google-shopping-css/v1/docs/css_v1/account_labels_service.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/docs/css_v1/accounts_service.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/docs/css_v1/css_product_inputs_service.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/docs/css_v1/css_products_service.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/docs/css_v1/services_.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/docs/css_v1/types_.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/docs/index.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css/gapic_version.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css/py.typed create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/gapic_version.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/py.typed create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/async_client.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/client.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/pagers.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/transports/README.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/transports/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/transports/base.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/transports/grpc.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/transports/grpc_asyncio.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/transports/rest.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/transports/rest_base.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/async_client.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/client.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/pagers.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/transports/README.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/transports/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/transports/base.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/transports/grpc.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/transports/grpc_asyncio.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/transports/rest.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/accounts_service/transports/rest_base.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_product_inputs_service/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_product_inputs_service/async_client.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_product_inputs_service/client.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_product_inputs_service/transports/README.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_product_inputs_service/transports/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_product_inputs_service/transports/base.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_product_inputs_service/transports/grpc.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_product_inputs_service/transports/grpc_asyncio.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_product_inputs_service/transports/rest.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_product_inputs_service/transports/rest_base.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/async_client.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/client.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/pagers.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/transports/README.rst create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/transports/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/transports/base.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/transports/grpc.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/transports/grpc_asyncio.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/transports/rest.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/css_products_service/transports/rest_base.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/types/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/types/accounts.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/types/accounts_labels.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/types/css_product_common.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/types/css_product_inputs.py create mode 100644 owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/types/css_products.py create mode 100644 owl-bot-staging/google-shopping-css/v1/mypy.ini create mode 100644 owl-bot-staging/google-shopping-css/v1/noxfile.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_account_labels_service_create_account_label_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_account_labels_service_create_account_label_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_account_labels_service_delete_account_label_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_account_labels_service_delete_account_label_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_account_labels_service_list_account_labels_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_account_labels_service_list_account_labels_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_account_labels_service_update_account_label_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_account_labels_service_update_account_label_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_accounts_service_get_account_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_accounts_service_get_account_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_accounts_service_list_child_accounts_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_accounts_service_list_child_accounts_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_accounts_service_update_labels_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_accounts_service_update_labels_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_css_product_inputs_service_delete_css_product_input_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_css_product_inputs_service_delete_css_product_input_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_css_product_inputs_service_insert_css_product_input_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_css_product_inputs_service_insert_css_product_input_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_css_products_service_get_css_product_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_css_products_service_get_css_product_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_css_products_service_list_css_products_async.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/css_v1_generated_css_products_service_list_css_products_sync.py create mode 100644 owl-bot-staging/google-shopping-css/v1/samples/generated_samples/snippet_metadata_google.shopping.css.v1.json create mode 100644 owl-bot-staging/google-shopping-css/v1/scripts/fixup_css_v1_keywords.py create mode 100644 owl-bot-staging/google-shopping-css/v1/setup.py create mode 100644 owl-bot-staging/google-shopping-css/v1/testing/constraints-3.10.txt create mode 100644 owl-bot-staging/google-shopping-css/v1/testing/constraints-3.11.txt create mode 100644 owl-bot-staging/google-shopping-css/v1/testing/constraints-3.12.txt create mode 100644 owl-bot-staging/google-shopping-css/v1/testing/constraints-3.13.txt create mode 100644 owl-bot-staging/google-shopping-css/v1/testing/constraints-3.7.txt create mode 100644 owl-bot-staging/google-shopping-css/v1/testing/constraints-3.8.txt create mode 100644 owl-bot-staging/google-shopping-css/v1/testing/constraints-3.9.txt create mode 100644 owl-bot-staging/google-shopping-css/v1/tests/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/tests/unit/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/tests/unit/gapic/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/tests/unit/gapic/css_v1/__init__.py create mode 100644 owl-bot-staging/google-shopping-css/v1/tests/unit/gapic/css_v1/test_account_labels_service.py create mode 100644 owl-bot-staging/google-shopping-css/v1/tests/unit/gapic/css_v1/test_accounts_service.py create mode 100644 owl-bot-staging/google-shopping-css/v1/tests/unit/gapic/css_v1/test_css_product_inputs_service.py create mode 100644 owl-bot-staging/google-shopping-css/v1/tests/unit/gapic/css_v1/test_css_products_service.py diff --git a/owl-bot-staging/google-shopping-css/v1/.coveragerc b/owl-bot-staging/google-shopping-css/v1/.coveragerc new file mode 100644 index 000000000000..11afeda0e930 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/.coveragerc @@ -0,0 +1,13 @@ +[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 new file mode 100644 index 000000000000..29227d4cf419 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/.flake8 @@ -0,0 +1,33 @@ +# -*- 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 new file mode 100644 index 000000000000..3900fed3feb8 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/MANIFEST.in @@ -0,0 +1,2 @@ +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 new file mode 100644 index 000000000000..f1280f804a56 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/README.rst @@ -0,0 +1,49 @@ +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 new file mode 100644 index 000000000000..06423be0b592 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/docs/_static/custom.css @@ -0,0 +1,3 @@ +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 new file mode 100644 index 000000000000..5f01860f95d7 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/docs/conf.py @@ -0,0 +1,376 @@ +# -*- 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 new file mode 100644 index 000000000000..8738d1d2b3e5 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/account_labels_service.rst @@ -0,0 +1,10 @@ +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 new file mode 100644 index 000000000000..c749ba01122c --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/accounts_service.rst @@ -0,0 +1,10 @@ +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 new file mode 100644 index 000000000000..628fe0c9c05b --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/css_product_inputs_service.rst @@ -0,0 +1,6 @@ +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 new file mode 100644 index 000000000000..53df112bb801 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/css_products_service.rst @@ -0,0 +1,10 @@ +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 new file mode 100644 index 000000000000..496beecd39dc --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/services_.rst @@ -0,0 +1,9 @@ +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 new file mode 100644 index 000000000000..165888559c88 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/docs/css_v1/types_.rst @@ -0,0 +1,6 @@ +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 new file mode 100644 index 000000000000..62f363019457 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/docs/index.rst @@ -0,0 +1,7 @@ +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 new file mode 100644 index 000000000000..e145a4ed7bdc --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css/__init__.py @@ -0,0 +1,93 @@ +# -*- 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 new file mode 100644 index 000000000000..558c8aab67c5 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css/gapic_version.py @@ -0,0 +1,16 @@ +# -*- 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 new file mode 100644 index 000000000000..29c7b3690029 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css/py.typed @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 000000000000..612e6f15ad23 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/__init__.py @@ -0,0 +1,94 @@ +# -*- 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 new file mode 100644 index 000000000000..f67d8636033b --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/gapic_metadata.json @@ -0,0 +1,250 @@ + { + "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 new file mode 100644 index 000000000000..558c8aab67c5 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/gapic_version.py @@ -0,0 +1,16 @@ +# -*- 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 new file mode 100644 index 000000000000..29c7b3690029 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/py.typed @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 000000000000..8f6cf068242c --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/__init__.py @@ -0,0 +1,15 @@ +# -*- 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 new file mode 100644 index 000000000000..ee28b5bb0084 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/__init__.py @@ -0,0 +1,22 @@ +# -*- 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 new file mode 100644 index 000000000000..d541ae0ee4d2 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/async_client.py @@ -0,0 +1,659 @@ +# -*- 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 new file mode 100644 index 000000000000..c8a86d95f874 --- /dev/null +++ b/owl-bot-staging/google-shopping-css/v1/google/shopping/css_v1/services/account_labels_service/client.py @@ -0,0 +1,1012 @@ +# -*- 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