google-cloud-video-transcoder 1.15.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. google/cloud/video/transcoder/__init__.py +93 -0
  2. google/cloud/video/transcoder/gapic_version.py +16 -0
  3. google/cloud/video/transcoder/py.typed +2 -0
  4. google/cloud/video/transcoder_v1/__init__.py +91 -0
  5. google/cloud/video/transcoder_v1/gapic_metadata.json +148 -0
  6. google/cloud/video/transcoder_v1/gapic_version.py +16 -0
  7. google/cloud/video/transcoder_v1/py.typed +2 -0
  8. google/cloud/video/transcoder_v1/services/__init__.py +15 -0
  9. google/cloud/video/transcoder_v1/services/transcoder_service/__init__.py +22 -0
  10. google/cloud/video/transcoder_v1/services/transcoder_service/async_client.py +1242 -0
  11. google/cloud/video/transcoder_v1/services/transcoder_service/client.py +1669 -0
  12. google/cloud/video/transcoder_v1/services/transcoder_service/pagers.py +353 -0
  13. google/cloud/video/transcoder_v1/services/transcoder_service/transports/__init__.py +36 -0
  14. google/cloud/video/transcoder_v1/services/transcoder_service/transports/base.py +260 -0
  15. google/cloud/video/transcoder_v1/services/transcoder_service/transports/grpc.py +542 -0
  16. google/cloud/video/transcoder_v1/services/transcoder_service/transports/grpc_asyncio.py +605 -0
  17. google/cloud/video/transcoder_v1/services/transcoder_service/transports/rest.py +1709 -0
  18. google/cloud/video/transcoder_v1/services/transcoder_service/transports/rest_base.py +490 -0
  19. google/cloud/video/transcoder_v1/types/__init__.py +80 -0
  20. google/cloud/video/transcoder_v1/types/resources.py +2534 -0
  21. google/cloud/video/transcoder_v1/types/services.py +326 -0
  22. google_cloud_video_transcoder-1.15.1.dist-info/LICENSE +202 -0
  23. google_cloud_video_transcoder-1.15.1.dist-info/METADATA +228 -0
  24. google_cloud_video_transcoder-1.15.1.dist-info/RECORD +26 -0
  25. google_cloud_video_transcoder-1.15.1.dist-info/WHEEL +5 -0
  26. google_cloud_video_transcoder-1.15.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,542 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2024 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ import json
17
+ import logging as std_logging
18
+ import pickle
19
+ from typing import Callable, Dict, Optional, Sequence, Tuple, Union
20
+ import warnings
21
+
22
+ from google.api_core import gapic_v1, grpc_helpers
23
+ import google.auth # type: ignore
24
+ from google.auth import credentials as ga_credentials # type: ignore
25
+ from google.auth.transport.grpc import SslCredentials # type: ignore
26
+ from google.protobuf import empty_pb2 # type: ignore
27
+ from google.protobuf.json_format import MessageToJson
28
+ import google.protobuf.message
29
+ import grpc # type: ignore
30
+ import proto # type: ignore
31
+
32
+ from google.cloud.video.transcoder_v1.types import resources, services
33
+
34
+ from .base import DEFAULT_CLIENT_INFO, TranscoderServiceTransport
35
+
36
+ try:
37
+ from google.api_core import client_logging # type: ignore
38
+
39
+ CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
40
+ except ImportError: # pragma: NO COVER
41
+ CLIENT_LOGGING_SUPPORTED = False
42
+
43
+ _LOGGER = std_logging.getLogger(__name__)
44
+
45
+
46
+ class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor): # pragma: NO COVER
47
+ def intercept_unary_unary(self, continuation, client_call_details, request):
48
+ logging_enabled = CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
49
+ std_logging.DEBUG
50
+ )
51
+ if logging_enabled: # pragma: NO COVER
52
+ request_metadata = client_call_details.metadata
53
+ if isinstance(request, proto.Message):
54
+ request_payload = type(request).to_json(request)
55
+ elif isinstance(request, google.protobuf.message.Message):
56
+ request_payload = MessageToJson(request)
57
+ else:
58
+ request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
59
+
60
+ request_metadata = {
61
+ key: value.decode("utf-8") if isinstance(value, bytes) else value
62
+ for key, value in request_metadata
63
+ }
64
+ grpc_request = {
65
+ "payload": request_payload,
66
+ "requestMethod": "grpc",
67
+ "metadata": dict(request_metadata),
68
+ }
69
+ _LOGGER.debug(
70
+ f"Sending request for {client_call_details.method}",
71
+ extra={
72
+ "serviceName": "google.cloud.video.transcoder.v1.TranscoderService",
73
+ "rpcName": client_call_details.method,
74
+ "request": grpc_request,
75
+ "metadata": grpc_request["metadata"],
76
+ },
77
+ )
78
+
79
+ response = continuation(client_call_details, request)
80
+ if logging_enabled: # pragma: NO COVER
81
+ response_metadata = response.trailing_metadata()
82
+ # Convert gRPC metadata `<class 'grpc.aio._metadata.Metadata'>` to list of tuples
83
+ metadata = (
84
+ dict([(k, str(v)) for k, v in response_metadata])
85
+ if response_metadata
86
+ else None
87
+ )
88
+ result = response.result()
89
+ if isinstance(result, proto.Message):
90
+ response_payload = type(result).to_json(result)
91
+ elif isinstance(result, google.protobuf.message.Message):
92
+ response_payload = MessageToJson(result)
93
+ else:
94
+ response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
95
+ grpc_response = {
96
+ "payload": response_payload,
97
+ "metadata": metadata,
98
+ "status": "OK",
99
+ }
100
+ _LOGGER.debug(
101
+ f"Received response for {client_call_details.method}.",
102
+ extra={
103
+ "serviceName": "google.cloud.video.transcoder.v1.TranscoderService",
104
+ "rpcName": client_call_details.method,
105
+ "response": grpc_response,
106
+ "metadata": grpc_response["metadata"],
107
+ },
108
+ )
109
+ return response
110
+
111
+
112
+ class TranscoderServiceGrpcTransport(TranscoderServiceTransport):
113
+ """gRPC backend transport for TranscoderService.
114
+
115
+ Using the Transcoder API, you can queue asynchronous jobs for
116
+ transcoding media into various output formats. Output formats
117
+ may include different streaming standards such as HTTP Live
118
+ Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH).
119
+ You can also customize jobs using advanced features such as
120
+ Digital Rights Management (DRM), audio equalization, content
121
+ concatenation, and digital ad-stitch ready content generation.
122
+
123
+ This class defines the same methods as the primary client, so the
124
+ primary client can load the underlying transport implementation
125
+ and call it.
126
+
127
+ It sends protocol buffers over the wire using gRPC (which is built on
128
+ top of HTTP/2); the ``grpcio`` package must be installed.
129
+ """
130
+
131
+ _stubs: Dict[str, Callable]
132
+
133
+ def __init__(
134
+ self,
135
+ *,
136
+ host: str = "transcoder.googleapis.com",
137
+ credentials: Optional[ga_credentials.Credentials] = None,
138
+ credentials_file: Optional[str] = None,
139
+ scopes: Optional[Sequence[str]] = None,
140
+ channel: Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]] = None,
141
+ api_mtls_endpoint: Optional[str] = None,
142
+ client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
143
+ ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
144
+ client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
145
+ quota_project_id: Optional[str] = None,
146
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
147
+ always_use_jwt_access: Optional[bool] = False,
148
+ api_audience: Optional[str] = None,
149
+ ) -> None:
150
+ """Instantiate the transport.
151
+
152
+ Args:
153
+ host (Optional[str]):
154
+ The hostname to connect to (default: 'transcoder.googleapis.com').
155
+ credentials (Optional[google.auth.credentials.Credentials]): The
156
+ authorization credentials to attach to requests. These
157
+ credentials identify the application to the service; if none
158
+ are specified, the client will attempt to ascertain the
159
+ credentials from the environment.
160
+ This argument is ignored if a ``channel`` instance is provided.
161
+ credentials_file (Optional[str]): A file with credentials that can
162
+ be loaded with :func:`google.auth.load_credentials_from_file`.
163
+ This argument is ignored if a ``channel`` instance is provided.
164
+ scopes (Optional(Sequence[str])): A list of scopes. This argument is
165
+ ignored if a ``channel`` instance is provided.
166
+ channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
167
+ A ``Channel`` instance through which to make calls, or a Callable
168
+ that constructs and returns one. If set to None, ``self.create_channel``
169
+ is used to create the channel. If a Callable is given, it will be called
170
+ with the same arguments as used in ``self.create_channel``.
171
+ api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
172
+ If provided, it overrides the ``host`` argument and tries to create
173
+ a mutual TLS channel with client SSL credentials from
174
+ ``client_cert_source`` or application default SSL credentials.
175
+ client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
176
+ Deprecated. A callback to provide client SSL certificate bytes and
177
+ private key bytes, both in PEM format. It is ignored if
178
+ ``api_mtls_endpoint`` is None.
179
+ ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
180
+ for the grpc channel. It is ignored if a ``channel`` instance is provided.
181
+ client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
182
+ A callback to provide client certificate bytes and private key bytes,
183
+ both in PEM format. It is used to configure a mutual TLS channel. It is
184
+ ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
185
+ quota_project_id (Optional[str]): An optional project to use for billing
186
+ and quota.
187
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
188
+ The client info used to send a user-agent string along with
189
+ API requests. If ``None``, then default info will be used.
190
+ Generally, you only need to set this if you're developing
191
+ your own client library.
192
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
193
+ be used for service account credentials.
194
+
195
+ Raises:
196
+ google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
197
+ creation failed for any reason.
198
+ google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
199
+ and ``credentials_file`` are passed.
200
+ """
201
+ self._grpc_channel = None
202
+ self._ssl_channel_credentials = ssl_channel_credentials
203
+ self._stubs: Dict[str, Callable] = {}
204
+
205
+ if api_mtls_endpoint:
206
+ warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
207
+ if client_cert_source:
208
+ warnings.warn("client_cert_source is deprecated", DeprecationWarning)
209
+
210
+ if isinstance(channel, grpc.Channel):
211
+ # Ignore credentials if a channel was passed.
212
+ credentials = None
213
+ self._ignore_credentials = True
214
+ # If a channel was explicitly provided, set it.
215
+ self._grpc_channel = channel
216
+ self._ssl_channel_credentials = None
217
+
218
+ else:
219
+ if api_mtls_endpoint:
220
+ host = api_mtls_endpoint
221
+
222
+ # Create SSL credentials with client_cert_source or application
223
+ # default SSL credentials.
224
+ if client_cert_source:
225
+ cert, key = client_cert_source()
226
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
227
+ certificate_chain=cert, private_key=key
228
+ )
229
+ else:
230
+ self._ssl_channel_credentials = SslCredentials().ssl_credentials
231
+
232
+ else:
233
+ if client_cert_source_for_mtls and not ssl_channel_credentials:
234
+ cert, key = client_cert_source_for_mtls()
235
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
236
+ certificate_chain=cert, private_key=key
237
+ )
238
+
239
+ # The base transport sets the host, credentials and scopes
240
+ super().__init__(
241
+ host=host,
242
+ credentials=credentials,
243
+ credentials_file=credentials_file,
244
+ scopes=scopes,
245
+ quota_project_id=quota_project_id,
246
+ client_info=client_info,
247
+ always_use_jwt_access=always_use_jwt_access,
248
+ api_audience=api_audience,
249
+ )
250
+
251
+ if not self._grpc_channel:
252
+ # initialize with the provided callable or the default channel
253
+ channel_init = channel or type(self).create_channel
254
+ self._grpc_channel = channel_init(
255
+ self._host,
256
+ # use the credentials which are saved
257
+ credentials=self._credentials,
258
+ # Set ``credentials_file`` to ``None`` here as
259
+ # the credentials that we saved earlier should be used.
260
+ credentials_file=None,
261
+ scopes=self._scopes,
262
+ ssl_credentials=self._ssl_channel_credentials,
263
+ quota_project_id=quota_project_id,
264
+ options=[
265
+ ("grpc.max_send_message_length", -1),
266
+ ("grpc.max_receive_message_length", -1),
267
+ ],
268
+ )
269
+
270
+ self._interceptor = _LoggingClientInterceptor()
271
+ self._logged_channel = grpc.intercept_channel(
272
+ self._grpc_channel, self._interceptor
273
+ )
274
+
275
+ # Wrap messages. This must be done after self._logged_channel exists
276
+ self._prep_wrapped_messages(client_info)
277
+
278
+ @classmethod
279
+ def create_channel(
280
+ cls,
281
+ host: str = "transcoder.googleapis.com",
282
+ credentials: Optional[ga_credentials.Credentials] = None,
283
+ credentials_file: Optional[str] = None,
284
+ scopes: Optional[Sequence[str]] = None,
285
+ quota_project_id: Optional[str] = None,
286
+ **kwargs,
287
+ ) -> grpc.Channel:
288
+ """Create and return a gRPC channel object.
289
+ Args:
290
+ host (Optional[str]): The host for the channel to use.
291
+ credentials (Optional[~.Credentials]): The
292
+ authorization credentials to attach to requests. These
293
+ credentials identify this application to the service. If
294
+ none are specified, the client will attempt to ascertain
295
+ the credentials from the environment.
296
+ credentials_file (Optional[str]): A file with credentials that can
297
+ be loaded with :func:`google.auth.load_credentials_from_file`.
298
+ This argument is mutually exclusive with credentials.
299
+ scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
300
+ service. These are only used when credentials are not specified and
301
+ are passed to :func:`google.auth.default`.
302
+ quota_project_id (Optional[str]): An optional project to use for billing
303
+ and quota.
304
+ kwargs (Optional[dict]): Keyword arguments, which are passed to the
305
+ channel creation.
306
+ Returns:
307
+ grpc.Channel: A gRPC channel object.
308
+
309
+ Raises:
310
+ google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
311
+ and ``credentials_file`` are passed.
312
+ """
313
+
314
+ return grpc_helpers.create_channel(
315
+ host,
316
+ credentials=credentials,
317
+ credentials_file=credentials_file,
318
+ quota_project_id=quota_project_id,
319
+ default_scopes=cls.AUTH_SCOPES,
320
+ scopes=scopes,
321
+ default_host=cls.DEFAULT_HOST,
322
+ **kwargs,
323
+ )
324
+
325
+ @property
326
+ def grpc_channel(self) -> grpc.Channel:
327
+ """Return the channel designed to connect to this service."""
328
+ return self._grpc_channel
329
+
330
+ @property
331
+ def create_job(self) -> Callable[[services.CreateJobRequest], resources.Job]:
332
+ r"""Return a callable for the create job method over gRPC.
333
+
334
+ Creates a job in the specified region.
335
+
336
+ Returns:
337
+ Callable[[~.CreateJobRequest],
338
+ ~.Job]:
339
+ A function that, when called, will call the underlying RPC
340
+ on the server.
341
+ """
342
+ # Generate a "stub function" on-the-fly which will actually make
343
+ # the request.
344
+ # gRPC handles serialization and deserialization, so we just need
345
+ # to pass in the functions for each.
346
+ if "create_job" not in self._stubs:
347
+ self._stubs["create_job"] = self._logged_channel.unary_unary(
348
+ "/google.cloud.video.transcoder.v1.TranscoderService/CreateJob",
349
+ request_serializer=services.CreateJobRequest.serialize,
350
+ response_deserializer=resources.Job.deserialize,
351
+ )
352
+ return self._stubs["create_job"]
353
+
354
+ @property
355
+ def list_jobs(
356
+ self,
357
+ ) -> Callable[[services.ListJobsRequest], services.ListJobsResponse]:
358
+ r"""Return a callable for the list jobs method over gRPC.
359
+
360
+ Lists jobs in the specified region.
361
+
362
+ Returns:
363
+ Callable[[~.ListJobsRequest],
364
+ ~.ListJobsResponse]:
365
+ A function that, when called, will call the underlying RPC
366
+ on the server.
367
+ """
368
+ # Generate a "stub function" on-the-fly which will actually make
369
+ # the request.
370
+ # gRPC handles serialization and deserialization, so we just need
371
+ # to pass in the functions for each.
372
+ if "list_jobs" not in self._stubs:
373
+ self._stubs["list_jobs"] = self._logged_channel.unary_unary(
374
+ "/google.cloud.video.transcoder.v1.TranscoderService/ListJobs",
375
+ request_serializer=services.ListJobsRequest.serialize,
376
+ response_deserializer=services.ListJobsResponse.deserialize,
377
+ )
378
+ return self._stubs["list_jobs"]
379
+
380
+ @property
381
+ def get_job(self) -> Callable[[services.GetJobRequest], resources.Job]:
382
+ r"""Return a callable for the get job method over gRPC.
383
+
384
+ Returns the job data.
385
+
386
+ Returns:
387
+ Callable[[~.GetJobRequest],
388
+ ~.Job]:
389
+ A function that, when called, will call the underlying RPC
390
+ on the server.
391
+ """
392
+ # Generate a "stub function" on-the-fly which will actually make
393
+ # the request.
394
+ # gRPC handles serialization and deserialization, so we just need
395
+ # to pass in the functions for each.
396
+ if "get_job" not in self._stubs:
397
+ self._stubs["get_job"] = self._logged_channel.unary_unary(
398
+ "/google.cloud.video.transcoder.v1.TranscoderService/GetJob",
399
+ request_serializer=services.GetJobRequest.serialize,
400
+ response_deserializer=resources.Job.deserialize,
401
+ )
402
+ return self._stubs["get_job"]
403
+
404
+ @property
405
+ def delete_job(self) -> Callable[[services.DeleteJobRequest], empty_pb2.Empty]:
406
+ r"""Return a callable for the delete job method over gRPC.
407
+
408
+ Deletes a job.
409
+
410
+ Returns:
411
+ Callable[[~.DeleteJobRequest],
412
+ ~.Empty]:
413
+ A function that, when called, will call the underlying RPC
414
+ on the server.
415
+ """
416
+ # Generate a "stub function" on-the-fly which will actually make
417
+ # the request.
418
+ # gRPC handles serialization and deserialization, so we just need
419
+ # to pass in the functions for each.
420
+ if "delete_job" not in self._stubs:
421
+ self._stubs["delete_job"] = self._logged_channel.unary_unary(
422
+ "/google.cloud.video.transcoder.v1.TranscoderService/DeleteJob",
423
+ request_serializer=services.DeleteJobRequest.serialize,
424
+ response_deserializer=empty_pb2.Empty.FromString,
425
+ )
426
+ return self._stubs["delete_job"]
427
+
428
+ @property
429
+ def create_job_template(
430
+ self,
431
+ ) -> Callable[[services.CreateJobTemplateRequest], resources.JobTemplate]:
432
+ r"""Return a callable for the create job template method over gRPC.
433
+
434
+ Creates a job template in the specified region.
435
+
436
+ Returns:
437
+ Callable[[~.CreateJobTemplateRequest],
438
+ ~.JobTemplate]:
439
+ A function that, when called, will call the underlying RPC
440
+ on the server.
441
+ """
442
+ # Generate a "stub function" on-the-fly which will actually make
443
+ # the request.
444
+ # gRPC handles serialization and deserialization, so we just need
445
+ # to pass in the functions for each.
446
+ if "create_job_template" not in self._stubs:
447
+ self._stubs["create_job_template"] = self._logged_channel.unary_unary(
448
+ "/google.cloud.video.transcoder.v1.TranscoderService/CreateJobTemplate",
449
+ request_serializer=services.CreateJobTemplateRequest.serialize,
450
+ response_deserializer=resources.JobTemplate.deserialize,
451
+ )
452
+ return self._stubs["create_job_template"]
453
+
454
+ @property
455
+ def list_job_templates(
456
+ self,
457
+ ) -> Callable[
458
+ [services.ListJobTemplatesRequest], services.ListJobTemplatesResponse
459
+ ]:
460
+ r"""Return a callable for the list job templates method over gRPC.
461
+
462
+ Lists job templates in the specified region.
463
+
464
+ Returns:
465
+ Callable[[~.ListJobTemplatesRequest],
466
+ ~.ListJobTemplatesResponse]:
467
+ A function that, when called, will call the underlying RPC
468
+ on the server.
469
+ """
470
+ # Generate a "stub function" on-the-fly which will actually make
471
+ # the request.
472
+ # gRPC handles serialization and deserialization, so we just need
473
+ # to pass in the functions for each.
474
+ if "list_job_templates" not in self._stubs:
475
+ self._stubs["list_job_templates"] = self._logged_channel.unary_unary(
476
+ "/google.cloud.video.transcoder.v1.TranscoderService/ListJobTemplates",
477
+ request_serializer=services.ListJobTemplatesRequest.serialize,
478
+ response_deserializer=services.ListJobTemplatesResponse.deserialize,
479
+ )
480
+ return self._stubs["list_job_templates"]
481
+
482
+ @property
483
+ def get_job_template(
484
+ self,
485
+ ) -> Callable[[services.GetJobTemplateRequest], resources.JobTemplate]:
486
+ r"""Return a callable for the get job template method over gRPC.
487
+
488
+ Returns the job template data.
489
+
490
+ Returns:
491
+ Callable[[~.GetJobTemplateRequest],
492
+ ~.JobTemplate]:
493
+ A function that, when called, will call the underlying RPC
494
+ on the server.
495
+ """
496
+ # Generate a "stub function" on-the-fly which will actually make
497
+ # the request.
498
+ # gRPC handles serialization and deserialization, so we just need
499
+ # to pass in the functions for each.
500
+ if "get_job_template" not in self._stubs:
501
+ self._stubs["get_job_template"] = self._logged_channel.unary_unary(
502
+ "/google.cloud.video.transcoder.v1.TranscoderService/GetJobTemplate",
503
+ request_serializer=services.GetJobTemplateRequest.serialize,
504
+ response_deserializer=resources.JobTemplate.deserialize,
505
+ )
506
+ return self._stubs["get_job_template"]
507
+
508
+ @property
509
+ def delete_job_template(
510
+ self,
511
+ ) -> Callable[[services.DeleteJobTemplateRequest], empty_pb2.Empty]:
512
+ r"""Return a callable for the delete job template method over gRPC.
513
+
514
+ Deletes a job template.
515
+
516
+ Returns:
517
+ Callable[[~.DeleteJobTemplateRequest],
518
+ ~.Empty]:
519
+ A function that, when called, will call the underlying RPC
520
+ on the server.
521
+ """
522
+ # Generate a "stub function" on-the-fly which will actually make
523
+ # the request.
524
+ # gRPC handles serialization and deserialization, so we just need
525
+ # to pass in the functions for each.
526
+ if "delete_job_template" not in self._stubs:
527
+ self._stubs["delete_job_template"] = self._logged_channel.unary_unary(
528
+ "/google.cloud.video.transcoder.v1.TranscoderService/DeleteJobTemplate",
529
+ request_serializer=services.DeleteJobTemplateRequest.serialize,
530
+ response_deserializer=empty_pb2.Empty.FromString,
531
+ )
532
+ return self._stubs["delete_job_template"]
533
+
534
+ def close(self):
535
+ self._logged_channel.close()
536
+
537
+ @property
538
+ def kind(self) -> str:
539
+ return "grpc"
540
+
541
+
542
+ __all__ = ("TranscoderServiceGrpcTransport",)