|
34 | 34 | from google.api_core.client_options import ClientOptions
|
35 | 35 | from google.auth import credentials as ga_credentials # type: ignore
|
36 | 36 | from google.oauth2 import service_account # type: ignore
|
37 |
| -import pkg_resources |
| 37 | + |
| 38 | +from google.cloud.dataqna_v1alpha import gapic_version as package_version |
38 | 39 |
|
39 | 40 | try:
|
40 | 41 | OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
|
@@ -247,7 +248,7 @@ async def get_question(
|
247 | 248 | *,
|
248 | 249 | name: Optional[str] = None,
|
249 | 250 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
250 |
| - timeout: Optional[float] = None, |
| 251 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
251 | 252 | metadata: Sequence[Tuple[str, str]] = (),
|
252 | 253 | ) -> question.Question:
|
253 | 254 | r"""Gets a previously created question.
|
@@ -353,7 +354,7 @@ async def create_question(
|
353 | 354 | parent: Optional[str] = None,
|
354 | 355 | question: Optional[gcd_question.Question] = None,
|
355 | 356 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
356 |
| - timeout: Optional[float] = None, |
| 357 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
357 | 358 | metadata: Sequence[Tuple[str, str]] = (),
|
358 | 359 | ) -> gcd_question.Question:
|
359 | 360 | r"""Creates a question.
|
@@ -472,7 +473,7 @@ async def execute_question(
|
472 | 473 | name: Optional[str] = None,
|
473 | 474 | interpretation_index: Optional[int] = None,
|
474 | 475 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
475 |
| - timeout: Optional[float] = None, |
| 476 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
476 | 477 | metadata: Sequence[Tuple[str, str]] = (),
|
477 | 478 | ) -> question.Question:
|
478 | 479 | r"""Executes an interpretation.
|
@@ -587,7 +588,7 @@ async def get_user_feedback(
|
587 | 588 | *,
|
588 | 589 | name: Optional[str] = None,
|
589 | 590 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
590 |
| - timeout: Optional[float] = None, |
| 591 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
591 | 592 | metadata: Sequence[Tuple[str, str]] = (),
|
592 | 593 | ) -> user_feedback.UserFeedback:
|
593 | 594 | r"""Gets previously created user feedback.
|
@@ -691,7 +692,7 @@ async def update_user_feedback(
|
691 | 692 | user_feedback: Optional[gcd_user_feedback.UserFeedback] = None,
|
692 | 693 | update_mask: Optional[field_mask_pb2.FieldMask] = None,
|
693 | 694 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
694 |
| - timeout: Optional[float] = None, |
| 695 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
695 | 696 | metadata: Sequence[Tuple[str, str]] = (),
|
696 | 697 | ) -> gcd_user_feedback.UserFeedback:
|
697 | 698 | r"""Updates user feedback. This creates user feedback if
|
@@ -808,14 +809,9 @@ async def __aexit__(self, exc_type, exc, tb):
|
808 | 809 | await self.transport.close()
|
809 | 810 |
|
810 | 811 |
|
811 |
| -try: |
812 |
| - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
813 |
| - gapic_version=pkg_resources.get_distribution( |
814 |
| - "google-cloud-data-qna", |
815 |
| - ).version, |
816 |
| - ) |
817 |
| -except pkg_resources.DistributionNotFound: |
818 |
| - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() |
| 812 | +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
| 813 | + gapic_version=package_version.__version__ |
| 814 | +) |
819 | 815 |
|
820 | 816 |
|
821 | 817 | __all__ = ("QuestionServiceAsyncClient",)
|
0 commit comments