diff --git a/.github/release-please.yml b/.github/release-please.yml index 6def37a..e9a4f00 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,5 +1,6 @@ releaseType: python handleGHRelease: true +manifest: true # NOTE: this section is generated by synthtool.languages.python # See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py branches: diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..122a59d --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.0.4" +} diff --git a/docs/live_stream_v1/types.rst b/docs/live_stream_v1/types.rst index 5f3e42f..939beb8 100644 --- a/docs/live_stream_v1/types.rst +++ b/docs/live_stream_v1/types.rst @@ -3,5 +3,4 @@ Types for Google Cloud Video Live Stream v1 API .. automodule:: google.cloud.video.live_stream_v1.types :members: - :undoc-members: :show-inheritance: diff --git a/google/cloud/video/live_stream/__init__.py b/google/cloud/video/live_stream/__init__.py index 8f641ff..75ada81 100644 --- a/google/cloud/video/live_stream/__init__.py +++ b/google/cloud/video/live_stream/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.video.live_stream import gapic_version as package_version + +__version__ = package_version.__version__ + from google.cloud.video.live_stream_v1.services.livestream_service.async_client import ( LivestreamServiceAsyncClient, diff --git a/google/cloud/video/live_stream/gapic_version.py b/google/cloud/video/live_stream/gapic_version.py new file mode 100644 index 0000000..6cfc979 --- /dev/null +++ b/google/cloud/video/live_stream/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__ = "1.0.4" # {x-release-please-version} diff --git a/google/cloud/video/live_stream_v1/__init__.py b/google/cloud/video/live_stream_v1/__init__.py index 0132dbb..9e2805a 100644 --- a/google/cloud/video/live_stream_v1/__init__.py +++ b/google/cloud/video/live_stream_v1/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.video.live_stream import gapic_version as package_version + +__version__ = package_version.__version__ + from .services.livestream_service import ( LivestreamServiceAsyncClient, diff --git a/google/cloud/video/live_stream_v1/services/livestream_service/async_client.py b/google/cloud/video/live_stream_v1/services/livestream_service/async_client.py index 59a7560..22b8620 100644 --- a/google/cloud/video/live_stream_v1/services/livestream_service/async_client.py +++ b/google/cloud/video/live_stream_v1/services/livestream_service/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -176,9 +186,9 @@ def transport(self) -> LivestreamServiceTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, LivestreamServiceTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the livestream service client. @@ -222,13 +232,13 @@ def __init__( async def create_channel( self, - request: Union[service.CreateChannelRequest, dict] = None, + request: Optional[Union[service.CreateChannelRequest, dict]] = None, *, - parent: str = None, - channel: resources.Channel = None, - channel_id: str = None, + parent: Optional[str] = None, + channel: Optional[resources.Channel] = None, + channel_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a channel with the provided unique ID in the @@ -266,7 +276,7 @@ async def sample_create_channel(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.CreateChannelRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.CreateChannelRequest, dict]]): The request object. Request message for "LivestreamService.CreateChannel". parent (:class:`str`): @@ -365,11 +375,11 @@ async def sample_create_channel(): async def list_channels( self, - request: Union[service.ListChannelsRequest, dict] = None, + request: Optional[Union[service.ListChannelsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListChannelsAsyncPager: r"""Returns a list of all channels in the specified @@ -403,7 +413,7 @@ async def sample_list_channels(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.ListChannelsRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.ListChannelsRequest, dict]]): The request object. Request message for "LivestreamService.ListChannels". parent (:class:`str`): @@ -490,11 +500,11 @@ async def sample_list_channels(): async def get_channel( self, - request: Union[service.GetChannelRequest, dict] = None, + request: Optional[Union[service.GetChannelRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> resources.Channel: r"""Returns the specified channel. @@ -526,7 +536,7 @@ async def sample_get_channel(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.GetChannelRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.GetChannelRequest, dict]]): The request object. Request message for "LivestreamService.GetChannel". name (:class:`str`): @@ -608,11 +618,11 @@ async def sample_get_channel(): async def delete_channel( self, - request: Union[service.DeleteChannelRequest, dict] = None, + request: Optional[Union[service.DeleteChannelRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes the specified channel. @@ -648,7 +658,7 @@ async def sample_delete_channel(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.DeleteChannelRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.DeleteChannelRequest, dict]]): The request object. Request message for "LivestreamService.DeleteChannel". name (:class:`str`): @@ -733,12 +743,12 @@ async def sample_delete_channel(): async def update_channel( self, - request: Union[service.UpdateChannelRequest, dict] = None, + request: Optional[Union[service.UpdateChannelRequest, dict]] = None, *, - channel: resources.Channel = None, - update_mask: field_mask_pb2.FieldMask = None, + channel: Optional[resources.Channel] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates the specified channel. @@ -773,7 +783,7 @@ async def sample_update_channel(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.UpdateChannelRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.UpdateChannelRequest, dict]]): The request object. Request message for "LivestreamService.UpdateChannel". channel (:class:`google.cloud.video.live_stream_v1.types.Channel`): @@ -876,11 +886,11 @@ async def sample_update_channel(): async def start_channel( self, - request: Union[service.StartChannelRequest, dict] = None, + request: Optional[Union[service.StartChannelRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Starts the specified channel. Part of the video @@ -918,7 +928,7 @@ async def sample_start_channel(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.StartChannelRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.StartChannelRequest, dict]]): The request object. Request message for "LivestreamService.StartChannel". name (:class:`str`): @@ -997,11 +1007,11 @@ async def sample_start_channel(): async def stop_channel( self, - request: Union[service.StopChannelRequest, dict] = None, + request: Optional[Union[service.StopChannelRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Stops the specified channel. Part of the video @@ -1039,7 +1049,7 @@ async def sample_stop_channel(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.StopChannelRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.StopChannelRequest, dict]]): The request object. Request message for "LivestreamService.StopChannel". name (:class:`str`): @@ -1118,13 +1128,13 @@ async def sample_stop_channel(): async def create_input( self, - request: Union[service.CreateInputRequest, dict] = None, + request: Optional[Union[service.CreateInputRequest, dict]] = None, *, - parent: str = None, - input: resources.Input = None, - input_id: str = None, + parent: Optional[str] = None, + input: Optional[resources.Input] = None, + input_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates an input with the provided unique ID in the @@ -1162,7 +1172,7 @@ async def sample_create_input(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.CreateInputRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.CreateInputRequest, dict]]): The request object. Request message for "LivestreamService.CreateInput". parent (:class:`str`): @@ -1257,11 +1267,11 @@ async def sample_create_input(): async def list_inputs( self, - request: Union[service.ListInputsRequest, dict] = None, + request: Optional[Union[service.ListInputsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInputsAsyncPager: r"""Returns a list of all inputs in the specified region. @@ -1294,7 +1304,7 @@ async def sample_list_inputs(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.ListInputsRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.ListInputsRequest, dict]]): The request object. Request message for "LivestreamService.ListInputs". parent (:class:`str`): @@ -1381,11 +1391,11 @@ async def sample_list_inputs(): async def get_input( self, - request: Union[service.GetInputRequest, dict] = None, + request: Optional[Union[service.GetInputRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> resources.Input: r"""Returns the specified input. @@ -1417,7 +1427,7 @@ async def sample_get_input(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.GetInputRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.GetInputRequest, dict]]): The request object. Request message for "LivestreamService.GetInput". name (:class:`str`): @@ -1494,11 +1504,11 @@ async def sample_get_input(): async def delete_input( self, - request: Union[service.DeleteInputRequest, dict] = None, + request: Optional[Union[service.DeleteInputRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes the specified input. @@ -1534,7 +1544,7 @@ async def sample_delete_input(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.DeleteInputRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.DeleteInputRequest, dict]]): The request object. Request message for "LivestreamService.DeleteInput". name (:class:`str`): @@ -1619,12 +1629,12 @@ async def sample_delete_input(): async def update_input( self, - request: Union[service.UpdateInputRequest, dict] = None, + request: Optional[Union[service.UpdateInputRequest, dict]] = None, *, - input: resources.Input = None, - update_mask: field_mask_pb2.FieldMask = None, + input: Optional[resources.Input] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates the specified input. @@ -1659,7 +1669,7 @@ async def sample_update_input(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.UpdateInputRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.UpdateInputRequest, dict]]): The request object. Request message for "LivestreamService.UpdateInput". input (:class:`google.cloud.video.live_stream_v1.types.Input`): @@ -1754,13 +1764,13 @@ async def sample_update_input(): async def create_event( self, - request: Union[service.CreateEventRequest, dict] = None, + request: Optional[Union[service.CreateEventRequest, dict]] = None, *, - parent: str = None, - event: resources.Event = None, - event_id: str = None, + parent: Optional[str] = None, + event: Optional[resources.Event] = None, + event_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> resources.Event: r"""Creates an event with the provided unique ID in the @@ -1794,7 +1804,7 @@ async def sample_create_event(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.CreateEventRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.CreateEventRequest, dict]]): The request object. Request message for "LivestreamService.CreateEvent". parent (:class:`str`): @@ -1882,11 +1892,11 @@ async def sample_create_event(): async def list_events( self, - request: Union[service.ListEventsRequest, dict] = None, + request: Optional[Union[service.ListEventsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListEventsAsyncPager: r"""Returns a list of all events in the specified @@ -1920,7 +1930,7 @@ async def sample_list_events(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.ListEventsRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.ListEventsRequest, dict]]): The request object. Request message for "LivestreamService.ListEvents". parent (:class:`str`): @@ -2008,11 +2018,11 @@ async def sample_list_events(): async def get_event( self, - request: Union[service.GetEventRequest, dict] = None, + request: Optional[Union[service.GetEventRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> resources.Event: r"""Returns the specified event. @@ -2044,7 +2054,7 @@ async def sample_get_event(): print(response) Args: - request (Union[google.cloud.video.live_stream_v1.types.GetEventRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.GetEventRequest, dict]]): The request object. Request message for "LivestreamService.GetEvent". name (:class:`str`): @@ -2122,11 +2132,11 @@ async def sample_get_event(): async def delete_event( self, - request: Union[service.DeleteEventRequest, dict] = None, + request: Optional[Union[service.DeleteEventRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes the specified event. @@ -2155,7 +2165,7 @@ async def sample_delete_event(): await client.delete_event(request=request) Args: - request (Union[google.cloud.video.live_stream_v1.types.DeleteEventRequest, dict]): + request (Optional[Union[google.cloud.video.live_stream_v1.types.DeleteEventRequest, dict]]): The request object. Request message for "LivestreamService.DeleteEvent". name (:class:`str`): diff --git a/google/cloud/video/live_stream_v1/services/livestream_service/client.py b/google/cloud/video/live_stream_v1/services/livestream_service/client.py index 5694517..86f5ee0 100644 --- a/google/cloud/video/live_stream_v1/services/livestream_service/client.py +++ b/google/cloud/video/live_stream_v1/services/livestream_service/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + 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 @@ -65,7 +76,7 @@ class LivestreamServiceClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[LivestreamServiceTransport]: """Returns an appropriate transport class. @@ -392,8 +403,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, LivestreamServiceTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, LivestreamServiceTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the livestream service client. @@ -407,7 +418,7 @@ def __init__( transport (Union[str, LivestreamServiceTransport]): The transport to use. If set to None, a transport is chosen automatically. - 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 @@ -437,6 +448,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 @@ -489,13 +501,13 @@ def __init__( def create_channel( self, - request: Union[service.CreateChannelRequest, dict] = None, + request: Optional[Union[service.CreateChannelRequest, dict]] = None, *, - parent: str = None, - channel: resources.Channel = None, - channel_id: str = None, + parent: Optional[str] = None, + channel: Optional[resources.Channel] = None, + channel_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a channel with the provided unique ID in the @@ -632,11 +644,11 @@ def sample_create_channel(): def list_channels( self, - request: Union[service.ListChannelsRequest, dict] = None, + request: Optional[Union[service.ListChannelsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListChannelsPager: r"""Returns a list of all channels in the specified @@ -748,11 +760,11 @@ def sample_list_channels(): def get_channel( self, - request: Union[service.GetChannelRequest, dict] = None, + request: Optional[Union[service.GetChannelRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> resources.Channel: r"""Returns the specified channel. @@ -857,11 +869,11 @@ def sample_get_channel(): def delete_channel( self, - request: Union[service.DeleteChannelRequest, dict] = None, + request: Optional[Union[service.DeleteChannelRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Deletes the specified channel. @@ -982,12 +994,12 @@ def sample_delete_channel(): def update_channel( self, - request: Union[service.UpdateChannelRequest, dict] = None, + request: Optional[Union[service.UpdateChannelRequest, dict]] = None, *, - channel: resources.Channel = None, - update_mask: field_mask_pb2.FieldMask = None, + channel: Optional[resources.Channel] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates the specified channel. @@ -1125,11 +1137,11 @@ def sample_update_channel(): def start_channel( self, - request: Union[service.StartChannelRequest, dict] = None, + request: Optional[Union[service.StartChannelRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Starts the specified channel. Part of the video @@ -1246,11 +1258,11 @@ def sample_start_channel(): def stop_channel( self, - request: Union[service.StopChannelRequest, dict] = None, + request: Optional[Union[service.StopChannelRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Stops the specified channel. Part of the video @@ -1367,13 +1379,13 @@ def sample_stop_channel(): def create_input( self, - request: Union[service.CreateInputRequest, dict] = None, + request: Optional[Union[service.CreateInputRequest, dict]] = None, *, - parent: str = None, - input: resources.Input = None, - input_id: str = None, + parent: Optional[str] = None, + input: Optional[resources.Input] = None, + input_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates an input with the provided unique ID in the @@ -1506,11 +1518,11 @@ def sample_create_input(): def list_inputs( self, - request: Union[service.ListInputsRequest, dict] = None, + request: Optional[Union[service.ListInputsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInputsPager: r"""Returns a list of all inputs in the specified region. @@ -1621,11 +1633,11 @@ def sample_list_inputs(): def get_input( self, - request: Union[service.GetInputRequest, dict] = None, + request: Optional[Union[service.GetInputRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> resources.Input: r"""Returns the specified input. @@ -1725,11 +1737,11 @@ def sample_get_input(): def delete_input( self, - request: Union[service.DeleteInputRequest, dict] = None, + request: Optional[Union[service.DeleteInputRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Deletes the specified input. @@ -1850,12 +1862,12 @@ def sample_delete_input(): def update_input( self, - request: Union[service.UpdateInputRequest, dict] = None, + request: Optional[Union[service.UpdateInputRequest, dict]] = None, *, - input: resources.Input = None, - update_mask: field_mask_pb2.FieldMask = None, + input: Optional[resources.Input] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates the specified input. @@ -1985,13 +1997,13 @@ def sample_update_input(): def create_event( self, - request: Union[service.CreateEventRequest, dict] = None, + request: Optional[Union[service.CreateEventRequest, dict]] = None, *, - parent: str = None, - event: resources.Event = None, - event_id: str = None, + parent: Optional[str] = None, + event: Optional[resources.Event] = None, + event_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> resources.Event: r"""Creates an event with the provided unique ID in the @@ -2113,11 +2125,11 @@ def sample_create_event(): def list_events( self, - request: Union[service.ListEventsRequest, dict] = None, + request: Optional[Union[service.ListEventsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListEventsPager: r"""Returns a list of all events in the specified @@ -2230,11 +2242,11 @@ def sample_list_events(): def get_event( self, - request: Union[service.GetEventRequest, dict] = None, + request: Optional[Union[service.GetEventRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> resources.Event: r"""Returns the specified event. @@ -2335,11 +2347,11 @@ def sample_get_event(): def delete_event( self, - request: Union[service.DeleteEventRequest, dict] = None, + request: Optional[Union[service.DeleteEventRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes the specified event. diff --git a/google/cloud/video/live_stream_v1/services/livestream_service/transports/base.py b/google/cloud/video/live_stream_v1/services/livestream_service/transports/base.py index c361f24..10e052e 100644 --- a/google/cloud/video/live_stream_v1/services/livestream_service/transports/base.py +++ b/google/cloud/video/live_stream_v1/services/livestream_service/transports/base.py @@ -50,7 +50,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/google/cloud/video/live_stream_v1/services/livestream_service/transports/grpc.py b/google/cloud/video/live_stream_v1/services/livestream_service/transports/grpc.py index 4f41556..1770590 100644 --- a/google/cloud/video/live_stream_v1/services/livestream_service/transports/grpc.py +++ b/google/cloud/video/live_stream_v1/services/livestream_service/transports/grpc.py @@ -53,14 +53,14 @@ def __init__( self, *, host: str = "livestream.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -188,8 +188,8 @@ def __init__( def create_channel( cls, host: str = "livestream.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/google/cloud/video/live_stream_v1/services/livestream_service/transports/grpc_asyncio.py b/google/cloud/video/live_stream_v1/services/livestream_service/transports/grpc_asyncio.py index 5e96162..f9c06e6 100644 --- a/google/cloud/video/live_stream_v1/services/livestream_service/transports/grpc_asyncio.py +++ b/google/cloud/video/live_stream_v1/services/livestream_service/transports/grpc_asyncio.py @@ -55,7 +55,7 @@ class LivestreamServiceGrpcAsyncIOTransport(LivestreamServiceTransport): def create_channel( cls, host: str = "livestream.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -98,15 +98,15 @@ def __init__( self, *, host: str = "livestream.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/google/cloud/video/live_stream_v1/types/outputs.py b/google/cloud/video/live_stream_v1/types/outputs.py index 173a813..51cd478 100644 --- a/google/cloud/video/live_stream_v1/types/outputs.py +++ b/google/cloud/video/live_stream_v1/types/outputs.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import duration_pb2 # type: ignore import proto # type: ignore @@ -62,23 +64,23 @@ class ElementaryStream(proto.Message): This field is a member of `oneof`_ ``elementary_stream``. """ - key = proto.Field( + key: str = proto.Field( proto.STRING, number=4, ) - video_stream = proto.Field( + video_stream: "VideoStream" = proto.Field( proto.MESSAGE, number=1, oneof="elementary_stream", message="VideoStream", ) - audio_stream = proto.Field( + audio_stream: "AudioStream" = proto.Field( proto.MESSAGE, number=2, oneof="elementary_stream", message="AudioStream", ) - text_stream = proto.Field( + text_stream: "TextStream" = proto.Field( proto.MESSAGE, number=3, oneof="elementary_stream", @@ -99,7 +101,7 @@ class MuxStream(proto.Message): - ``fmp4`` - the corresponding file extension is ``.m4s`` - ``ts`` - the corresponding file extension is ``.ts`` - elementary_streams (Sequence[str]): + elementary_streams (MutableSequence[str]): List of ``ElementaryStream`` [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed in this stream. @@ -112,19 +114,19 @@ class MuxStream(proto.Message): Segment settings for ``fmp4`` and ``ts``. """ - key = proto.Field( + key: str = proto.Field( proto.STRING, number=1, ) - container = proto.Field( + container: str = proto.Field( proto.STRING, number=3, ) - elementary_streams = proto.RepeatedField( + elementary_streams: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=4, ) - segment_settings = proto.Field( + segment_settings: "SegmentSettings" = proto.Field( proto.MESSAGE, number=5, message="SegmentSettings", @@ -143,7 +145,7 @@ class Manifest(proto.Message): a unique file name. type_ (google.cloud.video.live_stream_v1.types.Manifest.ManifestType): Required. Type of the manifest, can be ``HLS`` or ``DASH``. - mux_streams (Sequence[str]): + mux_streams (MutableSequence[str]): Required. List of ``MuxStream`` [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear in this manifest. @@ -175,24 +177,24 @@ class ManifestType(proto.Enum): HLS = 1 DASH = 2 - file_name = proto.Field( + file_name: str = proto.Field( proto.STRING, number=1, ) - type_ = proto.Field( + type_: ManifestType = proto.Field( proto.ENUM, number=2, enum=ManifestType, ) - mux_streams = proto.RepeatedField( + mux_streams: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - max_segment_count = proto.Field( + max_segment_count: int = proto.Field( proto.INT32, number=4, ) - segment_keep_duration = proto.Field( + segment_keep_duration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=5, message=duration_pb2.Duration, @@ -241,36 +243,36 @@ class SpriteSheet(proto.Message): ratio. """ - format_ = proto.Field( + format_: str = proto.Field( proto.STRING, number=1, ) - file_prefix = proto.Field( + file_prefix: str = proto.Field( proto.STRING, number=2, ) - sprite_width_pixels = proto.Field( + sprite_width_pixels: int = proto.Field( proto.INT32, number=3, ) - sprite_height_pixels = proto.Field( + sprite_height_pixels: int = proto.Field( proto.INT32, number=4, ) - column_count = proto.Field( + column_count: int = proto.Field( proto.INT32, number=5, ) - row_count = proto.Field( + row_count: int = proto.Field( proto.INT32, number=6, ) - interval = proto.Field( + interval: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=7, message=duration_pb2.Duration, ) - quality = proto.Field( + quality: int = proto.Field( proto.INT32, number=8, ) @@ -305,19 +307,19 @@ class Crop(proto.Message): The default is 0. """ - top_pixels = proto.Field( + top_pixels: int = proto.Field( proto.INT32, number=1, ) - bottom_pixels = proto.Field( + bottom_pixels: int = proto.Field( proto.INT32, number=2, ) - left_pixels = proto.Field( + left_pixels: int = proto.Field( proto.INT32, number=3, ) - right_pixels = proto.Field( + right_pixels: int = proto.Field( proto.INT32, number=4, ) @@ -342,29 +344,29 @@ class Pad(proto.Message): default is 0. """ - top_pixels = proto.Field( + top_pixels: int = proto.Field( proto.INT32, number=1, ) - bottom_pixels = proto.Field( + bottom_pixels: int = proto.Field( proto.INT32, number=2, ) - left_pixels = proto.Field( + left_pixels: int = proto.Field( proto.INT32, number=3, ) - right_pixels = proto.Field( + right_pixels: int = proto.Field( proto.INT32, number=4, ) - crop = proto.Field( + crop: Crop = proto.Field( proto.MESSAGE, number=2, message=Crop, ) - pad = proto.Field( + pad: Pad = proto.Field( proto.MESSAGE, number=3, message=Pad, @@ -494,71 +496,71 @@ class H264CodecSettings(proto.Message): message. """ - width_pixels = proto.Field( + width_pixels: int = proto.Field( proto.INT32, number=1, ) - height_pixels = proto.Field( + height_pixels: int = proto.Field( proto.INT32, number=2, ) - frame_rate = proto.Field( + frame_rate: float = proto.Field( proto.DOUBLE, number=3, ) - bitrate_bps = proto.Field( + bitrate_bps: int = proto.Field( proto.INT32, number=4, ) - allow_open_gop = proto.Field( + allow_open_gop: bool = proto.Field( proto.BOOL, number=6, ) - gop_frame_count = proto.Field( + gop_frame_count: int = proto.Field( proto.INT32, number=7, oneof="gop_mode", ) - gop_duration = proto.Field( + gop_duration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=8, oneof="gop_mode", message=duration_pb2.Duration, ) - vbv_size_bits = proto.Field( + vbv_size_bits: int = proto.Field( proto.INT32, number=9, ) - vbv_fullness_bits = proto.Field( + vbv_fullness_bits: int = proto.Field( proto.INT32, number=10, ) - entropy_coder = proto.Field( + entropy_coder: str = proto.Field( proto.STRING, number=11, ) - b_pyramid = proto.Field( + b_pyramid: bool = proto.Field( proto.BOOL, number=12, ) - b_frame_count = proto.Field( + b_frame_count: int = proto.Field( proto.INT32, number=13, ) - aq_strength = proto.Field( + aq_strength: float = proto.Field( proto.DOUBLE, number=14, ) - profile = proto.Field( + profile: str = proto.Field( proto.STRING, number=15, ) - tune = proto.Field( + tune: str = proto.Field( proto.STRING, number=16, ) - h264 = proto.Field( + h264: H264CodecSettings = proto.Field( proto.MESSAGE, number=20, oneof="codec_settings", @@ -586,7 +588,7 @@ class AudioStream(proto.Message): channel_count (int): Number of audio channels. Must be between 1 and 6. The default is 2. - channel_layout (Sequence[str]): + channel_layout (MutableSequence[str]): A list of channel names specifying layout of the audio channels. This only affects the metadata embedded in the container headers, if supported by the specified format. The @@ -600,7 +602,7 @@ class AudioStream(proto.Message): - ``sr`` - Side right channel - ``fc`` - Front center channel - ``lfe`` - Low frequency - mapping_ (Sequence[google.cloud.video.live_stream_v1.types.AudioStream.AudioMapping]): + mapping_ (MutableSequence[google.cloud.video.live_stream_v1.types.AudioStream.AudioMapping]): The mapping for the input streams and audio channels. sample_rate_hertz (int): @@ -634,49 +636,49 @@ class AudioMapping(proto.Message): [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. """ - input_key = proto.Field( + input_key: str = proto.Field( proto.STRING, number=6, ) - input_track = proto.Field( + input_track: int = proto.Field( proto.INT32, number=2, ) - input_channel = proto.Field( + input_channel: int = proto.Field( proto.INT32, number=3, ) - output_channel = proto.Field( + output_channel: int = proto.Field( proto.INT32, number=4, ) - transmux = proto.Field( + transmux: bool = proto.Field( proto.BOOL, number=8, ) - codec = proto.Field( + codec: str = proto.Field( proto.STRING, number=1, ) - bitrate_bps = proto.Field( + bitrate_bps: int = proto.Field( proto.INT32, number=2, ) - channel_count = proto.Field( + channel_count: int = proto.Field( proto.INT32, number=3, ) - channel_layout = proto.RepeatedField( + channel_layout: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=4, ) - mapping_ = proto.RepeatedField( + mapping_: MutableSequence[AudioMapping] = proto.RepeatedField( proto.MESSAGE, number=5, message=AudioMapping, ) - sample_rate_hertz = proto.Field( + sample_rate_hertz: int = proto.Field( proto.INT32, number=6, ) @@ -696,7 +698,7 @@ class TextStream(proto.Message): - ``cea708`` """ - codec = proto.Field( + codec: str = proto.Field( proto.STRING, number=1, ) @@ -720,7 +722,7 @@ class SegmentSettings(proto.Message): in the same manifest must have the same segment duration. """ - segment_duration = proto.Field( + segment_duration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=1, message=duration_pb2.Duration, diff --git a/google/cloud/video/live_stream_v1/types/resources.py b/google/cloud/video/live_stream_v1/types/resources.py index 7445e11..9d345ea 100644 --- a/google/cloud/video/live_stream_v1/types/resources.py +++ b/google/cloud/video/live_stream_v1/types/resources.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import duration_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.rpc import status_pb2 # type: ignore @@ -49,7 +51,7 @@ class Input(proto.Message): Output only. The creation time. update_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The update time. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): User-defined key/value metadata. type_ (google.cloud.video.live_stream_v1.types.Input.Type): Source type. @@ -96,62 +98,62 @@ class SecurityRule(proto.Message): satisfies all the fields, this input stream can be accepted. Attributes: - ip_ranges (Sequence[str]): + ip_ranges (MutableSequence[str]): At least one ip range must match unless none specified. The IP range is defined by CIDR block: for example, ``192.0.1.0/24`` for a range and ``192.0.1.0/32`` for a single IP address. """ - ip_ranges = proto.RepeatedField( + ip_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=1, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, ) - update_time = proto.Field( + update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=4, ) - type_ = proto.Field( + type_: Type = proto.Field( proto.ENUM, number=5, enum=Type, ) - tier = proto.Field( + tier: Tier = proto.Field( proto.ENUM, number=14, enum=Tier, ) - uri = proto.Field( + uri: str = proto.Field( proto.STRING, number=6, ) - preprocessing_config = proto.Field( + preprocessing_config: outputs.PreprocessingConfig = proto.Field( proto.MESSAGE, number=9, message=outputs.PreprocessingConfig, ) - security_rules = proto.Field( + security_rules: SecurityRule = proto.Field( proto.MESSAGE, number=12, message=SecurityRule, ) - input_stream_property = proto.Field( + input_stream_property: "InputStreamProperty" = proto.Field( proto.MESSAGE, number=15, message="InputStreamProperty", @@ -173,9 +175,9 @@ class Channel(proto.Message): Output only. The creation time. update_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The update time. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): User-defined key/value metadata. - input_attachments (Sequence[google.cloud.video.live_stream_v1.types.InputAttachment]): + input_attachments (MutableSequence[google.cloud.video.live_stream_v1.types.InputAttachment]): A list of input attachments that this channel uses. One channel can have multiple inputs as the input sources. Only one input can be @@ -191,14 +193,14 @@ class Channel(proto.Message): Required. Information about the output (that is, the Cloud Storage bucket to store the generated live stream). - elementary_streams (Sequence[google.cloud.video.live_stream_v1.types.ElementaryStream]): + elementary_streams (MutableSequence[google.cloud.video.live_stream_v1.types.ElementaryStream]): List of elementary streams. - mux_streams (Sequence[google.cloud.video.live_stream_v1.types.MuxStream]): + mux_streams (MutableSequence[google.cloud.video.live_stream_v1.types.MuxStream]): List of multiplexing settings for output streams. - manifests (Sequence[google.cloud.video.live_stream_v1.types.Manifest]): + manifests (MutableSequence[google.cloud.video.live_stream_v1.types.Manifest]): List of output manifests. - sprite_sheets (Sequence[google.cloud.video.live_stream_v1.types.SpriteSheet]): + sprite_sheets (MutableSequence[google.cloud.video.live_stream_v1.types.SpriteSheet]): List of output sprite sheets. streaming_state (google.cloud.video.live_stream_v1.types.Channel.StreamingState): Output only. State of the streaming @@ -234,75 +236,75 @@ class Output(proto.Message): ``gs://my-bucket/outputs/``. """ - uri = proto.Field( + uri: str = proto.Field( proto.STRING, number=1, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, ) - update_time = proto.Field( + update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=4, ) - input_attachments = proto.RepeatedField( + input_attachments: MutableSequence["InputAttachment"] = proto.RepeatedField( proto.MESSAGE, number=16, message="InputAttachment", ) - active_input = proto.Field( + active_input: str = proto.Field( proto.STRING, number=6, ) - output = proto.Field( + output: Output = proto.Field( proto.MESSAGE, number=9, message=Output, ) - elementary_streams = proto.RepeatedField( + elementary_streams: MutableSequence[outputs.ElementaryStream] = proto.RepeatedField( proto.MESSAGE, number=10, message=outputs.ElementaryStream, ) - mux_streams = proto.RepeatedField( + mux_streams: MutableSequence[outputs.MuxStream] = proto.RepeatedField( proto.MESSAGE, number=11, message=outputs.MuxStream, ) - manifests = proto.RepeatedField( + manifests: MutableSequence[outputs.Manifest] = proto.RepeatedField( proto.MESSAGE, number=12, message=outputs.Manifest, ) - sprite_sheets = proto.RepeatedField( + sprite_sheets: MutableSequence[outputs.SpriteSheet] = proto.RepeatedField( proto.MESSAGE, number=13, message=outputs.SpriteSheet, ) - streaming_state = proto.Field( + streaming_state: StreamingState = proto.Field( proto.ENUM, number=14, enum=StreamingState, ) - streaming_error = proto.Field( + streaming_error: status_pb2.Status = proto.Field( proto.MESSAGE, number=18, message=status_pb2.Status, ) - log_config = proto.Field( + log_config: "LogConfig" = proto.Field( proto.MESSAGE, number=19, message="LogConfig", @@ -337,7 +339,7 @@ class LogSeverity(proto.Enum): WARNING = 400 ERROR = 500 - log_severity = proto.Field( + log_severity: LogSeverity = proto.Field( proto.ENUM, number=1, enum=LogSeverity, @@ -351,23 +353,23 @@ class InputStreamProperty(proto.Message): last_establish_time (google.protobuf.timestamp_pb2.Timestamp): The time that the current input stream is accepted and the connection is established. - video_streams (Sequence[google.cloud.video.live_stream_v1.types.VideoStreamProperty]): + video_streams (MutableSequence[google.cloud.video.live_stream_v1.types.VideoStreamProperty]): Properties of the video streams. - audio_streams (Sequence[google.cloud.video.live_stream_v1.types.AudioStreamProperty]): + audio_streams (MutableSequence[google.cloud.video.live_stream_v1.types.AudioStreamProperty]): Properties of the audio streams. """ - last_establish_time = proto.Field( + last_establish_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp, ) - video_streams = proto.RepeatedField( + video_streams: MutableSequence["VideoStreamProperty"] = proto.RepeatedField( proto.MESSAGE, number=2, message="VideoStreamProperty", ) - audio_streams = proto.RepeatedField( + audio_streams: MutableSequence["AudioStreamProperty"] = proto.RepeatedField( proto.MESSAGE, number=3, message="AudioStreamProperty", @@ -384,11 +386,11 @@ class VideoStreamProperty(proto.Message): Properties of the video format. """ - index = proto.Field( + index: int = proto.Field( proto.INT32, number=1, ) - video_format = proto.Field( + video_format: "VideoFormat" = proto.Field( proto.MESSAGE, number=2, message="VideoFormat", @@ -409,19 +411,19 @@ class VideoFormat(proto.Message): The frame rate of the input video stream. """ - codec = proto.Field( + codec: str = proto.Field( proto.STRING, number=1, ) - width_pixels = proto.Field( + width_pixels: int = proto.Field( proto.INT32, number=2, ) - height_pixels = proto.Field( + height_pixels: int = proto.Field( proto.INT32, number=3, ) - frame_rate = proto.Field( + frame_rate: float = proto.Field( proto.DOUBLE, number=4, ) @@ -437,11 +439,11 @@ class AudioStreamProperty(proto.Message): Properties of the audio format. """ - index = proto.Field( + index: int = proto.Field( proto.INT32, number=1, ) - audio_format = proto.Field( + audio_format: "AudioFormat" = proto.Field( proto.MESSAGE, number=2, message="AudioFormat", @@ -456,20 +458,20 @@ class AudioFormat(proto.Message): Audio codec used in this audio stream. channel_count (int): The number of audio channels. - channel_layout (Sequence[str]): + channel_layout (MutableSequence[str]): A list of channel names specifying the layout of the audio channels. """ - codec = proto.Field( + codec: str = proto.Field( proto.STRING, number=1, ) - channel_count = proto.Field( + channel_count: int = proto.Field( proto.INT32, number=2, ) - channel_layout = proto.RepeatedField( + channel_layout: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) @@ -493,27 +495,27 @@ class AutomaticFailover(proto.Message): r"""Configurations to follow when automatic failover happens. Attributes: - input_keys (Sequence[str]): + input_keys (MutableSequence[str]): The [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s of inputs to failover to when this input is disconnected. Currently, only up to one backup input is supported. """ - input_keys = proto.RepeatedField( + input_keys: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=1, ) - key = proto.Field( + key: str = proto.Field( proto.STRING, number=1, ) - input = proto.Field( + input: str = proto.Field( proto.STRING, number=2, ) - automatic_failover = proto.Field( + automatic_failover: AutomaticFailover = proto.Field( proto.MESSAGE, number=3, message=AutomaticFailover, @@ -536,7 +538,7 @@ class Event(proto.Message): Output only. The creation time. update_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The update time. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): User-defined key/value metadata. ad_break (google.cloud.video.live_stream_v1.types.Event.AdBreakTask): Required. Inserts a new ad opportunity. @@ -582,52 +584,52 @@ class AdBreakTask(proto.Message): greater than 0. """ - duration = proto.Field( + duration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=1, message=duration_pb2.Duration, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, ) - update_time = proto.Field( + update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=4, ) - ad_break = proto.Field( + ad_break: AdBreakTask = proto.Field( proto.MESSAGE, number=6, oneof="task", message=AdBreakTask, ) - execute_now = proto.Field( + execute_now: bool = proto.Field( proto.BOOL, number=9, ) - execution_time = proto.Field( + execution_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=10, message=timestamp_pb2.Timestamp, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=11, enum=State, ) - error = proto.Field( + error: status_pb2.Status = proto.Field( proto.MESSAGE, number=12, message=status_pb2.Status, diff --git a/google/cloud/video/live_stream_v1/types/service.py b/google/cloud/video/live_stream_v1/types/service.py index 02697f4..3ad6bfa 100644 --- a/google/cloud/video/live_stream_v1/types/service.py +++ b/google/cloud/video/live_stream_v1/types/service.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore import proto # type: ignore @@ -79,20 +81,20 @@ class CreateChannelRequest(proto.Message): ``(00000000-0000-0000-0000-000000000000)``. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - channel = proto.Field( + channel: resources.Channel = proto.Field( proto.MESSAGE, number=2, message=resources.Channel, ) - channel_id = proto.Field( + channel_id: str = proto.Field( proto.STRING, number=3, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=4, ) @@ -122,23 +124,23 @@ class ListChannelsRequest(proto.Message): https://cloud.google.com/apis/design/design_patterns#sorting_order. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=4, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=5, ) @@ -148,13 +150,13 @@ class ListChannelsResponse(proto.Message): r"""Response message for "LivestreamService.ListChannels". Attributes: - channels (Sequence[google.cloud.video.live_stream_v1.types.Channel]): + channels (MutableSequence[google.cloud.video.live_stream_v1.types.Channel]): A list of channels. next_page_token (str): Token to retrieve the next page of results, or empty if there are no more results in the list. - unreachable (Sequence[str]): + unreachable (MutableSequence[str]): Locations that could not be reached. """ @@ -162,16 +164,16 @@ class ListChannelsResponse(proto.Message): def raw_page(self): return self - channels = proto.RepeatedField( + channels: MutableSequence[resources.Channel] = proto.RepeatedField( proto.MESSAGE, number=1, message=resources.Channel, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) - unreachable = proto.RepeatedField( + unreachable: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) @@ -186,7 +188,7 @@ class GetChannelRequest(proto.Message): ``projects/{project}/locations/{location}/channels/{channelId}``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -224,15 +226,15 @@ class DeleteChannelRequest(proto.Message): associated channel events. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=2, ) - force = proto.Field( + force: bool = proto.Field( proto.BOOL, number=3, ) @@ -278,17 +280,17 @@ class UpdateChannelRequest(proto.Message): ``(00000000-0000-0000-0000-000000000000)``. """ - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=1, message=field_mask_pb2.FieldMask, ) - channel = proto.Field( + channel: resources.Channel = proto.Field( proto.MESSAGE, number=2, message=resources.Channel, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=3, ) @@ -320,11 +322,11 @@ class StartChannelRequest(proto.Message): ``(00000000-0000-0000-0000-000000000000)``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=2, ) @@ -356,11 +358,11 @@ class StopChannelRequest(proto.Message): ``(00000000-0000-0000-0000-000000000000)``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=2, ) @@ -398,20 +400,20 @@ class CreateInputRequest(proto.Message): ``(00000000-0000-0000-0000-000000000000)``. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - input = proto.Field( + input: resources.Input = proto.Field( proto.MESSAGE, number=2, message=resources.Input, ) - input_id = proto.Field( + input_id: str = proto.Field( proto.STRING, number=3, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=4, ) @@ -442,23 +444,23 @@ class ListInputsRequest(proto.Message): Order `__. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=4, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=5, ) @@ -468,13 +470,13 @@ class ListInputsResponse(proto.Message): r"""Response message for "LivestreamService.ListInputs". Attributes: - inputs (Sequence[google.cloud.video.live_stream_v1.types.Input]): + inputs (MutableSequence[google.cloud.video.live_stream_v1.types.Input]): A list of inputs. next_page_token (str): Token to retrieve the next page of results, or empty if there are no more results in the list. - unreachable (Sequence[str]): + unreachable (MutableSequence[str]): Locations that could not be reached. """ @@ -482,16 +484,16 @@ class ListInputsResponse(proto.Message): def raw_page(self): return self - inputs = proto.RepeatedField( + inputs: MutableSequence[resources.Input] = proto.RepeatedField( proto.MESSAGE, number=1, message=resources.Input, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) - unreachable = proto.RepeatedField( + unreachable: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) @@ -506,7 +508,7 @@ class GetInputRequest(proto.Message): ``projects/{project}/locations/{location}/inputs/{inputId}``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -538,11 +540,11 @@ class DeleteInputRequest(proto.Message): ``(00000000-0000-0000-0000-000000000000)``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=2, ) @@ -584,17 +586,17 @@ class UpdateInputRequest(proto.Message): ``(00000000-0000-0000-0000-000000000000)``. """ - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=1, message=field_mask_pb2.FieldMask, ) - input = proto.Field( + input: resources.Input = proto.Field( proto.MESSAGE, number=2, message=resources.Input, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=3, ) @@ -633,20 +635,20 @@ class CreateEventRequest(proto.Message): ``(00000000-0000-0000-0000-000000000000)``. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - event = proto.Field( + event: resources.Event = proto.Field( proto.MESSAGE, number=2, message=resources.Event, ) - event_id = proto.Field( + event_id: str = proto.Field( proto.STRING, number=3, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=4, ) @@ -677,23 +679,23 @@ class ListEventsRequest(proto.Message): https://cloud.google.com/apis/design/design_patterns#sorting_order. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=4, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=5, ) @@ -703,13 +705,13 @@ class ListEventsResponse(proto.Message): r"""Response message for "LivestreamService.ListEvents". Attributes: - events (Sequence[google.cloud.video.live_stream_v1.types.Event]): + events (MutableSequence[google.cloud.video.live_stream_v1.types.Event]): A list of events. next_page_token (str): Token to retrieve the next page of results, or empty if there are no more results in the list. - unreachable (Sequence[str]): + unreachable (MutableSequence[str]): Locations that could not be reached. """ @@ -717,16 +719,16 @@ class ListEventsResponse(proto.Message): def raw_page(self): return self - events = proto.RepeatedField( + events: MutableSequence[resources.Event] = proto.RepeatedField( proto.MESSAGE, number=1, message=resources.Event, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) - unreachable = proto.RepeatedField( + unreachable: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) @@ -741,7 +743,7 @@ class GetEventRequest(proto.Message): ``projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -773,11 +775,11 @@ class DeleteEventRequest(proto.Message): ``(00000000-0000-0000-0000-000000000000)``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=2, ) @@ -817,29 +819,29 @@ class OperationMetadata(proto.Message): operation. """ - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp, ) - end_time = proto.Field( + end_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, ) - target = proto.Field( + target: str = proto.Field( proto.STRING, number=3, ) - verb = proto.Field( + verb: str = proto.Field( proto.STRING, number=4, ) - requested_cancellation = proto.Field( + requested_cancellation: bool = proto.Field( proto.BOOL, number=5, ) - api_version = proto.Field( + api_version: str = proto.Field( proto.STRING, number=6, ) diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 0000000..ce738f0 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,56 @@ +# 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 json +from pathlib import Path +import shutil + +import synthtool as s +import synthtool.gcp as gcp +from synthtool.languages import python + +# ---------------------------------------------------------------------------- +# Copy the generated client from the owl-bot staging directory +# ---------------------------------------------------------------------------- + +clean_up_generated_samples = True + +# 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 = 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"]) + +python.py_samples(skip_readmes=True) + +# 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..4c53b53 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "python", + "extra-files": [ + "google/cloud/video/live_stream/gapic_version.py", + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_google.cloud.video.livestream.v1.json", + "jsonpath": "$.clientLibrary.version" + } + ] + } + }, + "release-type": "python", + "plugins": [ + { + "type": "sentence-case" + } + ], + "initial-version": "0.1.0" +} diff --git a/samples/generated_samples/snippet_metadata_live stream_v1.json b/samples/generated_samples/snippet_metadata_google.cloud.video.livestream.v1.json similarity index 99% rename from samples/generated_samples/snippet_metadata_live stream_v1.json rename to samples/generated_samples/snippet_metadata_google.cloud.video.livestream.v1.json index d677efd..08d8cdf 100644 --- a/samples/generated_samples/snippet_metadata_live stream_v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.video.livestream.v1.json @@ -7,7 +7,8 @@ } ], "language": "PYTHON", - "name": "google-cloud-video-live-stream" + "name": "google-cloud-video-live-stream", + "version": "0.1.0" }, "snippets": [ { diff --git a/setup.py b/setup.py index d223b7a..c1b763f 100644 --- a/setup.py +++ b/setup.py @@ -1,34 +1,48 @@ # -*- 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. # You may obtain a copy of the License at # -# https://www.apache.org/licenses/LICENSE-2.0 +# 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 io import os -import setuptools +import setuptools # type: ignore + +package_root = os.path.abspath(os.path.dirname(__file__)) name = "google-cloud-video-live-stream" -description = "Live Stream API client library" -url = "https://github.com/googleapis/python-video-live-stream" -version = "1.0.4" -release_status = "Development Status :: 5 - Production/Stable" + + +description = "Google Cloud Video Live Stream API client library" + +version = {} +with open( + os.path.join(package_root, "google/cloud/video/live_stream/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.32.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "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-video-live-stream" package_root = os.path.abspath(os.path.dirname(__file__)) @@ -46,7 +60,6 @@ if "google.cloud" in packages: namespaces.append("google.cloud") - setuptools.setup( name=name, version=version, 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 4005dc5..6f3158c 100644 --- a/testing/constraints-3.7.txt +++ b/testing/constraints-3.7.txt @@ -4,6 +4,6 @@ # Pin the version to the lower bound. # 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 -google-api-core==1.32.0 +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/live_stream_v1/test_livestream_service.py b/tests/unit/gapic/live_stream_v1/test_livestream_service.py index b01f47f..8995fef 100644 --- a/tests/unit/gapic/live_stream_v1/test_livestream_service.py +++ b/tests/unit/gapic/live_stream_v1/test_livestream_service.py @@ -43,6 +43,7 @@ from google.oauth2 import service_account from google.protobuf import any_pb2 # type: ignore from google.protobuf import duration_pb2 # type: ignore +from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.rpc import status_pb2 # type: ignore