Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videointelligence: fix client_info bug, update docstrings and timeouts. #6425

Merged
merged 1 commit into from
Nov 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ def __init__(self,
)

if client_info is None:
client_info = (
google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO)
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
gapic_version=_GAPIC_LIBRARY_VERSION, )
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
self._client_info = client_info

# Parse out the default settings for retry and timeout for each RPC
Expand Down Expand Up @@ -195,32 +196,34 @@ def annotate_video(self,
>>> metadata = response.metadata()

Args:
input_uri (str): Input video location. Currently, only
`Google Cloud Storage <https://cloud.google.com/storage/>`_ URIs are
supported, which must be specified in the following format:
``gs://bucket-id/object-id`` (other URI formats return
``google.rpc.Code.INVALID_ARGUMENT``). For more information, see
`Request URIs <https://cloud.google.com/storage/docs/reference-uris>`_.
A video URI may include wildcards in ``object-id``, and thus identify
multiple videos. Supported wildcards: '*' to match 0 or more characters;
'?' to match 1 character. If unset, the input video should be embedded
in the request as ``input_content``. If set, ``input_content`` should be unset.
input_content (bytes): The video data bytes.
If unset, the input video(s) should be specified via ``input_uri``.
If set, ``input_uri`` should be unset.
input_uri (str): Input video location. Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
must be specified in the following format: ``gs://bucket-id/object-id``
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
more information, see `Request
URIs <https://cloud.google.com/storage/docs/reference-uris>`__. A video
URI may include wildcards in ``object-id``, and thus identify multiple
videos. Supported wildcards: '\*' to match 0 or more characters; '?' to
match 1 character. If unset, the input video should be embedded in the
request as ``input_content``. If set, ``input_content`` should be unset.
input_content (bytes): The video data bytes. If unset, the input video(s) should be specified
via ``input_uri``. If set, ``input_uri`` should be unset.
features (list[~google.cloud.videointelligence_v1.types.Feature]): Requested video annotation features.
video_context (Union[dict, ~google.cloud.videointelligence_v1.types.VideoContext]): Additional video context and/or feature-specific parameters.

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.videointelligence_v1.types.VideoContext`
output_uri (str): Optional location where the output (in JSON format) should be stored.
Currently, only `Google Cloud Storage <https://cloud.google.com/storage/>`_
URIs are supported, which must be specified in the following format:
``gs://bucket-id/object-id`` (other URI formats return
``google.rpc.Code.INVALID_ARGUMENT``). For more information, see
`Request URIs <https://cloud.google.com/storage/docs/reference-uris>`_.
location_id (str): Optional cloud region where annotation should take place. Supported cloud
regions: ``us-east1``, ``us-west1``, ``europe-west1``, ``asia-east1``. If no region
is specified, a region will be determined based on video file location.
Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
must be specified in the following format: ``gs://bucket-id/object-id``
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
more information, see `Request
URIs <https://cloud.google.com/storage/docs/reference-uris>`__.
location_id (str): Optional cloud region where annotation should take place. Supported
cloud regions: ``us-east1``, ``us-west1``, ``europe-west1``,
``asia-east1``. If no region is specified, a region will be determined
based on video file location.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"methods": {
"AnnotateVideo": {
"timeout_millis": 60000,
"timeout_millis": 600000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ def __init__(self,
)

if client_info is None:
client_info = (
google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO)
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
gapic_version=_GAPIC_LIBRARY_VERSION, )
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
self._client_info = client_info

# Parse out the default settings for retry and timeout for each RPC
Expand Down Expand Up @@ -195,31 +196,35 @@ def annotate_video(self,
>>> metadata = response.metadata()

Args:
input_uri (str): Input video location. Currently, only
`Google Cloud Storage <https://cloud.google.com/storage/>`_ URIs are
supported, which must be specified in the following format:
``gs://bucket-id/object-id`` (other URI formats return
``google.rpc.Code.INVALID_ARGUMENT``). For more information, see
`Request URIs <https://cloud.google.com/storage/docs/reference-uris>`_.
A video URI may include wildcards in ``object-id``, and thus identify
multiple videos. Supported wildcards: '*' to match 0 or more characters;
'?' to match 1 character. If unset, the input video should be embedded
in the request as ``input_content``. If set, ``input_content`` should be unset.
input_uri (str): Input video location. Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
must be specified in the following format: ``gs://bucket-id/object-id``
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
more information, see `Request
URIs <https://cloud.google.com/storage/docs/reference-uris>`__. A video
URI may include wildcards in ``object-id``, and thus identify multiple
videos. Supported wildcards: '\*' to match 0 or more characters; '?' to
match 1 character. If unset, the input video should be embedded in the
request as ``input_content``. If set, ``input_content`` should be unset.
features (list[~google.cloud.videointelligence_v1beta1.types.Feature]): Requested video annotation features.
input_content (str): The video data bytes. Encoding: base64. If unset, the input video(s)
should be specified via ``input_uri``. If set, ``input_uri`` should be unset.
should be specified via ``input_uri``. If set, ``input_uri`` should be
unset.
video_context (Union[dict, ~google.cloud.videointelligence_v1beta1.types.VideoContext]): Additional video context and/or feature-specific parameters.

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.videointelligence_v1beta1.types.VideoContext`
output_uri (str): Optional location where the output (in JSON format) should be stored.
Currently, only `Google Cloud Storage <https://cloud.google.com/storage/>`_
URIs are supported, which must be specified in the following format:
``gs://bucket-id/object-id`` (other URI formats return
``google.rpc.Code.INVALID_ARGUMENT``). For more information, see
`Request URIs <https://cloud.google.com/storage/docs/reference-uris>`_.
location_id (str): Optional cloud region where annotation should take place. Supported cloud
regions: ``us-east1``, ``us-west1``, ``europe-west1``, ``asia-east1``. If no region
is specified, a region will be determined based on video file location.
Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
must be specified in the following format: ``gs://bucket-id/object-id``
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
more information, see `Request
URIs <https://cloud.google.com/storage/docs/reference-uris>`__.
location_id (str): Optional cloud region where annotation should take place. Supported
cloud regions: ``us-east1``, ``us-west1``, ``europe-west1``,
``asia-east1``. If no region is specified, a region will be determined
based on video file location.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ def __init__(self,
)

if client_info is None:
client_info = (
google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO)
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
gapic_version=_GAPIC_LIBRARY_VERSION, )
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
self._client_info = client_info

# Parse out the default settings for retry and timeout for each RPC
Expand Down Expand Up @@ -195,32 +196,34 @@ def annotate_video(self,
>>> metadata = response.metadata()

Args:
input_uri (str): Input video location. Currently, only
`Google Cloud Storage <https://cloud.google.com/storage/>`_ URIs are
supported, which must be specified in the following format:
``gs://bucket-id/object-id`` (other URI formats return
``google.rpc.Code.INVALID_ARGUMENT``). For more information, see
`Request URIs <https://cloud.google.com/storage/docs/reference-uris>`_.
A video URI may include wildcards in ``object-id``, and thus identify
multiple videos. Supported wildcards: '*' to match 0 or more characters;
'?' to match 1 character. If unset, the input video should be embedded
in the request as ``input_content``. If set, ``input_content`` should be unset.
input_content (bytes): The video data bytes.
If unset, the input video(s) should be specified via ``input_uri``.
If set, ``input_uri`` should be unset.
input_uri (str): Input video location. Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
must be specified in the following format: ``gs://bucket-id/object-id``
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
more information, see `Request
URIs <https://cloud.google.com/storage/docs/reference-uris>`__. A video
URI may include wildcards in ``object-id``, and thus identify multiple
videos. Supported wildcards: '\*' to match 0 or more characters; '?' to
match 1 character. If unset, the input video should be embedded in the
request as ``input_content``. If set, ``input_content`` should be unset.
input_content (bytes): The video data bytes. If unset, the input video(s) should be specified
via ``input_uri``. If set, ``input_uri`` should be unset.
features (list[~google.cloud.videointelligence_v1beta2.types.Feature]): Requested video annotation features.
video_context (Union[dict, ~google.cloud.videointelligence_v1beta2.types.VideoContext]): Additional video context and/or feature-specific parameters.

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.videointelligence_v1beta2.types.VideoContext`
output_uri (str): Optional location where the output (in JSON format) should be stored.
Currently, only `Google Cloud Storage <https://cloud.google.com/storage/>`_
URIs are supported, which must be specified in the following format:
``gs://bucket-id/object-id`` (other URI formats return
``google.rpc.Code.INVALID_ARGUMENT``). For more information, see
`Request URIs <https://cloud.google.com/storage/docs/reference-uris>`_.
location_id (str): Optional cloud region where annotation should take place. Supported cloud
regions: ``us-east1``, ``us-west1``, ``europe-west1``, ``asia-east1``. If no region
is specified, a region will be determined based on video file location.
Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
must be specified in the following format: ``gs://bucket-id/object-id``
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
more information, see `Request
URIs <https://cloud.google.com/storage/docs/reference-uris>`__.
location_id (str): Optional cloud region where annotation should take place. Supported
cloud regions: ``us-east1``, ``us-west1``, ``europe-west1``,
``asia-east1``. If no region is specified, a region will be determined
based on video file location.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ def __init__(self,
)

if client_info is None:
client_info = (
google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO)
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
gapic_version=_GAPIC_LIBRARY_VERSION, )
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
self._client_info = client_info

# Parse out the default settings for retry and timeout for each RPC
Expand Down Expand Up @@ -195,32 +196,34 @@ def annotate_video(self,
>>> metadata = response.metadata()

Args:
input_uri (str): Input video location. Currently, only
`Google Cloud Storage <https://cloud.google.com/storage/>`_ URIs are
supported, which must be specified in the following format:
``gs://bucket-id/object-id`` (other URI formats return
``google.rpc.Code.INVALID_ARGUMENT``). For more information, see
`Request URIs <https://cloud.google.com/storage/docs/reference-uris>`_.
A video URI may include wildcards in ``object-id``, and thus identify
multiple videos. Supported wildcards: '*' to match 0 or more characters;
'?' to match 1 character. If unset, the input video should be embedded
in the request as ``input_content``. If set, ``input_content`` should be unset.
input_content (bytes): The video data bytes.
If unset, the input video(s) should be specified via ``input_uri``.
If set, ``input_uri`` should be unset.
input_uri (str): Input video location. Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
must be specified in the following format: ``gs://bucket-id/object-id``
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
more information, see `Request
URIs <https://cloud.google.com/storage/docs/reference-uris>`__. A video
URI may include wildcards in ``object-id``, and thus identify multiple
videos. Supported wildcards: '\*' to match 0 or more characters; '?' to
match 1 character. If unset, the input video should be embedded in the
request as ``input_content``. If set, ``input_content`` should be unset.
input_content (bytes): The video data bytes. If unset, the input video(s) should be specified
via ``input_uri``. If set, ``input_uri`` should be unset.
features (list[~google.cloud.videointelligence_v1p1beta1.types.Feature]): Requested video annotation features.
video_context (Union[dict, ~google.cloud.videointelligence_v1p1beta1.types.VideoContext]): Additional video context and/or feature-specific parameters.

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.videointelligence_v1p1beta1.types.VideoContext`
output_uri (str): Optional location where the output (in JSON format) should be stored.
Currently, only `Google Cloud Storage <https://cloud.google.com/storage/>`_
URIs are supported, which must be specified in the following format:
``gs://bucket-id/object-id`` (other URI formats return
``google.rpc.Code.INVALID_ARGUMENT``). For more information, see
`Request URIs <https://cloud.google.com/storage/docs/reference-uris>`_.
location_id (str): Optional cloud region where annotation should take place. Supported cloud
regions: ``us-east1``, ``us-west1``, ``europe-west1``, ``asia-east1``. If no region
is specified, a region will be determined based on video file location.
Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
must be specified in the following format: ``gs://bucket-id/object-id``
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
more information, see `Request
URIs <https://cloud.google.com/storage/docs/reference-uris>`__.
location_id (str): Optional cloud region where annotation should take place. Supported
cloud regions: ``us-east1``, ``us-west1``, ``europe-west1``,
``asia-east1``. If no region is specified, a region will be determined
based on video file location.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"methods": {
"AnnotateVideo": {
"timeout_millis": 60000,
"timeout_millis": 600000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
}
Expand Down
Loading