diff --git a/.github/release-please.yml b/.github/release-please.yml index 466597e..528b274 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,2 +1,3 @@ releaseType: python handleGHRelease: true +manifest: true diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 24e4655..87ade4d 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -54,4 +54,4 @@ jobs: - name: Report coverage results run: | coverage combine .coverage-results/.coverage* - coverage report --show-missing --fail-under=99 + coverage report --show-missing --fail-under=100 diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..b19a3f4 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.14.2" +} diff --git a/docs/conf.py b/docs/conf.py index 6cf166a..4e98c34 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,9 +24,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os import shlex +import sys # 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 diff --git a/docs/index.rst b/docs/index.rst index 973b5b9..b5b45f7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,6 +2,10 @@ .. include:: multiprocessing.rst +This package includes clients for multiple versions of Analytics Data. +By default, you will get version ``data_v1beta``. + + API Reference ------------- .. toctree:: @@ -9,15 +13,22 @@ API Reference data_v1beta/services data_v1beta/types + +API Reference +------------- +.. toctree:: + :maxdepth: 2 + data_v1alpha/services data_v1alpha/types + Changelog --------- For a list of all ``google-analytics-data`` releases: .. toctree:: - :maxdepth: 2 + :maxdepth: 2 - changelog + changelog diff --git a/google/analytics/data/__init__.py b/google/analytics/data/__init__.py index 682c3f0..737f0af 100644 --- a/google/analytics/data/__init__.py +++ b/google/analytics/data/__init__.py @@ -13,75 +13,68 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.analytics.data import gapic_version as package_version + +__version__ = package_version.__version__ + -from google.analytics.data_v1beta.services.beta_analytics_data.client import ( - BetaAnalyticsDataClient, -) from google.analytics.data_v1beta.services.beta_analytics_data.async_client import ( BetaAnalyticsDataAsyncClient, ) - -from google.analytics.data_v1beta.types.analytics_data_api import ( - BatchRunPivotReportsRequest, +from google.analytics.data_v1beta.services.beta_analytics_data.client import ( + BetaAnalyticsDataClient, ) from google.analytics.data_v1beta.types.analytics_data_api import ( + BatchRunPivotReportsRequest, BatchRunPivotReportsResponse, -) -from google.analytics.data_v1beta.types.analytics_data_api import BatchRunReportsRequest -from google.analytics.data_v1beta.types.analytics_data_api import ( + BatchRunReportsRequest, BatchRunReportsResponse, -) -from google.analytics.data_v1beta.types.analytics_data_api import ( CheckCompatibilityRequest, -) -from google.analytics.data_v1beta.types.analytics_data_api import ( CheckCompatibilityResponse, -) -from google.analytics.data_v1beta.types.analytics_data_api import GetMetadataRequest -from google.analytics.data_v1beta.types.analytics_data_api import Metadata -from google.analytics.data_v1beta.types.analytics_data_api import RunPivotReportRequest -from google.analytics.data_v1beta.types.analytics_data_api import RunPivotReportResponse -from google.analytics.data_v1beta.types.analytics_data_api import ( + GetMetadataRequest, + Metadata, + RunPivotReportRequest, + RunPivotReportResponse, RunRealtimeReportRequest, -) -from google.analytics.data_v1beta.types.analytics_data_api import ( RunRealtimeReportResponse, + RunReportRequest, + RunReportResponse, +) +from google.analytics.data_v1beta.types.data import ( + Cohort, + CohortReportSettings, + CohortSpec, + CohortsRange, + Compatibility, + DateRange, + Dimension, + DimensionCompatibility, + DimensionExpression, + DimensionHeader, + DimensionMetadata, + DimensionValue, + Filter, + FilterExpression, + FilterExpressionList, + Metric, + MetricAggregation, + MetricCompatibility, + MetricHeader, + MetricMetadata, + MetricType, + MetricValue, + MinuteRange, + NumericValue, + OrderBy, + Pivot, + PivotDimensionHeader, + PivotHeader, + PropertyQuota, + QuotaStatus, + ResponseMetaData, + RestrictedMetricType, + Row, ) -from google.analytics.data_v1beta.types.analytics_data_api import RunReportRequest -from google.analytics.data_v1beta.types.analytics_data_api import RunReportResponse -from google.analytics.data_v1beta.types.data import Cohort -from google.analytics.data_v1beta.types.data import CohortReportSettings -from google.analytics.data_v1beta.types.data import CohortSpec -from google.analytics.data_v1beta.types.data import CohortsRange -from google.analytics.data_v1beta.types.data import DateRange -from google.analytics.data_v1beta.types.data import Dimension -from google.analytics.data_v1beta.types.data import DimensionCompatibility -from google.analytics.data_v1beta.types.data import DimensionExpression -from google.analytics.data_v1beta.types.data import DimensionHeader -from google.analytics.data_v1beta.types.data import DimensionMetadata -from google.analytics.data_v1beta.types.data import DimensionValue -from google.analytics.data_v1beta.types.data import Filter -from google.analytics.data_v1beta.types.data import FilterExpression -from google.analytics.data_v1beta.types.data import FilterExpressionList -from google.analytics.data_v1beta.types.data import Metric -from google.analytics.data_v1beta.types.data import MetricCompatibility -from google.analytics.data_v1beta.types.data import MetricHeader -from google.analytics.data_v1beta.types.data import MetricMetadata -from google.analytics.data_v1beta.types.data import MetricValue -from google.analytics.data_v1beta.types.data import MinuteRange -from google.analytics.data_v1beta.types.data import NumericValue -from google.analytics.data_v1beta.types.data import OrderBy -from google.analytics.data_v1beta.types.data import Pivot -from google.analytics.data_v1beta.types.data import PivotDimensionHeader -from google.analytics.data_v1beta.types.data import PivotHeader -from google.analytics.data_v1beta.types.data import PropertyQuota -from google.analytics.data_v1beta.types.data import QuotaStatus -from google.analytics.data_v1beta.types.data import ResponseMetaData -from google.analytics.data_v1beta.types.data import Row -from google.analytics.data_v1beta.types.data import Compatibility -from google.analytics.data_v1beta.types.data import MetricAggregation -from google.analytics.data_v1beta.types.data import MetricType -from google.analytics.data_v1beta.types.data import RestrictedMetricType __all__ = ( "BetaAnalyticsDataClient", diff --git a/google/analytics/data/gapic_version.py b/google/analytics/data/gapic_version.py new file mode 100644 index 0000000..1f469e6 --- /dev/null +++ b/google/analytics/data/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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.14.2" # {x-release-please-version} diff --git a/google/analytics/data_v1alpha/__init__.py b/google/analytics/data_v1alpha/__init__.py index 6d6577f..2cad838 100644 --- a/google/analytics/data_v1alpha/__init__.py +++ b/google/analytics/data_v1alpha/__init__.py @@ -13,75 +13,81 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.analytics.data import gapic_version as package_version -from .services.alpha_analytics_data import AlphaAnalyticsDataClient -from .services.alpha_analytics_data import AlphaAnalyticsDataAsyncClient +__version__ = package_version.__version__ -from .types.analytics_data_api import RunFunnelReportRequest -from .types.analytics_data_api import RunFunnelReportResponse -from .types.data import BetweenFilter -from .types.data import DateRange -from .types.data import Dimension -from .types.data import DimensionExpression -from .types.data import DimensionHeader -from .types.data import DimensionValue -from .types.data import EventSegment -from .types.data import EventSegmentConditionGroup -from .types.data import EventSegmentCriteria -from .types.data import EventSegmentExclusion -from .types.data import Filter -from .types.data import FilterExpression -from .types.data import FilterExpressionList -from .types.data import Funnel -from .types.data import FunnelBreakdown -from .types.data import FunnelEventFilter -from .types.data import FunnelFieldFilter -from .types.data import FunnelFilterExpression -from .types.data import FunnelFilterExpressionList -from .types.data import FunnelNextAction -from .types.data import FunnelParameterFilter -from .types.data import FunnelParameterFilterExpression -from .types.data import FunnelParameterFilterExpressionList -from .types.data import FunnelResponseMetadata -from .types.data import FunnelStep -from .types.data import FunnelSubReport -from .types.data import InListFilter -from .types.data import MetricHeader -from .types.data import MetricValue -from .types.data import NumericFilter -from .types.data import NumericValue -from .types.data import PropertyQuota -from .types.data import QuotaStatus -from .types.data import Row -from .types.data import SamplingMetadata -from .types.data import Segment -from .types.data import SegmentEventFilter -from .types.data import SegmentFilter -from .types.data import SegmentFilterExpression -from .types.data import SegmentFilterExpressionList -from .types.data import SegmentFilterScoping -from .types.data import SegmentParameterFilter -from .types.data import SegmentParameterFilterExpression -from .types.data import SegmentParameterFilterExpressionList -from .types.data import SegmentParameterFilterScoping -from .types.data import SessionSegment -from .types.data import SessionSegmentConditionGroup -from .types.data import SessionSegmentCriteria -from .types.data import SessionSegmentExclusion -from .types.data import StringFilter -from .types.data import UserSegment -from .types.data import UserSegmentConditionGroup -from .types.data import UserSegmentCriteria -from .types.data import UserSegmentExclusion -from .types.data import UserSegmentSequenceGroup -from .types.data import UserSequenceStep -from .types.data import EventCriteriaScoping -from .types.data import EventExclusionDuration -from .types.data import MetricType -from .types.data import SessionCriteriaScoping -from .types.data import SessionExclusionDuration -from .types.data import UserCriteriaScoping -from .types.data import UserExclusionDuration + +from .services.alpha_analytics_data import ( + AlphaAnalyticsDataAsyncClient, + AlphaAnalyticsDataClient, +) +from .types.analytics_data_api import RunFunnelReportRequest, RunFunnelReportResponse +from .types.data import ( + BetweenFilter, + DateRange, + Dimension, + DimensionExpression, + DimensionHeader, + DimensionValue, + EventCriteriaScoping, + EventExclusionDuration, + EventSegment, + EventSegmentConditionGroup, + EventSegmentCriteria, + EventSegmentExclusion, + Filter, + FilterExpression, + FilterExpressionList, + Funnel, + FunnelBreakdown, + FunnelEventFilter, + FunnelFieldFilter, + FunnelFilterExpression, + FunnelFilterExpressionList, + FunnelNextAction, + FunnelParameterFilter, + FunnelParameterFilterExpression, + FunnelParameterFilterExpressionList, + FunnelResponseMetadata, + FunnelStep, + FunnelSubReport, + InListFilter, + MetricHeader, + MetricType, + MetricValue, + NumericFilter, + NumericValue, + PropertyQuota, + QuotaStatus, + Row, + SamplingMetadata, + Segment, + SegmentEventFilter, + SegmentFilter, + SegmentFilterExpression, + SegmentFilterExpressionList, + SegmentFilterScoping, + SegmentParameterFilter, + SegmentParameterFilterExpression, + SegmentParameterFilterExpressionList, + SegmentParameterFilterScoping, + SessionCriteriaScoping, + SessionExclusionDuration, + SessionSegment, + SessionSegmentConditionGroup, + SessionSegmentCriteria, + SessionSegmentExclusion, + StringFilter, + UserCriteriaScoping, + UserExclusionDuration, + UserSegment, + UserSegmentConditionGroup, + UserSegmentCriteria, + UserSegmentExclusion, + UserSegmentSequenceGroup, + UserSequenceStep, +) __all__ = ( "AlphaAnalyticsDataAsyncClient", diff --git a/google/analytics/data_v1alpha/services/alpha_analytics_data/__init__.py b/google/analytics/data_v1alpha/services/alpha_analytics_data/__init__.py index 053b669..582f51b 100644 --- a/google/analytics/data_v1alpha/services/alpha_analytics_data/__init__.py +++ b/google/analytics/data_v1alpha/services/alpha_analytics_data/__init__.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .client import AlphaAnalyticsDataClient from .async_client import AlphaAnalyticsDataAsyncClient +from .client import AlphaAnalyticsDataClient __all__ = ( "AlphaAnalyticsDataClient", diff --git a/google/analytics/data_v1alpha/services/alpha_analytics_data/async_client.py b/google/analytics/data_v1alpha/services/alpha_analytics_data/async_client.py index 712d012..03d9623 100644 --- a/google/analytics/data_v1alpha/services/alpha_analytics_data/async_client.py +++ b/google/analytics/data_v1alpha/services/alpha_analytics_data/async_client.py @@ -17,25 +17,25 @@ import functools import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources -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 as retries +from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.Retry, object] # type: ignore -from google.analytics.data_v1alpha.types import analytics_data_api -from google.analytics.data_v1alpha.types import data -from .transports.base import AlphaAnalyticsDataTransport, DEFAULT_CLIENT_INFO -from .transports.grpc_asyncio import AlphaAnalyticsDataGrpcAsyncIOTransport +from google.analytics.data_v1alpha.types import analytics_data_api, data + from .client import AlphaAnalyticsDataClient +from .transports.base import DEFAULT_CLIENT_INFO, AlphaAnalyticsDataTransport +from .transports.grpc_asyncio import AlphaAnalyticsDataGrpcAsyncIOTransport class AlphaAnalyticsDataAsyncClient: diff --git a/google/analytics/data_v1alpha/services/alpha_analytics_data/client.py b/google/analytics/data_v1alpha/services/alpha_analytics_data/client.py index 8c8d493..662fd6f 100644 --- a/google/analytics/data_v1alpha/services/alpha_analytics_data/client.py +++ b/google/analytics/data_v1alpha/services/alpha_analytics_data/client.py @@ -16,27 +16,27 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast 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.exceptions import MutualTLSChannelError # 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 +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.Retry, object] # type: ignore -from google.analytics.data_v1alpha.types import analytics_data_api -from google.analytics.data_v1alpha.types import data -from .transports.base import AlphaAnalyticsDataTransport, DEFAULT_CLIENT_INFO +from google.analytics.data_v1alpha.types import analytics_data_api, data + +from .transports.base import DEFAULT_CLIENT_INFO, AlphaAnalyticsDataTransport from .transports.grpc import AlphaAnalyticsDataGrpcTransport from .transports.grpc_asyncio import AlphaAnalyticsDataGrpcAsyncIOTransport from .transports.rest import AlphaAnalyticsDataRestTransport @@ -313,7 +313,7 @@ def __init__( *, credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, AlphaAnalyticsDataTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the alpha analytics data client. @@ -330,7 +330,7 @@ def __init__( NOTE: "rest" transport functionality is currently in a beta state (preview). We welcome your feedback via an issue in this library's source repository. - client_options (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -360,6 +360,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options diff --git a/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/__init__.py b/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/__init__.py index 3241851..04d99db 100644 --- a/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/__init__.py +++ b/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/__init__.py @@ -19,9 +19,7 @@ from .base import AlphaAnalyticsDataTransport from .grpc import AlphaAnalyticsDataGrpcTransport from .grpc_asyncio import AlphaAnalyticsDataGrpcAsyncIOTransport -from .rest import AlphaAnalyticsDataRestTransport -from .rest import AlphaAnalyticsDataRestInterceptor - +from .rest import AlphaAnalyticsDataRestInterceptor, AlphaAnalyticsDataRestTransport # Compile a registry of transports. _transport_registry = ( diff --git a/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/base.py b/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/base.py index e5b9786..05872ae 100644 --- a/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/base.py +++ b/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore import google.api_core from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries +import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources from google.analytics.data_v1alpha.types import analytics_data_api diff --git a/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/grpc.py b/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/grpc.py index b9f5940..0a0f397 100644 --- a/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/grpc.py +++ b/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/grpc.py @@ -13,19 +13,18 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import grpc_helpers -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, grpc_helpers import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - import grpc # type: ignore from google.analytics.data_v1alpha.types import analytics_data_api -from .base import AlphaAnalyticsDataTransport, DEFAULT_CLIENT_INFO + +from .base import DEFAULT_CLIENT_INFO, AlphaAnalyticsDataTransport class AlphaAnalyticsDataGrpcTransport(AlphaAnalyticsDataTransport): diff --git a/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/grpc_asyncio.py b/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/grpc_asyncio.py index ea06acf..280ba58 100644 --- a/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/grpc_asyncio.py +++ b/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/grpc_asyncio.py @@ -13,19 +13,18 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers_async +from google.api_core import gapic_v1, grpc_helpers_async from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - import grpc # type: ignore from grpc.experimental import aio # type: ignore from google.analytics.data_v1alpha.types import analytics_data_api -from .base import AlphaAnalyticsDataTransport, DEFAULT_CLIENT_INFO + +from .base import DEFAULT_CLIENT_INFO, AlphaAnalyticsDataTransport from .grpc import AlphaAnalyticsDataGrpcTransport diff --git a/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/rest.py b/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/rest.py index 3a4ab48..896d23c 100644 --- a/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/rest.py +++ b/google/analytics/data_v1alpha/services/alpha_analytics_data/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.analytics.data_v1alpha.types import analytics_data_api -from .base import ( - AlphaAnalyticsDataTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import AlphaAnalyticsDataTransport +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, diff --git a/google/analytics/data_v1alpha/types/__init__.py b/google/analytics/data_v1alpha/types/__init__.py index 0809abe..09a02f0 100644 --- a/google/analytics/data_v1alpha/types/__init__.py +++ b/google/analytics/data_v1alpha/types/__init__.py @@ -13,10 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .analytics_data_api import ( - RunFunnelReportRequest, - RunFunnelReportResponse, -) +from .analytics_data_api import RunFunnelReportRequest, RunFunnelReportResponse from .data import ( BetweenFilter, DateRange, @@ -24,6 +21,8 @@ DimensionExpression, DimensionHeader, DimensionValue, + EventCriteriaScoping, + EventExclusionDuration, EventSegment, EventSegmentConditionGroup, EventSegmentCriteria, @@ -46,6 +45,7 @@ FunnelSubReport, InListFilter, MetricHeader, + MetricType, MetricValue, NumericFilter, NumericValue, @@ -63,24 +63,21 @@ SegmentParameterFilterExpression, SegmentParameterFilterExpressionList, SegmentParameterFilterScoping, + SessionCriteriaScoping, + SessionExclusionDuration, SessionSegment, SessionSegmentConditionGroup, SessionSegmentCriteria, SessionSegmentExclusion, StringFilter, + UserCriteriaScoping, + UserExclusionDuration, UserSegment, UserSegmentConditionGroup, UserSegmentCriteria, UserSegmentExclusion, UserSegmentSequenceGroup, UserSequenceStep, - EventCriteriaScoping, - EventExclusionDuration, - MetricType, - SessionCriteriaScoping, - SessionExclusionDuration, - UserCriteriaScoping, - UserExclusionDuration, ) __all__ = ( diff --git a/google/analytics/data_v1alpha/types/analytics_data_api.py b/google/analytics/data_v1alpha/types/analytics_data_api.py index 512e89f..a7d5dbd 100644 --- a/google/analytics/data_v1alpha/types/analytics_data_api.py +++ b/google/analytics/data_v1alpha/types/analytics_data_api.py @@ -17,7 +17,6 @@ from google.analytics.data_v1alpha.types import data - __protobuf__ = proto.module( package="google.analytics.data.v1alpha", manifest={ diff --git a/google/analytics/data_v1alpha/types/data.py b/google/analytics/data_v1alpha/types/data.py index 6de8909..698b784 100644 --- a/google/analytics/data_v1alpha/types/data.py +++ b/google/analytics/data_v1alpha/types/data.py @@ -13,10 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - from google.protobuf import duration_pb2 # type: ignore - +import proto # type: ignore __protobuf__ = proto.module( package="google.analytics.data.v1alpha", diff --git a/google/analytics/data_v1beta/__init__.py b/google/analytics/data_v1beta/__init__.py index a9e8c4b..1115d81 100644 --- a/google/analytics/data_v1beta/__init__.py +++ b/google/analytics/data_v1beta/__init__.py @@ -13,57 +13,66 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.analytics.data import gapic_version as package_version -from .services.beta_analytics_data import BetaAnalyticsDataClient -from .services.beta_analytics_data import BetaAnalyticsDataAsyncClient +__version__ = package_version.__version__ -from .types.analytics_data_api import BatchRunPivotReportsRequest -from .types.analytics_data_api import BatchRunPivotReportsResponse -from .types.analytics_data_api import BatchRunReportsRequest -from .types.analytics_data_api import BatchRunReportsResponse -from .types.analytics_data_api import CheckCompatibilityRequest -from .types.analytics_data_api import CheckCompatibilityResponse -from .types.analytics_data_api import GetMetadataRequest -from .types.analytics_data_api import Metadata -from .types.analytics_data_api import RunPivotReportRequest -from .types.analytics_data_api import RunPivotReportResponse -from .types.analytics_data_api import RunRealtimeReportRequest -from .types.analytics_data_api import RunRealtimeReportResponse -from .types.analytics_data_api import RunReportRequest -from .types.analytics_data_api import RunReportResponse -from .types.data import Cohort -from .types.data import CohortReportSettings -from .types.data import CohortSpec -from .types.data import CohortsRange -from .types.data import DateRange -from .types.data import Dimension -from .types.data import DimensionCompatibility -from .types.data import DimensionExpression -from .types.data import DimensionHeader -from .types.data import DimensionMetadata -from .types.data import DimensionValue -from .types.data import Filter -from .types.data import FilterExpression -from .types.data import FilterExpressionList -from .types.data import Metric -from .types.data import MetricCompatibility -from .types.data import MetricHeader -from .types.data import MetricMetadata -from .types.data import MetricValue -from .types.data import MinuteRange -from .types.data import NumericValue -from .types.data import OrderBy -from .types.data import Pivot -from .types.data import PivotDimensionHeader -from .types.data import PivotHeader -from .types.data import PropertyQuota -from .types.data import QuotaStatus -from .types.data import ResponseMetaData -from .types.data import Row -from .types.data import Compatibility -from .types.data import MetricAggregation -from .types.data import MetricType -from .types.data import RestrictedMetricType + +from .services.beta_analytics_data import ( + BetaAnalyticsDataAsyncClient, + BetaAnalyticsDataClient, +) +from .types.analytics_data_api import ( + BatchRunPivotReportsRequest, + BatchRunPivotReportsResponse, + BatchRunReportsRequest, + BatchRunReportsResponse, + CheckCompatibilityRequest, + CheckCompatibilityResponse, + GetMetadataRequest, + Metadata, + RunPivotReportRequest, + RunPivotReportResponse, + RunRealtimeReportRequest, + RunRealtimeReportResponse, + RunReportRequest, + RunReportResponse, +) +from .types.data import ( + Cohort, + CohortReportSettings, + CohortSpec, + CohortsRange, + Compatibility, + DateRange, + Dimension, + DimensionCompatibility, + DimensionExpression, + DimensionHeader, + DimensionMetadata, + DimensionValue, + Filter, + FilterExpression, + FilterExpressionList, + Metric, + MetricAggregation, + MetricCompatibility, + MetricHeader, + MetricMetadata, + MetricType, + MetricValue, + MinuteRange, + NumericValue, + OrderBy, + Pivot, + PivotDimensionHeader, + PivotHeader, + PropertyQuota, + QuotaStatus, + ResponseMetaData, + RestrictedMetricType, + Row, +) __all__ = ( "BetaAnalyticsDataAsyncClient", diff --git a/google/analytics/data_v1beta/services/beta_analytics_data/__init__.py b/google/analytics/data_v1beta/services/beta_analytics_data/__init__.py index 1064618..708d647 100644 --- a/google/analytics/data_v1beta/services/beta_analytics_data/__init__.py +++ b/google/analytics/data_v1beta/services/beta_analytics_data/__init__.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .client import BetaAnalyticsDataClient from .async_client import BetaAnalyticsDataAsyncClient +from .client import BetaAnalyticsDataClient __all__ = ( "BetaAnalyticsDataClient", diff --git a/google/analytics/data_v1beta/services/beta_analytics_data/async_client.py b/google/analytics/data_v1beta/services/beta_analytics_data/async_client.py index 4c6f746..60b60dd 100644 --- a/google/analytics/data_v1beta/services/beta_analytics_data/async_client.py +++ b/google/analytics/data_v1beta/services/beta_analytics_data/async_client.py @@ -17,25 +17,25 @@ import functools import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources -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 as retries +from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.Retry, object] # type: ignore -from google.analytics.data_v1beta.types import analytics_data_api -from google.analytics.data_v1beta.types import data -from .transports.base import BetaAnalyticsDataTransport, DEFAULT_CLIENT_INFO -from .transports.grpc_asyncio import BetaAnalyticsDataGrpcAsyncIOTransport +from google.analytics.data_v1beta.types import analytics_data_api, data + from .client import BetaAnalyticsDataClient +from .transports.base import DEFAULT_CLIENT_INFO, BetaAnalyticsDataTransport +from .transports.grpc_asyncio import BetaAnalyticsDataGrpcAsyncIOTransport class BetaAnalyticsDataAsyncClient: diff --git a/google/analytics/data_v1beta/services/beta_analytics_data/client.py b/google/analytics/data_v1beta/services/beta_analytics_data/client.py index d4e5da8..9153b45 100644 --- a/google/analytics/data_v1beta/services/beta_analytics_data/client.py +++ b/google/analytics/data_v1beta/services/beta_analytics_data/client.py @@ -16,27 +16,27 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast 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.exceptions import MutualTLSChannelError # 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 +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.Retry, object] # type: ignore -from google.analytics.data_v1beta.types import analytics_data_api -from google.analytics.data_v1beta.types import data -from .transports.base import BetaAnalyticsDataTransport, DEFAULT_CLIENT_INFO +from google.analytics.data_v1beta.types import analytics_data_api, data + +from .transports.base import DEFAULT_CLIENT_INFO, BetaAnalyticsDataTransport from .transports.grpc import BetaAnalyticsDataGrpcTransport from .transports.grpc_asyncio import BetaAnalyticsDataGrpcAsyncIOTransport from .transports.rest import BetaAnalyticsDataRestTransport @@ -328,7 +328,7 @@ def __init__( *, credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, BetaAnalyticsDataTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the beta analytics data client. @@ -345,7 +345,7 @@ def __init__( NOTE: "rest" transport functionality is currently in a beta state (preview). We welcome your feedback via an issue in this library's source repository. - client_options (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -375,6 +375,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options diff --git a/google/analytics/data_v1beta/services/beta_analytics_data/transports/__init__.py b/google/analytics/data_v1beta/services/beta_analytics_data/transports/__init__.py index 571f2e5..7597d70 100644 --- a/google/analytics/data_v1beta/services/beta_analytics_data/transports/__init__.py +++ b/google/analytics/data_v1beta/services/beta_analytics_data/transports/__init__.py @@ -19,9 +19,7 @@ from .base import BetaAnalyticsDataTransport from .grpc import BetaAnalyticsDataGrpcTransport from .grpc_asyncio import BetaAnalyticsDataGrpcAsyncIOTransport -from .rest import BetaAnalyticsDataRestTransport -from .rest import BetaAnalyticsDataRestInterceptor - +from .rest import BetaAnalyticsDataRestInterceptor, BetaAnalyticsDataRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[BetaAnalyticsDataTransport]] diff --git a/google/analytics/data_v1beta/services/beta_analytics_data/transports/base.py b/google/analytics/data_v1beta/services/beta_analytics_data/transports/base.py index 017debc..7fe6a32 100644 --- a/google/analytics/data_v1beta/services/beta_analytics_data/transports/base.py +++ b/google/analytics/data_v1beta/services/beta_analytics_data/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore import google.api_core from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries +import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources from google.analytics.data_v1beta.types import analytics_data_api diff --git a/google/analytics/data_v1beta/services/beta_analytics_data/transports/grpc.py b/google/analytics/data_v1beta/services/beta_analytics_data/transports/grpc.py index 3964332..a95c7dc 100644 --- a/google/analytics/data_v1beta/services/beta_analytics_data/transports/grpc.py +++ b/google/analytics/data_v1beta/services/beta_analytics_data/transports/grpc.py @@ -13,19 +13,18 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import grpc_helpers -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, grpc_helpers import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - import grpc # type: ignore from google.analytics.data_v1beta.types import analytics_data_api -from .base import BetaAnalyticsDataTransport, DEFAULT_CLIENT_INFO + +from .base import DEFAULT_CLIENT_INFO, BetaAnalyticsDataTransport class BetaAnalyticsDataGrpcTransport(BetaAnalyticsDataTransport): diff --git a/google/analytics/data_v1beta/services/beta_analytics_data/transports/grpc_asyncio.py b/google/analytics/data_v1beta/services/beta_analytics_data/transports/grpc_asyncio.py index 37bb305..aac4267 100644 --- a/google/analytics/data_v1beta/services/beta_analytics_data/transports/grpc_asyncio.py +++ b/google/analytics/data_v1beta/services/beta_analytics_data/transports/grpc_asyncio.py @@ -13,19 +13,18 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers_async +from google.api_core import gapic_v1, grpc_helpers_async from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - import grpc # type: ignore from grpc.experimental import aio # type: ignore from google.analytics.data_v1beta.types import analytics_data_api -from .base import BetaAnalyticsDataTransport, DEFAULT_CLIENT_INFO + +from .base import DEFAULT_CLIENT_INFO, BetaAnalyticsDataTransport from .grpc import BetaAnalyticsDataGrpcTransport diff --git a/google/analytics/data_v1beta/services/beta_analytics_data/transports/rest.py b/google/analytics/data_v1beta/services/beta_analytics_data/transports/rest.py index ac9f991..05ea767 100644 --- a/google/analytics/data_v1beta/services/beta_analytics_data/transports/rest.py +++ b/google/analytics/data_v1beta/services/beta_analytics_data/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.analytics.data_v1beta.types import analytics_data_api -from .base import ( - BetaAnalyticsDataTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import BetaAnalyticsDataTransport +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, diff --git a/google/analytics/data_v1beta/types/__init__.py b/google/analytics/data_v1beta/types/__init__.py index 70424cc..b29494a 100644 --- a/google/analytics/data_v1beta/types/__init__.py +++ b/google/analytics/data_v1beta/types/__init__.py @@ -34,6 +34,7 @@ CohortReportSettings, CohortSpec, CohortsRange, + Compatibility, DateRange, Dimension, DimensionCompatibility, @@ -45,9 +46,11 @@ FilterExpression, FilterExpressionList, Metric, + MetricAggregation, MetricCompatibility, MetricHeader, MetricMetadata, + MetricType, MetricValue, MinuteRange, NumericValue, @@ -58,11 +61,8 @@ PropertyQuota, QuotaStatus, ResponseMetaData, - Row, - Compatibility, - MetricAggregation, - MetricType, RestrictedMetricType, + Row, ) __all__ = ( diff --git a/google/analytics/data_v1beta/types/analytics_data_api.py b/google/analytics/data_v1beta/types/analytics_data_api.py index 80c086d..022fde9 100644 --- a/google/analytics/data_v1beta/types/analytics_data_api.py +++ b/google/analytics/data_v1beta/types/analytics_data_api.py @@ -17,7 +17,6 @@ from google.analytics.data_v1beta.types import data - __protobuf__ = proto.module( package="google.analytics.data.v1beta", manifest={ diff --git a/google/analytics/data_v1beta/types/data.py b/google/analytics/data_v1beta/types/data.py index 64b74b7..20ec7ae 100644 --- a/google/analytics/data_v1beta/types/data.py +++ b/google/analytics/data_v1beta/types/data.py @@ -15,7 +15,6 @@ # import proto # type: ignore - __protobuf__ = proto.module( package="google.analytics.data.v1beta", manifest={ diff --git a/noxfile.py b/noxfile.py index 2d0e43a..29d0200 100644 --- a/noxfile.py +++ b/noxfile.py @@ -17,6 +17,7 @@ # Generated by synthtool. DO NOT EDIT! from __future__ import absolute_import + import os import pathlib import re @@ -267,7 +268,7 @@ def cover(session): test runs (not system test runs), and then erases coverage data. """ session.install("coverage", "pytest-cov") - session.run("coverage", "report", "--show-missing", "--fail-under=99") + session.run("coverage", "report", "--show-missing", "--fail-under=100") session.run("coverage", "erase") diff --git a/owlbot.py b/owlbot.py index cef558f..ce738f0 100644 --- a/owlbot.py +++ b/owlbot.py @@ -1,4 +1,4 @@ -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,56 +12,45 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""This script is used to synthesize generated parts of this library.""" -import os +import json +from pathlib import Path +import shutil import synthtool as s import synthtool.gcp as gcp from synthtool.languages import python -common = gcp.CommonTemplates() +# ---------------------------------------------------------------------------- +# Copy the generated client from the owl-bot staging directory +# ---------------------------------------------------------------------------- -default_version = "v1beta" +clean_up_generated_samples = True -for library in s.get_staging_dirs(default_version): - s.move( - library, - excludes=[ - "setup.py", - "README.rst", - "docs/index.rst", - f"scripts/fixup_data_{library.name}_keywords.py", - ], - ) +# Load the default version defined in .repo-metadata.json. +default_version = json.load(open(".repo-metadata.json", "rt")).get( + "default_version" +) +for library in s.get_staging_dirs(default_version): + if clean_up_generated_samples: + shutil.rmtree("samples/generated_samples", ignore_errors=True) + clean_up_generated_samples = False + s.move([library], excludes=["**/gapic_version.py"]) s.remove_staging_dirs() # ---------------------------------------------------------------------------- # Add templated files # ---------------------------------------------------------------------------- -templated_files = common.py_library(cov_level=99, microgenerator=True) -python.py_samples(skip_readmes=True) -s.move( - templated_files, excludes=[ - ".coveragerc" - ] -) # the microgenerator has a good coveragerc file - -# fix coverage target -s.replace( - "noxfile.py", - """(\s+)["']--cov=google.cloud["'],""", - """"--cov=google.analytics",""", -) -# Wrap regex in docstring that sphinx thinks is a link with `` -s.replace( - "google/**/data.py", - '''"\^\[a-zA-Z0-9_\]\$"''', - """``^[a-zA-Z0-9_]$``""", +templated_files = gcp.CommonTemplates().py_library( + cov_level=100, + microgenerator=True, + versions=gcp.common.detect_versions(path="./google", default_first=True), ) +s.move(templated_files, excludes=[".coveragerc", ".github/release-please.yml"]) -# Work around bug in templates https://github.com/googleapis/synthtool/pull/1335 -s.replace(".github/workflows/unittest.yml", "--fail-under=100", "--fail-under=99") +python.py_samples(skip_readmes=True) -s.shell.run(["nox", "-s", "blacken"], hide_output=False) +# run format session for all directories which have a noxfile +for noxfile in Path(".").glob("**/noxfile.py"): + s.shell.run(["nox", "-s", "format"], cwd=noxfile.parent, hide_output=False) diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..b2a4730 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "python", + "extra-files": [ + "google/analytics/data/gapic_version.py", + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_data_v1alpha.json", + "jsonpath": "$.clientLibrary.version" + }, + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_data_v1beta.json", + "jsonpath": "$.clientLibrary.version" + } + ] + } + }, + "release-type": "python", + "plugins": [ + { + "type": "sentence-case" + } + ], + "initial-version": "0.1.0" +} diff --git a/samples/generated_samples/analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync_7c96ce50.py b/samples/generated_samples/analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync_7c96ce50.py deleted file mode 100644 index d8deeeb..0000000 --- a/samples/generated_samples/analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync_7c96ce50.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for RunFunnelReport -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_sync_7c96ce50] -# 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.analytics import data_v1alpha - - -def sample_run_funnel_report(): - # Create a client - client = data_v1alpha.AlphaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1alpha.RunFunnelReportRequest( - ) - - # Make the request - response = client.run_funnel_report(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_sync_7c96ce50] diff --git a/samples/generated_samples/analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync_ae462a0b.py b/samples/generated_samples/analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync_ae462a0b.py deleted file mode 100644 index 604a48a..0000000 --- a/samples/generated_samples/analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync_ae462a0b.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for RunFunnelReport -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_sync_ae462a0b] -# 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.analytics import data_v1alpha - - -def sample_run_funnel_report(): - # Create a client - client = data_v1alpha.AlphaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1alpha.RunFunnelReportRequest( - ) - - # Make the request - response = client.run_funnel_report(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_sync_ae462a0b] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync_1ce5c65c.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync_1ce5c65c.py deleted file mode 100644 index e049569..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync_1ce5c65c.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for BatchRunPivotReports -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_sync_1ce5c65c] -# 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.analytics import data_v1beta - - -def sample_batch_run_pivot_reports(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.BatchRunPivotReportsRequest( - ) - - # Make the request - response = client.batch_run_pivot_reports(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_sync_1ce5c65c] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync_7c87d5d4.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync_7c87d5d4.py deleted file mode 100644 index 2e062cb..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync_7c87d5d4.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for BatchRunPivotReports -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_sync_7c87d5d4] -# 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.analytics import data_v1beta - - -def sample_batch_run_pivot_reports(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.BatchRunPivotReportsRequest( - ) - - # Make the request - response = client.batch_run_pivot_reports(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_sync_7c87d5d4] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync_3c81d05f.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync_3c81d05f.py deleted file mode 100644 index e62d99c..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync_3c81d05f.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for BatchRunReports -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_sync_3c81d05f] -# 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.analytics import data_v1beta - - -def sample_batch_run_reports(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.BatchRunReportsRequest( - ) - - # Make the request - response = client.batch_run_reports(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_sync_3c81d05f] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync_73ae9a9a.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync_73ae9a9a.py deleted file mode 100644 index 14f9d28..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync_73ae9a9a.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for BatchRunReports -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_sync_73ae9a9a] -# 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.analytics import data_v1beta - - -def sample_batch_run_reports(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.BatchRunReportsRequest( - ) - - # Make the request - response = client.batch_run_reports(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_sync_73ae9a9a] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync_0504eab7.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync_0504eab7.py deleted file mode 100644 index f9ec380..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync_0504eab7.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CheckCompatibility -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_sync_0504eab7] -# 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.analytics import data_v1beta - - -def sample_check_compatibility(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.CheckCompatibilityRequest( - ) - - # Make the request - response = client.check_compatibility(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_sync_0504eab7] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync_55006999.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync_55006999.py deleted file mode 100644 index c0582f3..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync_55006999.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CheckCompatibility -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_sync_55006999] -# 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.analytics import data_v1beta - - -def sample_check_compatibility(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.CheckCompatibilityRequest( - ) - - # Make the request - response = client.check_compatibility(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_sync_55006999] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync_6e78ad46.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync_6e78ad46.py deleted file mode 100644 index f6d3cb1..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync_6e78ad46.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetMetadata -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_sync_6e78ad46] -# 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.analytics import data_v1beta - - -def sample_get_metadata(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.GetMetadataRequest( - name="name_value", - ) - - # Make the request - response = client.get_metadata(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_sync_6e78ad46] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync_c3a8c7d7.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync_c3a8c7d7.py deleted file mode 100644 index 0b7f824..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync_c3a8c7d7.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetMetadata -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_sync_c3a8c7d7] -# 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.analytics import data_v1beta - - -def sample_get_metadata(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.GetMetadataRequest( - name="name_value", - ) - - # Make the request - response = client.get_metadata(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_sync_c3a8c7d7] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync_21614b9b.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync_21614b9b.py deleted file mode 100644 index 58e1f75..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync_21614b9b.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for RunPivotReport -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_sync_21614b9b] -# 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.analytics import data_v1beta - - -def sample_run_pivot_report(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.RunPivotReportRequest( - ) - - # Make the request - response = client.run_pivot_report(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_sync_21614b9b] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync_8115ba39.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync_8115ba39.py deleted file mode 100644 index 0065841..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync_8115ba39.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for RunPivotReport -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_sync_8115ba39] -# 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.analytics import data_v1beta - - -def sample_run_pivot_report(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.RunPivotReportRequest( - ) - - # Make the request - response = client.run_pivot_report(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_sync_8115ba39] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync_aa3eafd1.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync_aa3eafd1.py deleted file mode 100644 index 19334d9..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync_aa3eafd1.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for RunRealtimeReport -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_sync_aa3eafd1] -# 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.analytics import data_v1beta - - -def sample_run_realtime_report(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.RunRealtimeReportRequest( - ) - - # Make the request - response = client.run_realtime_report(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_sync_aa3eafd1] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync_f8bc1b6b.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync_f8bc1b6b.py deleted file mode 100644 index fe1923b..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync_f8bc1b6b.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for RunRealtimeReport -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_sync_f8bc1b6b] -# 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.analytics import data_v1beta - - -def sample_run_realtime_report(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.RunRealtimeReportRequest( - ) - - # Make the request - response = client.run_realtime_report(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_sync_f8bc1b6b] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync_3a50a6eb.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync_3a50a6eb.py deleted file mode 100644 index c6fbc4c..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync_3a50a6eb.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for RunReport -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_sync_3a50a6eb] -# 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.analytics import data_v1beta - - -def sample_run_report(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.RunReportRequest( - ) - - # Make the request - response = client.run_report(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_sync_3a50a6eb] diff --git a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync_c82f18e9.py b/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync_c82f18e9.py deleted file mode 100644 index dbda53e..0000000 --- a/samples/generated_samples/analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync_c82f18e9.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for RunReport -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-analytics-data - - -# [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_sync_c82f18e9] -# 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.analytics import data_v1beta - - -def sample_run_report(): - # Create a client - client = data_v1beta.BetaAnalyticsDataClient() - - # Initialize request argument(s) - request = data_v1beta.RunReportRequest( - ) - - # Make the request - response = client.run_report(request=request) - - # Handle the response - print(response) - -# [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_sync_c82f18e9] diff --git a/samples/generated_samples/snippet_metadata_data_v1alpha.json b/samples/generated_samples/snippet_metadata_data_v1alpha.json index 52c4622..fc2b532 100644 --- a/samples/generated_samples/snippet_metadata_data_v1alpha.json +++ b/samples/generated_samples/snippet_metadata_data_v1alpha.json @@ -125,7 +125,7 @@ "shortName": "run_funnel_report" }, "description": "Sample for RunFunnelReport", - "file": "analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync_ae462a0b.py", + "file": "analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_sync", @@ -161,83 +161,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync_ae462a0b.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.analytics.data_v1alpha.AlphaAnalyticsDataClient", - "shortName": "AlphaAnalyticsDataClient" - }, - "fullName": "google.analytics.data_v1alpha.AlphaAnalyticsDataClient.run_funnel_report", - "method": { - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReport", - "service": { - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData", - "shortName": "AlphaAnalyticsData" - }, - "shortName": "RunFunnelReport" - }, - "parameters": [ - { - "name": "request", - "type": "google.analytics.data_v1alpha.types.RunFunnelReportRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.analytics.data_v1alpha.types.RunFunnelReportResponse", - "shortName": "run_funnel_report" - }, - "description": "Sample for RunFunnelReport", - "file": "analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync_7c96ce50.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_sync", - "segments": [ - { - "end": 50, - "start": 27, - "type": "FULL" - }, - { - "end": 50, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 44, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 47, - "start": 45, - "type": "REQUEST_EXECUTION" - }, - { - "end": 51, - "start": 48, - "type": "RESPONSE_HANDLING" - } - ], - "title": "analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync_7c96ce50.py" + "title": "analyticsdata_v1alpha_generated_alpha_analytics_data_run_funnel_report_sync.py" } ] } diff --git a/samples/generated_samples/snippet_metadata_data_v1beta.json b/samples/generated_samples/snippet_metadata_data_v1beta.json index 0ba660b..4e33261 100644 --- a/samples/generated_samples/snippet_metadata_data_v1beta.json +++ b/samples/generated_samples/snippet_metadata_data_v1beta.json @@ -125,7 +125,7 @@ "shortName": "batch_run_pivot_reports" }, "description": "Sample for BatchRunPivotReports", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync_7c87d5d4.py", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_sync", @@ -161,83 +161,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync_7c87d5d4.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", - "shortName": "BetaAnalyticsDataClient" - }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.batch_run_pivot_reports", - "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReports", - "service": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", - "shortName": "BetaAnalyticsData" - }, - "shortName": "BatchRunPivotReports" - }, - "parameters": [ - { - "name": "request", - "type": "google.analytics.data_v1beta.types.BatchRunPivotReportsRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.analytics.data_v1beta.types.BatchRunPivotReportsResponse", - "shortName": "batch_run_pivot_reports" - }, - "description": "Sample for BatchRunPivotReports", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync_1ce5c65c.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_sync", - "segments": [ - { - "end": 50, - "start": 27, - "type": "FULL" - }, - { - "end": 50, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 44, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 47, - "start": 45, - "type": "REQUEST_EXECUTION" - }, - { - "end": 51, - "start": 48, - "type": "RESPONSE_HANDLING" - } - ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync_1ce5c65c.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_pivot_reports_sync.py" }, { "canonical": true, @@ -314,469 +238,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", - "shortName": "BetaAnalyticsDataClient" - }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.batch_run_reports", - "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", - "service": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", - "shortName": "BetaAnalyticsData" - }, - "shortName": "BatchRunReports" - }, - "parameters": [ - { - "name": "request", - "type": "google.analytics.data_v1beta.types.BatchRunReportsRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.analytics.data_v1beta.types.BatchRunReportsResponse", - "shortName": "batch_run_reports" - }, - "description": "Sample for BatchRunReports", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync_3c81d05f.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_sync", - "segments": [ - { - "end": 50, - "start": 27, - "type": "FULL" - }, - { - "end": 50, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 44, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 47, - "start": 45, - "type": "REQUEST_EXECUTION" - }, - { - "end": 51, - "start": 48, - "type": "RESPONSE_HANDLING" - } - ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync_3c81d05f.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", - "shortName": "BetaAnalyticsDataClient" - }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.batch_run_reports", - "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", - "service": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", - "shortName": "BetaAnalyticsData" - }, - "shortName": "BatchRunReports" - }, - "parameters": [ - { - "name": "request", - "type": "google.analytics.data_v1beta.types.BatchRunReportsRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.analytics.data_v1beta.types.BatchRunReportsResponse", - "shortName": "batch_run_reports" - }, - "description": "Sample for BatchRunReports", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync_73ae9a9a.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_sync", - "segments": [ - { - "end": 50, - "start": 27, - "type": "FULL" - }, - { - "end": 50, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 44, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 47, - "start": 45, - "type": "REQUEST_EXECUTION" - }, - { - "end": 51, - "start": 48, - "type": "RESPONSE_HANDLING" - } - ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync_73ae9a9a.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient", - "shortName": "BetaAnalyticsDataAsyncClient" - }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient.check_compatibility", - "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", - "service": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", - "shortName": "BetaAnalyticsData" - }, - "shortName": "CheckCompatibility" - }, - "parameters": [ - { - "name": "request", - "type": "google.analytics.data_v1beta.types.CheckCompatibilityRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.analytics.data_v1beta.types.CheckCompatibilityResponse", - "shortName": "check_compatibility" - }, - "description": "Sample for CheckCompatibility", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async", - "segments": [ - { - "end": 50, - "start": 27, - "type": "FULL" - }, - { - "end": 50, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 44, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 47, - "start": 45, - "type": "REQUEST_EXECUTION" - }, - { - "end": 51, - "start": 48, - "type": "RESPONSE_HANDLING" - } - ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", - "shortName": "BetaAnalyticsDataClient" - }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.check_compatibility", - "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", - "service": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", - "shortName": "BetaAnalyticsData" - }, - "shortName": "CheckCompatibility" - }, - "parameters": [ - { - "name": "request", - "type": "google.analytics.data_v1beta.types.CheckCompatibilityRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.analytics.data_v1beta.types.CheckCompatibilityResponse", - "shortName": "check_compatibility" - }, - "description": "Sample for CheckCompatibility", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync_0504eab7.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_sync", - "segments": [ - { - "end": 50, - "start": 27, - "type": "FULL" - }, - { - "end": 50, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 44, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 47, - "start": 45, - "type": "REQUEST_EXECUTION" - }, - { - "end": 51, - "start": 48, - "type": "RESPONSE_HANDLING" - } - ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync_0504eab7.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", - "shortName": "BetaAnalyticsDataClient" - }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.check_compatibility", - "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", - "service": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", - "shortName": "BetaAnalyticsData" - }, - "shortName": "CheckCompatibility" - }, - "parameters": [ - { - "name": "request", - "type": "google.analytics.data_v1beta.types.CheckCompatibilityRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.analytics.data_v1beta.types.CheckCompatibilityResponse", - "shortName": "check_compatibility" - }, - "description": "Sample for CheckCompatibility", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync_55006999.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_sync", - "segments": [ - { - "end": 50, - "start": 27, - "type": "FULL" - }, - { - "end": 50, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 44, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 47, - "start": 45, - "type": "REQUEST_EXECUTION" - }, - { - "end": 51, - "start": 48, - "type": "RESPONSE_HANDLING" - } - ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync_55006999.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient", - "shortName": "BetaAnalyticsDataAsyncClient" - }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient.get_metadata", - "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", - "service": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", - "shortName": "BetaAnalyticsData" - }, - "shortName": "GetMetadata" - }, - "parameters": [ - { - "name": "request", - "type": "google.analytics.data_v1beta.types.GetMetadataRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.analytics.data_v1beta.types.Metadata", - "shortName": "get_metadata" - }, - "description": "Sample for GetMetadata", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_async.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_async.py" }, { "canonical": true, @@ -785,23 +247,19 @@ "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", "shortName": "BetaAnalyticsDataClient" }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.get_metadata", + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.batch_run_reports", "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", "service": { "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", "shortName": "BetaAnalyticsData" }, - "shortName": "GetMetadata" + "shortName": "BatchRunReports" }, "parameters": [ { "name": "request", - "type": "google.analytics.data_v1beta.types.GetMetadataRequest" - }, - { - "name": "name", - "type": "str" + "type": "google.analytics.data_v1beta.types.BatchRunReportsRequest" }, { "name": "retry", @@ -816,22 +274,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.analytics.data_v1beta.types.Metadata", - "shortName": "get_metadata" + "resultType": "google.analytics.data_v1beta.types.BatchRunReportsResponse", + "shortName": "batch_run_reports" }, - "description": "Sample for GetMetadata", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync_6e78ad46.py", + "description": "Sample for BatchRunReports", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_sync", + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_sync", "segments": [ { - "end": 51, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 50, "start": 27, "type": "SHORT" }, @@ -841,47 +299,44 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 44, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync_6e78ad46.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_batch_run_reports_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", - "shortName": "BetaAnalyticsDataClient" + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient", + "shortName": "BetaAnalyticsDataAsyncClient" }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.get_metadata", + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient.check_compatibility", "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", "service": { "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", "shortName": "BetaAnalyticsData" }, - "shortName": "GetMetadata" + "shortName": "CheckCompatibility" }, "parameters": [ { "name": "request", - "type": "google.analytics.data_v1beta.types.GetMetadataRequest" - }, - { - "name": "name", - "type": "str" + "type": "google.analytics.data_v1beta.types.CheckCompatibilityRequest" }, { "name": "retry", @@ -896,22 +351,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.analytics.data_v1beta.types.Metadata", - "shortName": "get_metadata" + "resultType": "google.analytics.data_v1beta.types.CheckCompatibilityResponse", + "shortName": "check_compatibility" }, - "description": "Sample for GetMetadata", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync_c3a8c7d7.py", + "description": "Sample for CheckCompatibility", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_sync", + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async", "segments": [ { - "end": 51, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 50, "start": 27, "type": "SHORT" }, @@ -921,44 +376,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 44, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync_c3a8c7d7.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_async.py" }, { "canonical": true, "clientMethod": { - "async": true, "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient", - "shortName": "BetaAnalyticsDataAsyncClient" + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", + "shortName": "BetaAnalyticsDataClient" }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient.run_pivot_report", + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.check_compatibility", "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", "service": { "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", "shortName": "BetaAnalyticsData" }, - "shortName": "RunPivotReport" + "shortName": "CheckCompatibility" }, "parameters": [ { "name": "request", - "type": "google.analytics.data_v1beta.types.RunPivotReportRequest" + "type": "google.analytics.data_v1beta.types.CheckCompatibilityRequest" }, { "name": "retry", @@ -973,14 +427,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.analytics.data_v1beta.types.RunPivotReportResponse", - "shortName": "run_pivot_report" + "resultType": "google.analytics.data_v1beta.types.CheckCompatibilityResponse", + "shortName": "check_compatibility" }, - "description": "Sample for RunPivotReport", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_async.py", + "description": "Sample for CheckCompatibility", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async", + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_sync", "segments": [ { "end": 50, @@ -1013,28 +467,33 @@ "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_async.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_check_compatibility_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", - "shortName": "BetaAnalyticsDataClient" + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient", + "shortName": "BetaAnalyticsDataAsyncClient" }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.run_pivot_report", + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient.get_metadata", "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", "service": { "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", "shortName": "BetaAnalyticsData" }, - "shortName": "RunPivotReport" + "shortName": "GetMetadata" }, "parameters": [ { "name": "request", - "type": "google.analytics.data_v1beta.types.RunPivotReportRequest" + "type": "google.analytics.data_v1beta.types.GetMetadataRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -1049,22 +508,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.analytics.data_v1beta.types.RunPivotReportResponse", - "shortName": "run_pivot_report" + "resultType": "google.analytics.data_v1beta.types.Metadata", + "shortName": "get_metadata" }, - "description": "Sample for RunPivotReport", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync_21614b9b.py", + "description": "Sample for GetMetadata", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_sync", + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async", "segments": [ { - "end": 50, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 51, "start": 27, "type": "SHORT" }, @@ -1074,22 +533,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync_21614b9b.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_async.py" }, { "canonical": true, @@ -1098,19 +557,23 @@ "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", "shortName": "BetaAnalyticsDataClient" }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.run_pivot_report", + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.get_metadata", "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", "service": { "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", "shortName": "BetaAnalyticsData" }, - "shortName": "RunPivotReport" + "shortName": "GetMetadata" }, "parameters": [ { "name": "request", - "type": "google.analytics.data_v1beta.types.RunPivotReportRequest" + "type": "google.analytics.data_v1beta.types.GetMetadataRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -1125,22 +588,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.analytics.data_v1beta.types.RunPivotReportResponse", - "shortName": "run_pivot_report" + "resultType": "google.analytics.data_v1beta.types.Metadata", + "shortName": "get_metadata" }, - "description": "Sample for RunPivotReport", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync_8115ba39.py", + "description": "Sample for GetMetadata", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_sync", + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_sync", "segments": [ { - "end": 50, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 51, "start": 27, "type": "SHORT" }, @@ -1150,22 +613,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync_8115ba39.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_get_metadata_sync.py" }, { "canonical": true, @@ -1175,19 +638,19 @@ "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient", "shortName": "BetaAnalyticsDataAsyncClient" }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient.run_realtime_report", + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient.run_pivot_report", "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", "service": { "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", "shortName": "BetaAnalyticsData" }, - "shortName": "RunRealtimeReport" + "shortName": "RunPivotReport" }, "parameters": [ { "name": "request", - "type": "google.analytics.data_v1beta.types.RunRealtimeReportRequest" + "type": "google.analytics.data_v1beta.types.RunPivotReportRequest" }, { "name": "retry", @@ -1202,14 +665,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.analytics.data_v1beta.types.RunRealtimeReportResponse", - "shortName": "run_realtime_report" + "resultType": "google.analytics.data_v1beta.types.RunPivotReportResponse", + "shortName": "run_pivot_report" }, - "description": "Sample for RunRealtimeReport", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_async.py", + "description": "Sample for RunPivotReport", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async", + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async", "segments": [ { "end": 50, @@ -1242,7 +705,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_async.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_async.py" }, { "canonical": true, @@ -1251,19 +714,19 @@ "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", "shortName": "BetaAnalyticsDataClient" }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.run_realtime_report", + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.run_pivot_report", "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", "service": { "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", "shortName": "BetaAnalyticsData" }, - "shortName": "RunRealtimeReport" + "shortName": "RunPivotReport" }, "parameters": [ { "name": "request", - "type": "google.analytics.data_v1beta.types.RunRealtimeReportRequest" + "type": "google.analytics.data_v1beta.types.RunPivotReportRequest" }, { "name": "retry", @@ -1278,14 +741,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.analytics.data_v1beta.types.RunRealtimeReportResponse", - "shortName": "run_realtime_report" + "resultType": "google.analytics.data_v1beta.types.RunPivotReportResponse", + "shortName": "run_pivot_report" }, - "description": "Sample for RunRealtimeReport", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync_f8bc1b6b.py", + "description": "Sample for RunPivotReport", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_sync", + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_sync", "segments": [ { "end": 50, @@ -1318,16 +781,17 @@ "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync_f8bc1b6b.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_pivot_report_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", - "shortName": "BetaAnalyticsDataClient" + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient", + "shortName": "BetaAnalyticsDataAsyncClient" }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.run_realtime_report", + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient.run_realtime_report", "method": { "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", "service": { @@ -1358,10 +822,10 @@ "shortName": "run_realtime_report" }, "description": "Sample for RunRealtimeReport", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync_aa3eafd1.py", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_sync", + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async", "segments": [ { "end": 50, @@ -1394,29 +858,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync_aa3eafd1.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_async.py" }, { "canonical": true, "clientMethod": { - "async": true, "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient", - "shortName": "BetaAnalyticsDataAsyncClient" + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", + "shortName": "BetaAnalyticsDataClient" }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient.run_report", + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.run_realtime_report", "method": { - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", "service": { "fullName": "google.analytics.data.v1beta.BetaAnalyticsData", "shortName": "BetaAnalyticsData" }, - "shortName": "RunReport" + "shortName": "RunRealtimeReport" }, "parameters": [ { "name": "request", - "type": "google.analytics.data_v1beta.types.RunReportRequest" + "type": "google.analytics.data_v1beta.types.RunRealtimeReportRequest" }, { "name": "retry", @@ -1431,14 +894,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.analytics.data_v1beta.types.RunReportResponse", - "shortName": "run_report" + "resultType": "google.analytics.data_v1beta.types.RunRealtimeReportResponse", + "shortName": "run_realtime_report" }, - "description": "Sample for RunReport", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_report_async.py", + "description": "Sample for RunRealtimeReport", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async", + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_sync", "segments": [ { "end": 50, @@ -1471,16 +934,17 @@ "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_report_async.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_realtime_report_sync.py" }, { "canonical": true, "clientMethod": { + "async": true, "client": { - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient", - "shortName": "BetaAnalyticsDataClient" + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient", + "shortName": "BetaAnalyticsDataAsyncClient" }, - "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataClient.run_report", + "fullName": "google.analytics.data_v1beta.BetaAnalyticsDataAsyncClient.run_report", "method": { "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunReport", "service": { @@ -1511,10 +975,10 @@ "shortName": "run_report" }, "description": "Sample for RunReport", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync_3a50a6eb.py", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_report_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_sync", + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async", "segments": [ { "end": 50, @@ -1547,7 +1011,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync_3a50a6eb.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_report_async.py" }, { "canonical": true, @@ -1587,7 +1051,7 @@ "shortName": "run_report" }, "description": "Sample for RunReport", - "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync_c82f18e9.py", + "file": "analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_sync", @@ -1623,7 +1087,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync_c82f18e9.py" + "title": "analyticsdata_v1beta_generated_beta_analytics_data_run_report_sync.py" } ] } diff --git a/samples/snippets/get_common_metadata.py b/samples/snippets/get_common_metadata.py index 19a1964..643cf55 100644 --- a/samples/snippets/get_common_metadata.py +++ b/samples/snippets/get_common_metadata.py @@ -22,8 +22,7 @@ """ # [START analyticsdata_get_common_metadata] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import GetMetadataRequest -from google.analytics.data_v1beta.types import MetricType +from google.analytics.data_v1beta.types import GetMetadataRequest, MetricType def run_sample(): diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index 0398d72..c171513 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -22,7 +22,6 @@ import nox - # WARNING - WARNING - WARNING - WARNING - WARNING # WARNING - WARNING - WARNING - WARNING - WARNING # DO NOT EDIT THIS FILE EVER! @@ -180,6 +179,7 @@ def blacken(session: nox.sessions.Session) -> None: # format = isort + black # + @nox.session def format(session: nox.sessions.Session) -> None: """ @@ -207,7 +207,9 @@ def _session_tests( session: nox.sessions.Session, post_install: Callable = None ) -> None: # check for presence of tests - test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob("**/test_*.py", recursive=True) + test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob( + "**/test_*.py", recursive=True + ) test_list.extend(glob.glob("**/tests", recursive=True)) if len(test_list) == 0: @@ -229,9 +231,7 @@ def _session_tests( if os.path.exists("requirements-test.txt"): if os.path.exists("constraints-test.txt"): - session.install( - "-r", "requirements-test.txt", "-c", "constraints-test.txt" - ) + session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt") else: session.install("-r", "requirements-test.txt") with open("requirements-test.txt") as rtfile: @@ -244,9 +244,9 @@ def _session_tests( post_install(session) if "pytest-parallel" in packages: - concurrent_args.extend(['--workers', 'auto', '--tests-per-worker', 'auto']) + concurrent_args.extend(["--workers", "auto", "--tests-per-worker", "auto"]) elif "pytest-xdist" in packages: - concurrent_args.extend(['-n', 'auto']) + concurrent_args.extend(["-n", "auto"]) session.run( "pytest", @@ -276,7 +276,7 @@ def py(session: nox.sessions.Session) -> None: def _get_repo_root() -> Optional[str]: - """ Returns the root folder of the project. """ + """Returns the root folder of the project.""" # Get root of this repository. Assume we don't have directories nested deeper than 10 items. p = Path(os.getcwd()) for i in range(10): diff --git a/samples/snippets/quickstart.py b/samples/snippets/quickstart.py index ea1d771..f1e3538 100644 --- a/samples/snippets/quickstart.py +++ b/samples/snippets/quickstart.py @@ -25,10 +25,12 @@ """ # [START analyticsdata_quickstart] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + RunReportRequest, +) def sample_run_report(property_id="YOUR-GA4-PROPERTY-ID"): diff --git a/samples/snippets/quickstart_json_credentials.py b/samples/snippets/quickstart_json_credentials.py index 97c2889..1b5723e 100644 --- a/samples/snippets/quickstart_json_credentials.py +++ b/samples/snippets/quickstart_json_credentials.py @@ -29,10 +29,12 @@ """ # [START analyticsdata_json_credentials_quickstart] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + RunReportRequest, +) def sample_run_report(property_id="YOUR-GA4-PROPERTY-ID", credentials_json_path=""): diff --git a/samples/snippets/quickstart_oauth2.py b/samples/snippets/quickstart_oauth2.py index aa488ee..e8282cc 100644 --- a/samples/snippets/quickstart_oauth2.py +++ b/samples/snippets/quickstart_oauth2.py @@ -26,10 +26,12 @@ """ # [START analyticsdata_oauth2_quickstart] from google.analytics.data import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + RunReportRequest, +) from google_auth_oauthlib import flow diff --git a/samples/snippets/run_batch_report.py b/samples/snippets/run_batch_report.py index 1915dbc..07cdf40 100644 --- a/samples/snippets/run_batch_report.py +++ b/samples/snippets/run_batch_report.py @@ -22,11 +22,13 @@ """ # [START analyticsdata_run_batch_report] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import BatchRunReportsRequest -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + BatchRunReportsRequest, + DateRange, + Dimension, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_funnel_report.py b/samples/snippets/run_funnel_report.py index 446a7a0..937e3e8 100644 --- a/samples/snippets/run_funnel_report.py +++ b/samples/snippets/run_funnel_report.py @@ -22,17 +22,19 @@ """ # [START analyticsdata_run_funnel_report] from google.analytics.data_v1alpha import AlphaAnalyticsDataClient -from google.analytics.data_v1alpha.types import DateRange -from google.analytics.data_v1alpha.types import Dimension -from google.analytics.data_v1alpha.types import Funnel -from google.analytics.data_v1alpha.types import FunnelBreakdown -from google.analytics.data_v1alpha.types import FunnelEventFilter -from google.analytics.data_v1alpha.types import FunnelFieldFilter -from google.analytics.data_v1alpha.types import FunnelFilterExpression -from google.analytics.data_v1alpha.types import FunnelFilterExpressionList -from google.analytics.data_v1alpha.types import FunnelStep -from google.analytics.data_v1alpha.types import RunFunnelReportRequest -from google.analytics.data_v1alpha.types import StringFilter +from google.analytics.data_v1alpha.types import ( + DateRange, + Dimension, + Funnel, + FunnelBreakdown, + FunnelEventFilter, + FunnelFieldFilter, + FunnelFilterExpression, + FunnelFilterExpressionList, + FunnelStep, + RunFunnelReportRequest, + StringFilter, +) def run_sample(): diff --git a/samples/snippets/run_pivot_report.py b/samples/snippets/run_pivot_report.py index 1b620b3..699780c 100644 --- a/samples/snippets/run_pivot_report.py +++ b/samples/snippets/run_pivot_report.py @@ -22,12 +22,14 @@ """ # [START analyticsdata_run_pivot_report] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import OrderBy -from google.analytics.data_v1beta.types import Pivot -from google.analytics.data_v1beta.types import RunPivotReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + OrderBy, + Pivot, + RunPivotReportRequest, +) def run_sample(): diff --git a/samples/snippets/run_realtime_report.py b/samples/snippets/run_realtime_report.py index f106a16..5efd627 100644 --- a/samples/snippets/run_realtime_report.py +++ b/samples/snippets/run_realtime_report.py @@ -22,9 +22,11 @@ """ # [START analyticsdata_run_realtime_report] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunRealtimeReportRequest +from google.analytics.data_v1beta.types import ( + Dimension, + Metric, + RunRealtimeReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_realtime_report_with_minute_ranges.py b/samples/snippets/run_realtime_report_with_minute_ranges.py index 4365ff1..2db3772 100644 --- a/samples/snippets/run_realtime_report_with_minute_ranges.py +++ b/samples/snippets/run_realtime_report_with_minute_ranges.py @@ -22,9 +22,11 @@ """ # [START analyticsdata_run_realtime_report_with_minute_ranges] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import MinuteRange -from google.analytics.data_v1beta.types import RunRealtimeReportRequest +from google.analytics.data_v1beta.types import ( + Metric, + MinuteRange, + RunRealtimeReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_realtime_report_with_multiple_dimensions.py b/samples/snippets/run_realtime_report_with_multiple_dimensions.py index 3726681..e4c1fe0 100644 --- a/samples/snippets/run_realtime_report_with_multiple_dimensions.py +++ b/samples/snippets/run_realtime_report_with_multiple_dimensions.py @@ -22,9 +22,11 @@ """ # [START analyticsdata_run_realtime_report_with_multiple_dimensions] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunRealtimeReportRequest +from google.analytics.data_v1beta.types import ( + Dimension, + Metric, + RunRealtimeReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_realtime_report_with_multiple_metrics.py b/samples/snippets/run_realtime_report_with_multiple_metrics.py index c87731d..831b32b 100644 --- a/samples/snippets/run_realtime_report_with_multiple_metrics.py +++ b/samples/snippets/run_realtime_report_with_multiple_metrics.py @@ -22,9 +22,11 @@ """ # [START analyticsdata_run_realtime_report_with_multiple_metrics] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunRealtimeReportRequest +from google.analytics.data_v1beta.types import ( + Dimension, + Metric, + RunRealtimeReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report.py b/samples/snippets/run_report.py index 5929a2e..d3c19ca 100644 --- a/samples/snippets/run_report.py +++ b/samples/snippets/run_report.py @@ -22,11 +22,13 @@ """ # [START analyticsdata_run_report] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import MetricType -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + MetricType, + RunReportRequest, +) def run_sample(): diff --git a/samples/snippets/run_report_with_aggregations.py b/samples/snippets/run_report_with_aggregations.py index 3b77fd8..9cee325 100644 --- a/samples/snippets/run_report_with_aggregations.py +++ b/samples/snippets/run_report_with_aggregations.py @@ -22,11 +22,13 @@ """ # [START analyticsdata_run_report_with_aggregations] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import MetricAggregation -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + MetricAggregation, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_cohorts.py b/samples/snippets/run_report_with_cohorts.py index ef0e263..38442a1 100644 --- a/samples/snippets/run_report_with_cohorts.py +++ b/samples/snippets/run_report_with_cohorts.py @@ -22,13 +22,15 @@ """ # [START analyticsdata_run_report_with_cohorts] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import Cohort -from google.analytics.data_v1beta.types import CohortSpec -from google.analytics.data_v1beta.types import CohortsRange -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + Cohort, + CohortSpec, + CohortsRange, + DateRange, + Dimension, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_date_ranges.py b/samples/snippets/run_report_with_date_ranges.py index 73fae80..b228425 100644 --- a/samples/snippets/run_report_with_date_ranges.py +++ b/samples/snippets/run_report_with_date_ranges.py @@ -22,10 +22,12 @@ """ # [START analyticsdata_run_report_with_date_ranges] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_dimension_and_metric_filters.py b/samples/snippets/run_report_with_dimension_and_metric_filters.py index 8935e32..cc013a5 100644 --- a/samples/snippets/run_report_with_dimension_and_metric_filters.py +++ b/samples/snippets/run_report_with_dimension_and_metric_filters.py @@ -22,14 +22,16 @@ """ # [START analyticsdata_run_report_with_dimension_and_metric_filters] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Filter -from google.analytics.data_v1beta.types import FilterExpression -from google.analytics.data_v1beta.types import FilterExpressionList -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import NumericValue -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Filter, + FilterExpression, + FilterExpressionList, + Metric, + NumericValue, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_dimension_exclude_filter.py b/samples/snippets/run_report_with_dimension_exclude_filter.py index 938cee9..532e17f 100644 --- a/samples/snippets/run_report_with_dimension_exclude_filter.py +++ b/samples/snippets/run_report_with_dimension_exclude_filter.py @@ -22,12 +22,14 @@ """ # [START analyticsdata_run_report_with_dimension_exclude_filter] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Filter -from google.analytics.data_v1beta.types import FilterExpression -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Filter, + FilterExpression, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_dimension_filter.py b/samples/snippets/run_report_with_dimension_filter.py index d9568a7..64e899f 100644 --- a/samples/snippets/run_report_with_dimension_filter.py +++ b/samples/snippets/run_report_with_dimension_filter.py @@ -22,12 +22,14 @@ """ # [START analyticsdata_run_report_with_dimension_filter] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Filter -from google.analytics.data_v1beta.types import FilterExpression -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Filter, + FilterExpression, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_dimension_in_list_filter.py b/samples/snippets/run_report_with_dimension_in_list_filter.py index e4bd7e3..14c5b49 100644 --- a/samples/snippets/run_report_with_dimension_in_list_filter.py +++ b/samples/snippets/run_report_with_dimension_in_list_filter.py @@ -22,12 +22,14 @@ """ # [START analyticsdata_run_report_with_dimension_in_list_filter] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Filter -from google.analytics.data_v1beta.types import FilterExpression -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Filter, + FilterExpression, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_multiple_dimension_filters.py b/samples/snippets/run_report_with_multiple_dimension_filters.py index e1002af..0fe0608 100644 --- a/samples/snippets/run_report_with_multiple_dimension_filters.py +++ b/samples/snippets/run_report_with_multiple_dimension_filters.py @@ -22,13 +22,15 @@ """ # [START analyticsdata_run_report_with_multiple_dimension_filters] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Filter -from google.analytics.data_v1beta.types import FilterExpression -from google.analytics.data_v1beta.types import FilterExpressionList -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Filter, + FilterExpression, + FilterExpressionList, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_multiple_dimensions.py b/samples/snippets/run_report_with_multiple_dimensions.py index 78a4a1c..4b0e6ba 100644 --- a/samples/snippets/run_report_with_multiple_dimensions.py +++ b/samples/snippets/run_report_with_multiple_dimensions.py @@ -22,10 +22,12 @@ """ # [START analyticsdata_run_report_with_multiple_dimensions] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_multiple_metrics.py b/samples/snippets/run_report_with_multiple_metrics.py index d3546df..279ed40 100644 --- a/samples/snippets/run_report_with_multiple_metrics.py +++ b/samples/snippets/run_report_with_multiple_metrics.py @@ -22,10 +22,12 @@ """ # [START analyticsdata_run_report_with_multiple_metrics] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_named_date_ranges.py b/samples/snippets/run_report_with_named_date_ranges.py index c5bbae4..41aee5b 100644 --- a/samples/snippets/run_report_with_named_date_ranges.py +++ b/samples/snippets/run_report_with_named_date_ranges.py @@ -22,10 +22,12 @@ """ # [START analyticsdata_run_report_with_named_date_ranges] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_ordering.py b/samples/snippets/run_report_with_ordering.py index f55bf5c..fad333a 100644 --- a/samples/snippets/run_report_with_ordering.py +++ b/samples/snippets/run_report_with_ordering.py @@ -22,11 +22,13 @@ """ # [START analyticsdata_run_report_with_ordering] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import OrderBy -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + OrderBy, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_pagination.py b/samples/snippets/run_report_with_pagination.py index 487f325..9211993 100644 --- a/samples/snippets/run_report_with_pagination.py +++ b/samples/snippets/run_report_with_pagination.py @@ -22,10 +22,12 @@ """ # [START analyticsdata_run_report_with_pagination] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + RunReportRequest, +) from run_report import print_run_report_response diff --git a/samples/snippets/run_report_with_property_quota.py b/samples/snippets/run_report_with_property_quota.py index 76bc3d3..cd87336 100644 --- a/samples/snippets/run_report_with_property_quota.py +++ b/samples/snippets/run_report_with_property_quota.py @@ -22,10 +22,12 @@ """ # [START analyticsdata_run_report_with_property_quota] from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import DateRange -from google.analytics.data_v1beta.types import Dimension -from google.analytics.data_v1beta.types import Metric -from google.analytics.data_v1beta.types import RunReportRequest +from google.analytics.data_v1beta.types import ( + DateRange, + Dimension, + Metric, + RunReportRequest, +) def run_sample(): diff --git a/scripts/fixup_data_v1alpha_keywords.py b/scripts/fixup_data_v1alpha_keywords.py new file mode 100644 index 0000000..8a3ca04 --- /dev/null +++ b/scripts/fixup_data_v1alpha_keywords.py @@ -0,0 +1,176 @@ +#! /usr/bin/env python3 +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +import argparse +import os +import libcst as cst +import pathlib +import sys +from typing import (Any, Callable, Dict, List, Sequence, Tuple) + + +def partition( + predicate: Callable[[Any], bool], + iterator: Sequence[Any] +) -> Tuple[List[Any], List[Any]]: + """A stable, out-of-place partition.""" + results = ([], []) + + for i in iterator: + results[int(predicate(i))].append(i) + + # Returns trueList, falseList + return results[1], results[0] + + +class dataCallTransformer(cst.CSTTransformer): + CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') + METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { + 'run_funnel_report': ('property', 'date_ranges', 'funnel', 'funnel_breakdown', 'funnel_next_action', 'funnel_visualization_type', 'segments', 'limit', 'dimension_filter', 'return_property_quota', ), + } + + def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: + try: + key = original.func.attr.value + kword_params = self.METHOD_TO_PARAMS[key] + except (AttributeError, KeyError): + # Either not a method from the API or too convoluted to be sure. + return updated + + # If the existing code is valid, keyword args come after positional args. + # Therefore, all positional args must map to the first parameters. + args, kwargs = partition(lambda a: not bool(a.keyword), updated.args) + if any(k.keyword.value == "request" for k in kwargs): + # We've already fixed this file, don't fix it again. + return updated + + kwargs, ctrl_kwargs = partition( + lambda a: a.keyword.value not in self.CTRL_PARAMS, + kwargs + ) + + args, ctrl_args = args[:len(kword_params)], args[len(kword_params):] + ctrl_kwargs.extend(cst.Arg(value=a.value, keyword=cst.Name(value=ctrl)) + for a, ctrl in zip(ctrl_args, self.CTRL_PARAMS)) + + request_arg = cst.Arg( + value=cst.Dict([ + cst.DictElement( + cst.SimpleString("'{}'".format(name)), +cst.Element(value=arg.value) + ) + # Note: the args + kwargs looks silly, but keep in mind that + # the control parameters had to be stripped out, and that + # those could have been passed positionally or by keyword. + for name, arg in zip(kword_params, args + kwargs)]), + keyword=cst.Name("request") + ) + + return updated.with_changes( + args=[request_arg] + ctrl_kwargs + ) + + +def fix_files( + in_dir: pathlib.Path, + out_dir: pathlib.Path, + *, + transformer=dataCallTransformer(), +): + """Duplicate the input dir to the output dir, fixing file method calls. + + Preconditions: + * in_dir is a real directory + * out_dir is a real, empty directory + """ + pyfile_gen = ( + pathlib.Path(os.path.join(root, f)) + for root, _, files in os.walk(in_dir) + for f in files if os.path.splitext(f)[1] == ".py" + ) + + for fpath in pyfile_gen: + with open(fpath, 'r') as f: + src = f.read() + + # Parse the code and insert method call fixes. + tree = cst.parse_module(src) + updated = tree.visit(transformer) + + # Create the path and directory structure for the new file. + updated_path = out_dir.joinpath(fpath.relative_to(in_dir)) + updated_path.parent.mkdir(parents=True, exist_ok=True) + + # Generate the updated source file at the corresponding path. + with open(updated_path, 'w') as f: + f.write(updated.code) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description="""Fix up source that uses the data client library. + +The existing sources are NOT overwritten but are copied to output_dir with changes made. + +Note: This tool operates at a best-effort level at converting positional + parameters in client method calls to keyword based parameters. + Cases where it WILL FAIL include + A) * or ** expansion in a method call. + B) Calls via function or method alias (includes free function calls) + C) Indirect or dispatched calls (e.g. the method is looked up dynamically) + + These all constitute false negatives. The tool will also detect false + positives when an API method shares a name with another method. +""") + parser.add_argument( + '-d', + '--input-directory', + required=True, + dest='input_dir', + help='the input directory to walk for python files to fix up', + ) + parser.add_argument( + '-o', + '--output-directory', + required=True, + dest='output_dir', + help='the directory to output files fixed via un-flattening', + ) + args = parser.parse_args() + input_dir = pathlib.Path(args.input_dir) + output_dir = pathlib.Path(args.output_dir) + if not input_dir.is_dir(): + print( + f"input directory '{input_dir}' does not exist or is not a directory", + file=sys.stderr, + ) + sys.exit(-1) + + if not output_dir.is_dir(): + print( + f"output directory '{output_dir}' does not exist or is not a directory", + file=sys.stderr, + ) + sys.exit(-1) + + if os.listdir(output_dir): + print( + f"output directory '{output_dir}' is not empty", + file=sys.stderr, + ) + sys.exit(-1) + + fix_files(input_dir, output_dir) diff --git a/scripts/fixup_data_v1beta_keywords.py b/scripts/fixup_data_v1beta_keywords.py new file mode 100644 index 0000000..3f3b1da --- /dev/null +++ b/scripts/fixup_data_v1beta_keywords.py @@ -0,0 +1,182 @@ +#! /usr/bin/env python3 +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +import argparse +import os +import libcst as cst +import pathlib +import sys +from typing import (Any, Callable, Dict, List, Sequence, Tuple) + + +def partition( + predicate: Callable[[Any], bool], + iterator: Sequence[Any] +) -> Tuple[List[Any], List[Any]]: + """A stable, out-of-place partition.""" + results = ([], []) + + for i in iterator: + results[int(predicate(i))].append(i) + + # Returns trueList, falseList + return results[1], results[0] + + +class dataCallTransformer(cst.CSTTransformer): + CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') + METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { + 'batch_run_pivot_reports': ('property', 'requests', ), + 'batch_run_reports': ('property', 'requests', ), + 'check_compatibility': ('property', 'dimensions', 'metrics', 'dimension_filter', 'metric_filter', 'compatibility_filter', ), + 'get_metadata': ('name', ), + 'run_pivot_report': ('property', 'dimensions', 'metrics', 'date_ranges', 'pivots', 'dimension_filter', 'metric_filter', 'currency_code', 'cohort_spec', 'keep_empty_rows', 'return_property_quota', ), + 'run_realtime_report': ('property', 'dimensions', 'metrics', 'dimension_filter', 'metric_filter', 'limit', 'metric_aggregations', 'order_bys', 'return_property_quota', 'minute_ranges', ), + 'run_report': ('property', 'dimensions', 'metrics', 'date_ranges', 'dimension_filter', 'metric_filter', 'offset', 'limit', 'metric_aggregations', 'order_bys', 'currency_code', 'cohort_spec', 'keep_empty_rows', 'return_property_quota', ), + } + + def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: + try: + key = original.func.attr.value + kword_params = self.METHOD_TO_PARAMS[key] + except (AttributeError, KeyError): + # Either not a method from the API or too convoluted to be sure. + return updated + + # If the existing code is valid, keyword args come after positional args. + # Therefore, all positional args must map to the first parameters. + args, kwargs = partition(lambda a: not bool(a.keyword), updated.args) + if any(k.keyword.value == "request" for k in kwargs): + # We've already fixed this file, don't fix it again. + return updated + + kwargs, ctrl_kwargs = partition( + lambda a: a.keyword.value not in self.CTRL_PARAMS, + kwargs + ) + + args, ctrl_args = args[:len(kword_params)], args[len(kword_params):] + ctrl_kwargs.extend(cst.Arg(value=a.value, keyword=cst.Name(value=ctrl)) + for a, ctrl in zip(ctrl_args, self.CTRL_PARAMS)) + + request_arg = cst.Arg( + value=cst.Dict([ + cst.DictElement( + cst.SimpleString("'{}'".format(name)), +cst.Element(value=arg.value) + ) + # Note: the args + kwargs looks silly, but keep in mind that + # the control parameters had to be stripped out, and that + # those could have been passed positionally or by keyword. + for name, arg in zip(kword_params, args + kwargs)]), + keyword=cst.Name("request") + ) + + return updated.with_changes( + args=[request_arg] + ctrl_kwargs + ) + + +def fix_files( + in_dir: pathlib.Path, + out_dir: pathlib.Path, + *, + transformer=dataCallTransformer(), +): + """Duplicate the input dir to the output dir, fixing file method calls. + + Preconditions: + * in_dir is a real directory + * out_dir is a real, empty directory + """ + pyfile_gen = ( + pathlib.Path(os.path.join(root, f)) + for root, _, files in os.walk(in_dir) + for f in files if os.path.splitext(f)[1] == ".py" + ) + + for fpath in pyfile_gen: + with open(fpath, 'r') as f: + src = f.read() + + # Parse the code and insert method call fixes. + tree = cst.parse_module(src) + updated = tree.visit(transformer) + + # Create the path and directory structure for the new file. + updated_path = out_dir.joinpath(fpath.relative_to(in_dir)) + updated_path.parent.mkdir(parents=True, exist_ok=True) + + # Generate the updated source file at the corresponding path. + with open(updated_path, 'w') as f: + f.write(updated.code) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description="""Fix up source that uses the data client library. + +The existing sources are NOT overwritten but are copied to output_dir with changes made. + +Note: This tool operates at a best-effort level at converting positional + parameters in client method calls to keyword based parameters. + Cases where it WILL FAIL include + A) * or ** expansion in a method call. + B) Calls via function or method alias (includes free function calls) + C) Indirect or dispatched calls (e.g. the method is looked up dynamically) + + These all constitute false negatives. The tool will also detect false + positives when an API method shares a name with another method. +""") + parser.add_argument( + '-d', + '--input-directory', + required=True, + dest='input_dir', + help='the input directory to walk for python files to fix up', + ) + parser.add_argument( + '-o', + '--output-directory', + required=True, + dest='output_dir', + help='the directory to output files fixed via un-flattening', + ) + args = parser.parse_args() + input_dir = pathlib.Path(args.input_dir) + output_dir = pathlib.Path(args.output_dir) + if not input_dir.is_dir(): + print( + f"input directory '{input_dir}' does not exist or is not a directory", + file=sys.stderr, + ) + sys.exit(-1) + + if not output_dir.is_dir(): + print( + f"output directory '{output_dir}' does not exist or is not a directory", + file=sys.stderr, + ) + sys.exit(-1) + + if os.listdir(output_dir): + print( + f"output directory '{output_dir}' is not empty", + file=sys.stderr, + ) + sys.exit(-1) + + fix_files(input_dir, output_dir) diff --git a/setup.py b/setup.py index ec65677..ea7b351 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- - -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,12 +13,34 @@ # See the License for the specific language governing permissions and # limitations under the License. # - import io import os + import setuptools # type: ignore -version = "0.14.2" +package_root = os.path.abspath(os.path.dirname(__file__)) + +name = "google-analytics-data" + + +description = "Google Analytics Data API client library" + +version = {} +with open(os.path.join(package_root, "google/analytics/data/gapic_version.py")) as fp: + exec(fp.read(), version) +version = version["__version__"] + +if version[0] == "0": + release_status = "Development Status :: 4 - Beta" +else: + release_status = "Development Status :: 5 - Production/Stable" + +dependencies = [ + "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "proto-plus >= 1.22.0, <2.0.0dev", + "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", +] +url = "https://github.com/googleapis/python-analytics-data" package_root = os.path.abspath(os.path.dirname(__file__)) @@ -27,39 +48,43 @@ with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read() +packages = [ + package + for package in setuptools.PEP420PackageFinder.find() + if package.startswith("google") +] + +namespaces = ["google"] +if "google.cloud" in packages: + namespaces.append("google.cloud") setuptools.setup( - name="google-analytics-data", + name=name, version=version, + description=description, long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", license="Apache 2.0", - url="https://github.com/googleapis/python-analytics-data", - packages=[ - package - for package in setuptools.PEP420PackageFinder.find() - if package.startswith("google") - ], - namespace_packages=("google", "google.analytics"), - platforms="Posix; MacOS X; Windows", - include_package_data=True, - install_requires=( - "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", - "proto-plus >= 1.22.0, <2.0.0dev", - "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", - ), - python_requires=">=3.7", + url=url, classifiers=[ - "Development Status :: 4 - Beta", + release_status, "Intended Audience :: Developers", - "Operating System :: OS Independent", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Operating System :: OS Independent", "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules", ], + platforms="Posix; MacOS X; Windows", + packages=packages, + python_requires=">=3.7", + namespace_packages=namespaces, + install_requires=dependencies, + include_package_data=True, zip_safe=False, ) diff --git a/testing/constraints-3.10.txt b/testing/constraints-3.10.txt index e69de29..ed7f9ae 100644 --- a/testing/constraints-3.10.txt +++ b/testing/constraints-3.10.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/testing/constraints-3.11.txt b/testing/constraints-3.11.txt index e69de29..ed7f9ae 100644 --- a/testing/constraints-3.11.txt +++ b/testing/constraints-3.11.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt index a8f5487..aca9f2d 100644 --- a/testing/constraints-3.7.txt +++ b/testing/constraints-3.7.txt @@ -1,10 +1,11 @@ # This constraints file is used to check that lower bounds # are correct in setup.py -# List *all* library dependencies and extras in this file. +# List all library dependencies and extras in this file. # Pin the version to the lower bound. -# -# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", +# Then this file should have google-cloud-foo==1.14.0 +# This file is intentionally left empty to test the +# latest versions of dependencies. google-api-core==1.33.2 proto-plus==1.22.0 protobuf==3.19.5 diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index e69de29..ed7f9ae 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index e69de29..ed7f9ae 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/tests/unit/gapic/data_v1alpha/test_alpha_analytics_data.py b/tests/unit/gapic/data_v1alpha/test_alpha_analytics_data.py index 2c4b6e6..f409764 100644 --- a/tests/unit/gapic/data_v1alpha/test_alpha_analytics_data.py +++ b/tests/unit/gapic/data_v1alpha/test_alpha_analytics_data.py @@ -22,40 +22,33 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format -from google.analytics.data_v1alpha.services.alpha_analytics_data import ( - AlphaAnalyticsDataAsyncClient, -) -from google.analytics.data_v1alpha.services.alpha_analytics_data import ( - AlphaAnalyticsDataClient, -) -from google.analytics.data_v1alpha.services.alpha_analytics_data import transports -from google.analytics.data_v1alpha.types import analytics_data_api -from google.analytics.data_v1alpha.types import data +from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template from google.api_core import client_options from google.api_core import exceptions as core_exceptions -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError from google.oauth2 import service_account from google.protobuf import duration_pb2 # type: ignore -import google.auth +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +from google.analytics.data_v1alpha.services.alpha_analytics_data import ( + AlphaAnalyticsDataAsyncClient, + AlphaAnalyticsDataClient, + transports, +) +from google.analytics.data_v1alpha.types import analytics_data_api, data def client_cert_source_callback(): diff --git a/tests/unit/gapic/data_v1beta/test_beta_analytics_data.py b/tests/unit/gapic/data_v1beta/test_beta_analytics_data.py index 2ed805f..fa9f6c2 100644 --- a/tests/unit/gapic/data_v1beta/test_beta_analytics_data.py +++ b/tests/unit/gapic/data_v1beta/test_beta_analytics_data.py @@ -22,39 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule + +from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account +from google.protobuf import json_format +import grpc +from grpc.experimental import aio from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response from requests.sessions import Session -from google.protobuf import json_format from google.analytics.data_v1beta.services.beta_analytics_data import ( BetaAnalyticsDataAsyncClient, -) -from google.analytics.data_v1beta.services.beta_analytics_data import ( BetaAnalyticsDataClient, + transports, ) -from google.analytics.data_v1beta.services.beta_analytics_data import transports -from google.analytics.data_v1beta.types import analytics_data_api -from google.analytics.data_v1beta.types import data -from google.api_core import client_options -from google.api_core import exceptions as core_exceptions -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template -from google.auth import credentials as ga_credentials -from google.auth.exceptions import MutualTLSChannelError -from google.oauth2 import service_account -import google.auth +from google.analytics.data_v1beta.types import analytics_data_api, data def client_cert_source_callback():