Skip to content

Commit

Permalink
fix(deps): require google-api-core >= 2.8.0 (#39)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 459095142

Source-Link: googleapis/googleapis@4f1be99

Source-Link: googleapis/googleapis-gen@ae686d9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWU2ODZkOWNkZTRmYzNlMzZkMGFjMDJlZmI4NjQzYjE1ODkwYzFlZCJ9

feat: add audience parameter
PiperOrigin-RevId: 456827138

Source-Link: googleapis/googleapis@23f1a15

Source-Link: googleapis/googleapis-gen@4075a85
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDA3NWE4NTE0ZjY3NjY5MWVjMTU2Njg4YTViYmYxODNhYTk4OTNjZSJ9

feat: add asset_id and stream_id fields to VodSession and LiveSession responses
fix: remove COMPLETE_POD stitching option

PiperOrigin-RevId: 454023909

Source-Link: googleapis/googleapis@f296ef5

Source-Link: googleapis/googleapis-gen@bb5e9fc
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmI1ZTlmY2IyMTQwNGViMGY2ZTY0OTQ0M2M0MWM1YWNmZGMzMDFlMSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Jul 12, 2022
1 parent 125030d commit 2b2a7d9
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2148,15 +2148,6 @@ async def sample_create_live_session():
session should be created, in the form of
``projects/{project_number}/locations/{location}``.
Valid locations:
- ``-`` (Video Stitcher API will pick a location that
is closest to the caller.)
- ``us-east1``
- ``us-west1``
- ``us-central1``
- ``europe-west1``
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ def __init__(
quota_project_id=client_options.quota_project_id,
client_info=client_info,
always_use_jwt_access=True,
api_audience=client_options.api_audience,
)

def create_cdn_key(
Expand Down Expand Up @@ -2483,15 +2484,6 @@ def sample_create_live_session():
session should be created, in the form of
``projects/{project_number}/locations/{location}``.
Valid locations:
- ``-`` (Video Stitcher API will pick a location that
is closest to the caller.)
- ``us-east1``
- ``us-west1``
- ``us-central1``
- ``europe-west1``
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def __init__(
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,
**kwargs,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -89,11 +90,6 @@ def __init__(
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host

scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}

# Save the scopes.
Expand All @@ -114,6 +110,11 @@ def __init__(
credentials, _ = google.auth.default(
**scopes_kwargs, quota_project_id=quota_project_id
)
# Don't apply audience if the credentials file passed from user.
if hasattr(credentials, "with_gdch_audience"):
credentials = credentials.with_gdch_audience(
api_audience if api_audience else host
)

# If the credentials are service account credentials, then always try to use self signed JWT.
if (
Expand All @@ -126,6 +127,11 @@ def __init__(
# Save the credentials.
self._credentials = credentials

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host

def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def __init__(
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,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -164,6 +165,7 @@ def __init__(
quota_project_id=quota_project_id,
client_info=client_info,
always_use_jwt_access=always_use_jwt_access,
api_audience=api_audience,
)

if not self._grpc_channel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def __init__(
quota_project_id=None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -209,6 +210,7 @@ def __init__(
quota_project_id=quota_project_id,
client_info=client_info,
always_use_jwt_access=always_use_jwt_access,
api_audience=api_audience,
)

if not self._grpc_channel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ class VodSession(proto.Message):
manifest_options (google.cloud.video.stitcher_v1.types.ManifestOptions):
Additional options that affect the output of
the manifest.
asset_id (str):
Output only. The generated ID of the
VodSession's source media.
"""

name = proto.Field(
Expand Down Expand Up @@ -114,6 +117,10 @@ class VodSession(proto.Message):
number=9,
message="ManifestOptions",
)
asset_id = proto.Field(
proto.STRING,
number=10,
)


class Interstitials(proto.Message):
Expand Down Expand Up @@ -287,6 +294,9 @@ class LiveSession(proto.Message):
manifest_options (google.cloud.video.stitcher_v1.types.ManifestOptions):
Additional options that affect the output of
the manifest.
stream_id (str):
Output only. The generated ID of the
LiveSession's source stream.
"""

class StitchingPolicy(proto.Enum):
Expand All @@ -296,7 +306,6 @@ class StitchingPolicy(proto.Enum):
"""
STITCHING_POLICY_UNSPECIFIED = 0
COMPLETE_AD = 1
COMPLETE_POD = 2
CUT_CURRENT = 3

name = proto.Field(
Expand Down Expand Up @@ -344,6 +353,10 @@ class StitchingPolicy(proto.Enum):
number=10,
message="ManifestOptions",
)
stream_id = proto.Field(
proto.STRING,
number=11,
)


class AdTag(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,15 +644,6 @@ class CreateLiveSessionRequest(proto.Message):
Required. The project and location in which the live session
should be created, in the form of
``projects/{project_number}/locations/{location}``.
Valid locations:
- ``-`` (Video Stitcher API will pick a location that is
closest to the caller.)
- ``us-east1``
- ``us-west1``
- ``us-central1``
- ``europe-west1``
live_session (google.cloud.video.stitcher_v1.types.LiveSession):
Required. Parameters for creating a live
session.
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-video-stitcher/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
platforms="Posix; MacOS X; Windows",
include_package_data=True,
install_requires=(
"google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0",
"google-api-core[grpc] >= 2.8.0, <3.0.0dev",
"proto-plus >= 1.19.7, <2.0.0dev",
"protobuf >= 3.19.0, <4.0.0dev",
),
Expand Down
10 changes: 0 additions & 10 deletions packages/google-cloud-video-stitcher/testing/constraints-3.6.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
#
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
# Then this file should have foo==1.14.0
google-api-core==1.31.5
google-api-core==2.8.0
proto-plus==1.19.7
protobuf==3.19.0
Loading

0 comments on commit 2b2a7d9

Please sign in to comment.