Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

Commit a5a210e

Browse files
feat: add create_time, start_time, and end_time to jobs (#10)
1 parent 46f03dc commit a5a210e

File tree

15 files changed

+1014
-637
lines changed

15 files changed

+1014
-637
lines changed

.kokoro/docs/common.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ env_vars: {
3030

3131
env_vars: {
3232
key: "V2_STAGING_BUCKET"
33-
value: "docs-staging-v2-staging"
33+
value: "docs-staging-v2"
3434
}
3535

3636
# It will upload the docker image after successful builds.

CODE_OF_CONDUCT.md

+87-36
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,95 @@
11
<!-- # Generated by synthtool. DO NOT EDIT! !-->
2-
# Contributor Code of Conduct
2+
# Code of Conduct
33

4-
As contributors and maintainers of this project,
5-
and in the interest of fostering an open and welcoming community,
6-
we pledge to respect all people who contribute through reporting issues,
7-
posting feature requests, updating documentation,
8-
submitting pull requests or patches, and other activities.
4+
## Our Pledge
95

10-
We are committed to making participation in this project
11-
a harassment-free experience for everyone,
12-
regardless of level of experience, gender, gender identity and expression,
13-
sexual orientation, disability, personal appearance,
14-
body size, race, ethnicity, age, religion, or nationality.
6+
In the interest of fostering an open and welcoming environment, we as
7+
contributors and maintainers pledge to making participation in our project and
8+
our community a harassment-free experience for everyone, regardless of age, body
9+
size, disability, ethnicity, gender identity and expression, level of
10+
experience, education, socio-economic status, nationality, personal appearance,
11+
race, religion, or sexual identity and orientation.
12+
13+
## Our Standards
14+
15+
Examples of behavior that contributes to creating a positive environment
16+
include:
17+
18+
* Using welcoming and inclusive language
19+
* Being respectful of differing viewpoints and experiences
20+
* Gracefully accepting constructive criticism
21+
* Focusing on what is best for the community
22+
* Showing empathy towards other community members
1523

1624
Examples of unacceptable behavior by participants include:
1725

18-
* The use of sexualized language or imagery
19-
* Personal attacks
20-
* Trolling or insulting/derogatory comments
21-
* Public or private harassment
22-
* Publishing other's private information,
23-
such as physical or electronic
24-
addresses, without explicit permission
25-
* Other unethical or unprofessional conduct.
26+
* The use of sexualized language or imagery and unwelcome sexual attention or
27+
advances
28+
* Trolling, insulting/derogatory comments, and personal or political attacks
29+
* Public or private harassment
30+
* Publishing others' private information, such as a physical or electronic
31+
address, without explicit permission
32+
* Other conduct which could reasonably be considered inappropriate in a
33+
professional setting
34+
35+
## Our Responsibilities
36+
37+
Project maintainers are responsible for clarifying the standards of acceptable
38+
behavior and are expected to take appropriate and fair corrective action in
39+
response to any instances of unacceptable behavior.
2640

2741
Project maintainers have the right and responsibility to remove, edit, or reject
28-
comments, commits, code, wiki edits, issues, and other contributions
29-
that are not aligned to this Code of Conduct.
30-
By adopting this Code of Conduct,
31-
project maintainers commit themselves to fairly and consistently
32-
applying these principles to every aspect of managing this project.
33-
Project maintainers who do not follow or enforce the Code of Conduct
34-
may be permanently removed from the project team.
35-
36-
This code of conduct applies both within project spaces and in public spaces
37-
when an individual is representing the project or its community.
38-
39-
Instances of abusive, harassing, or otherwise unacceptable behavior
40-
may be reported by opening an issue
41-
or contacting one or more of the project maintainers.
42-
43-
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
44-
available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
42+
comments, commits, code, wiki edits, issues, and other contributions that are
43+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
44+
contributor for other behaviors that they deem inappropriate, threatening,
45+
offensive, or harmful.
46+
47+
## Scope
48+
49+
This Code of Conduct applies both within project spaces and in public spaces
50+
when an individual is representing the project or its community. Examples of
51+
representing a project or community include using an official project e-mail
52+
address, posting via an official social media account, or acting as an appointed
53+
representative at an online or offline event. Representation of a project may be
54+
further defined and clarified by project maintainers.
55+
56+
This Code of Conduct also applies outside the project spaces when the Project
57+
Steward has a reasonable belief that an individual's behavior may have a
58+
negative impact on the project or its community.
59+
60+
## Conflict Resolution
61+
62+
We do not believe that all conflict is bad; healthy debate and disagreement
63+
often yield positive results. However, it is never okay to be disrespectful or
64+
to engage in behavior that violates the project’s code of conduct.
65+
66+
If you see someone violating the code of conduct, you are encouraged to address
67+
the behavior directly with those involved. Many issues can be resolved quickly
68+
and easily, and this gives people more control over the outcome of their
69+
dispute. If you are unable to resolve the matter for any reason, or if the
70+
behavior is threatening or harassing, report it. We are dedicated to providing
71+
an environment where participants feel welcome and safe.
72+
73+
74+
Reports should be directed to *[email protected]*, the
75+
Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to
76+
receive and address reported violations of the code of conduct. They will then
77+
work with a committee consisting of representatives from the Open Source
78+
Programs Office and the Google Open Source Strategy team. If for any reason you
79+
are uncomfortable reaching out to the Project Steward, please email
80+
81+
82+
We will investigate every complaint, but you may not receive a direct response.
83+
We will use our discretion in determining when and how to follow up on reported
84+
incidents, which may range from not taking action to permanent expulsion from
85+
the project and project-sponsored spaces. We will notify the accused of the
86+
report and provide them an opportunity to discuss it before any action is taken.
87+
The identity of the reporter will be omitted from the details of the report
88+
supplied to the accused. In potentially harmful situations, such as ongoing
89+
harassment or threats to anyone's safety, we may take action without notice.
90+
91+
## Attribution
92+
93+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
94+
available at
95+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

docs/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@
349349
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
350350
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
351351
"grpc": ("https://grpc.io/grpc/python/", None),
352+
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
352353
}
353354

354355

docs/transcoder_v1beta1/types.rst

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ Types for Google Cloud Video Transcoder v1beta1 API
33

44
.. automodule:: google.cloud.video.transcoder_v1beta1.types
55
:members:
6+
:show-inheritance:

google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py

+72-18
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from google.cloud.video.transcoder_v1beta1.services.transcoder_service import pagers
3232
from google.cloud.video.transcoder_v1beta1.types import resources
3333
from google.cloud.video.transcoder_v1beta1.types import services
34+
from google.protobuf import timestamp_pb2 as timestamp # type: ignore
3435

3536
from .transports.base import TranscoderServiceTransport, DEFAULT_CLIENT_INFO
3637
from .transports.grpc_asyncio import TranscoderServiceGrpcAsyncIOTransport
@@ -52,13 +53,54 @@ class TranscoderServiceAsyncClient:
5253
DEFAULT_ENDPOINT = TranscoderServiceClient.DEFAULT_ENDPOINT
5354
DEFAULT_MTLS_ENDPOINT = TranscoderServiceClient.DEFAULT_MTLS_ENDPOINT
5455

56+
job_path = staticmethod(TranscoderServiceClient.job_path)
57+
parse_job_path = staticmethod(TranscoderServiceClient.parse_job_path)
5558
job_template_path = staticmethod(TranscoderServiceClient.job_template_path)
59+
parse_job_template_path = staticmethod(
60+
TranscoderServiceClient.parse_job_template_path
61+
)
5662

57-
job_path = staticmethod(TranscoderServiceClient.job_path)
63+
common_billing_account_path = staticmethod(
64+
TranscoderServiceClient.common_billing_account_path
65+
)
66+
parse_common_billing_account_path = staticmethod(
67+
TranscoderServiceClient.parse_common_billing_account_path
68+
)
69+
70+
common_folder_path = staticmethod(TranscoderServiceClient.common_folder_path)
71+
parse_common_folder_path = staticmethod(
72+
TranscoderServiceClient.parse_common_folder_path
73+
)
74+
75+
common_organization_path = staticmethod(
76+
TranscoderServiceClient.common_organization_path
77+
)
78+
parse_common_organization_path = staticmethod(
79+
TranscoderServiceClient.parse_common_organization_path
80+
)
81+
82+
common_project_path = staticmethod(TranscoderServiceClient.common_project_path)
83+
parse_common_project_path = staticmethod(
84+
TranscoderServiceClient.parse_common_project_path
85+
)
86+
87+
common_location_path = staticmethod(TranscoderServiceClient.common_location_path)
88+
parse_common_location_path = staticmethod(
89+
TranscoderServiceClient.parse_common_location_path
90+
)
5891

5992
from_service_account_file = TranscoderServiceClient.from_service_account_file
6093
from_service_account_json = from_service_account_file
6194

95+
@property
96+
def transport(self) -> TranscoderServiceTransport:
97+
"""Return the transport used by the client instance.
98+
99+
Returns:
100+
TranscoderServiceTransport: The transport used by the client instance.
101+
"""
102+
return self._client.transport
103+
62104
get_transport_class = functools.partial(
63105
type(TranscoderServiceClient).get_transport_class, type(TranscoderServiceClient)
64106
)
@@ -85,16 +127,19 @@ def __init__(
85127
client_options (ClientOptions): Custom options for the client. It
86128
won't take effect if a ``transport`` instance is provided.
87129
(1) The ``api_endpoint`` property can be used to override the
88-
default endpoint provided by the client. GOOGLE_API_USE_MTLS
130+
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
89131
environment variable can also be used to override the endpoint:
90132
"always" (always use the default mTLS endpoint), "never" (always
91-
use the default regular endpoint, this is the default value for
92-
the environment variable) and "auto" (auto switch to the default
93-
mTLS endpoint if client SSL credentials is present). However,
94-
the ``api_endpoint`` property takes precedence if provided.
95-
(2) The ``client_cert_source`` property is used to provide client
96-
SSL credentials for mutual TLS transport. If not provided, the
97-
default SSL credentials will be used if present.
133+
use the default regular endpoint) and "auto" (auto switch to the
134+
default mTLS endpoint if client certificate is present, this is
135+
the default value). However, the ``api_endpoint`` property takes
136+
precedence if provided.
137+
(2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable
138+
is "true", then the ``client_cert_source`` property can be used
139+
to provide client certificate for mutual TLS transport. If
140+
not provided, the default SSL client certificate will be used if
141+
present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not
142+
set, no client certificate will be used.
98143
99144
Raises:
100145
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -150,7 +195,8 @@ async def create_job(
150195
# Create or coerce a protobuf request object.
151196
# Sanity check: If we got a request object, we should *not* have
152197
# gotten any keyword arguments that map to the request.
153-
if request is not None and any([parent, job]):
198+
has_flattened_params = any([parent, job])
199+
if request is not None and has_flattened_params:
154200
raise ValueError(
155201
"If the `request` argument is set, then none of "
156202
"the individual field arguments should be set."
@@ -226,7 +272,8 @@ async def list_jobs(
226272
# Create or coerce a protobuf request object.
227273
# Sanity check: If we got a request object, we should *not* have
228274
# gotten any keyword arguments that map to the request.
229-
if request is not None and any([parent]):
275+
has_flattened_params = any([parent])
276+
if request is not None and has_flattened_params:
230277
raise ValueError(
231278
"If the `request` argument is set, then none of "
232279
"the individual field arguments should be set."
@@ -301,7 +348,8 @@ async def get_job(
301348
# Create or coerce a protobuf request object.
302349
# Sanity check: If we got a request object, we should *not* have
303350
# gotten any keyword arguments that map to the request.
304-
if request is not None and any([name]):
351+
has_flattened_params = any([name])
352+
if request is not None and has_flattened_params:
305353
raise ValueError(
306354
"If the `request` argument is set, then none of "
307355
"the individual field arguments should be set."
@@ -366,7 +414,8 @@ async def delete_job(
366414
# Create or coerce a protobuf request object.
367415
# Sanity check: If we got a request object, we should *not* have
368416
# gotten any keyword arguments that map to the request.
369-
if request is not None and any([name]):
417+
has_flattened_params = any([name])
418+
if request is not None and has_flattened_params:
370419
raise ValueError(
371420
"If the `request` argument is set, then none of "
372421
"the individual field arguments should be set."
@@ -435,7 +484,8 @@ async def create_job_template(
435484
resource name.
436485
437486
This value should be 4-63 characters, and valid
438-
characters are ``/[a-zA-Z0-9_-_]/``.
487+
characters must match the regular expression
488+
``[a-zA-Z][a-zA-Z0-9_-]*``.
439489
This corresponds to the ``job_template_id`` field
440490
on the ``request`` instance; if ``request`` is provided, this
441491
should not be set.
@@ -453,7 +503,8 @@ async def create_job_template(
453503
# Create or coerce a protobuf request object.
454504
# Sanity check: If we got a request object, we should *not* have
455505
# gotten any keyword arguments that map to the request.
456-
if request is not None and any([parent, job_template, job_template_id]):
506+
has_flattened_params = any([parent, job_template, job_template_id])
507+
if request is not None and has_flattened_params:
457508
raise ValueError(
458509
"If the `request` argument is set, then none of "
459510
"the individual field arguments should be set."
@@ -532,7 +583,8 @@ async def list_job_templates(
532583
# Create or coerce a protobuf request object.
533584
# Sanity check: If we got a request object, we should *not* have
534585
# gotten any keyword arguments that map to the request.
535-
if request is not None and any([parent]):
586+
has_flattened_params = any([parent])
587+
if request is not None and has_flattened_params:
536588
raise ValueError(
537589
"If the `request` argument is set, then none of "
538590
"the individual field arguments should be set."
@@ -608,7 +660,8 @@ async def get_job_template(
608660
# Create or coerce a protobuf request object.
609661
# Sanity check: If we got a request object, we should *not* have
610662
# gotten any keyword arguments that map to the request.
611-
if request is not None and any([name]):
663+
has_flattened_params = any([name])
664+
if request is not None and has_flattened_params:
612665
raise ValueError(
613666
"If the `request` argument is set, then none of "
614667
"the individual field arguments should be set."
@@ -673,7 +726,8 @@ async def delete_job_template(
673726
# Create or coerce a protobuf request object.
674727
# Sanity check: If we got a request object, we should *not* have
675728
# gotten any keyword arguments that map to the request.
676-
if request is not None and any([name]):
729+
has_flattened_params = any([name])
730+
if request is not None and has_flattened_params:
677731
raise ValueError(
678732
"If the `request` argument is set, then none of "
679733
"the individual field arguments should be set."

0 commit comments

Comments
 (0)