Skip to content

Commit 9c9d40c

Browse files
docs: Add documentation for enums (#398)
* docs: Add documentation for enums fix: Add context manager return types chore: Update gapic-generator-python to v1.8.1 PiperOrigin-RevId: 503210727 Source-Link: googleapis/googleapis@a391fd1 Source-Link: googleapis/googleapis-gen@0080f83 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent fe1f892 commit 9c9d40c

16 files changed

Lines changed: 277 additions & 27 deletions

File tree

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/services/video_intelligence_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def sample_annotate_video():
557557
# Done; return the response.
558558
return response
559559

560-
def __enter__(self):
560+
def __enter__(self) -> "VideoIntelligenceServiceClient":
561561
return self
562562

563563
def __exit__(self, type, value, traceback):

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/types/video_intelligence.py

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,31 @@
7474

7575

7676
class Feature(proto.Enum):
77-
r"""Video annotation feature."""
77+
r"""Video annotation feature.
78+
79+
Values:
80+
FEATURE_UNSPECIFIED (0):
81+
Unspecified.
82+
LABEL_DETECTION (1):
83+
Label detection. Detect objects, such as dog
84+
or flower.
85+
SHOT_CHANGE_DETECTION (2):
86+
Shot change detection.
87+
EXPLICIT_CONTENT_DETECTION (3):
88+
Explicit content detection.
89+
FACE_DETECTION (4):
90+
Human face detection.
91+
SPEECH_TRANSCRIPTION (6):
92+
Speech transcription.
93+
TEXT_DETECTION (7):
94+
OCR text detection and tracking.
95+
OBJECT_TRACKING (9):
96+
Object detection and tracking.
97+
LOGO_RECOGNITION (12):
98+
Logo detection, tracking, and recognition.
99+
PERSON_DETECTION (14):
100+
Person detection.
101+
"""
78102
FEATURE_UNSPECIFIED = 0
79103
LABEL_DETECTION = 1
80104
SHOT_CHANGE_DETECTION = 2
@@ -88,15 +112,42 @@ class Feature(proto.Enum):
88112

89113

90114
class LabelDetectionMode(proto.Enum):
91-
r"""Label detection mode."""
115+
r"""Label detection mode.
116+
117+
Values:
118+
LABEL_DETECTION_MODE_UNSPECIFIED (0):
119+
Unspecified.
120+
SHOT_MODE (1):
121+
Detect shot-level labels.
122+
FRAME_MODE (2):
123+
Detect frame-level labels.
124+
SHOT_AND_FRAME_MODE (3):
125+
Detect both shot-level and frame-level
126+
labels.
127+
"""
92128
LABEL_DETECTION_MODE_UNSPECIFIED = 0
93129
SHOT_MODE = 1
94130
FRAME_MODE = 2
95131
SHOT_AND_FRAME_MODE = 3
96132

97133

98134
class Likelihood(proto.Enum):
99-
r"""Bucketized representation of likelihood."""
135+
r"""Bucketized representation of likelihood.
136+
137+
Values:
138+
LIKELIHOOD_UNSPECIFIED (0):
139+
Unspecified likelihood.
140+
VERY_UNLIKELY (1):
141+
Very unlikely.
142+
UNLIKELY (2):
143+
Unlikely.
144+
POSSIBLE (3):
145+
Possible.
146+
LIKELY (4):
147+
Likely.
148+
VERY_LIKELY (5):
149+
Very likely.
150+
"""
100151
LIKELIHOOD_UNSPECIFIED = 0
101152
VERY_UNLIKELY = 1
102153
UNLIKELY = 2

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1beta2/services/video_intelligence_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def sample_annotate_video():
557557
# Done; return the response.
558558
return response
559559

560-
def __enter__(self):
560+
def __enter__(self) -> "VideoIntelligenceServiceClient":
561561
return self
562562

563563
def __exit__(self, type, value, traceback):

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1beta2/types/video_intelligence.py

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,21 @@
5252

5353

5454
class Feature(proto.Enum):
55-
r"""Video annotation feature."""
55+
r"""Video annotation feature.
56+
57+
Values:
58+
FEATURE_UNSPECIFIED (0):
59+
Unspecified.
60+
LABEL_DETECTION (1):
61+
Label detection. Detect objects, such as dog
62+
or flower.
63+
SHOT_CHANGE_DETECTION (2):
64+
Shot change detection.
65+
EXPLICIT_CONTENT_DETECTION (3):
66+
Explicit content detection.
67+
FACE_DETECTION (4):
68+
Human face detection and tracking.
69+
"""
5670
FEATURE_UNSPECIFIED = 0
5771
LABEL_DETECTION = 1
5872
SHOT_CHANGE_DETECTION = 2
@@ -61,15 +75,42 @@ class Feature(proto.Enum):
6175

6276

6377
class LabelDetectionMode(proto.Enum):
64-
r"""Label detection mode."""
78+
r"""Label detection mode.
79+
80+
Values:
81+
LABEL_DETECTION_MODE_UNSPECIFIED (0):
82+
Unspecified.
83+
SHOT_MODE (1):
84+
Detect shot-level labels.
85+
FRAME_MODE (2):
86+
Detect frame-level labels.
87+
SHOT_AND_FRAME_MODE (3):
88+
Detect both shot-level and frame-level
89+
labels.
90+
"""
6591
LABEL_DETECTION_MODE_UNSPECIFIED = 0
6692
SHOT_MODE = 1
6793
FRAME_MODE = 2
6894
SHOT_AND_FRAME_MODE = 3
6995

7096

7197
class Likelihood(proto.Enum):
72-
r"""Bucketized representation of likelihood."""
98+
r"""Bucketized representation of likelihood.
99+
100+
Values:
101+
LIKELIHOOD_UNSPECIFIED (0):
102+
Unspecified likelihood.
103+
VERY_UNLIKELY (1):
104+
Very unlikely.
105+
UNLIKELY (2):
106+
Unlikely.
107+
POSSIBLE (3):
108+
Possible.
109+
LIKELY (4):
110+
Likely.
111+
VERY_LIKELY (5):
112+
Very likely.
113+
"""
73114
LIKELIHOOD_UNSPECIFIED = 0
74115
VERY_UNLIKELY = 1
75116
UNLIKELY = 2

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p1beta1/services/video_intelligence_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def sample_annotate_video():
557557
# Done; return the response.
558558
return response
559559

560-
def __enter__(self):
560+
def __enter__(self) -> "VideoIntelligenceServiceClient":
561561
return self
562562

563563
def __exit__(self, type, value, traceback):

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p1beta1/types/video_intelligence.py

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,21 @@
5252

5353

5454
class Feature(proto.Enum):
55-
r"""Video annotation feature."""
55+
r"""Video annotation feature.
56+
57+
Values:
58+
FEATURE_UNSPECIFIED (0):
59+
Unspecified.
60+
LABEL_DETECTION (1):
61+
Label detection. Detect objects, such as dog
62+
or flower.
63+
SHOT_CHANGE_DETECTION (2):
64+
Shot change detection.
65+
EXPLICIT_CONTENT_DETECTION (3):
66+
Explicit content detection.
67+
SPEECH_TRANSCRIPTION (6):
68+
Speech transcription.
69+
"""
5670
FEATURE_UNSPECIFIED = 0
5771
LABEL_DETECTION = 1
5872
SHOT_CHANGE_DETECTION = 2
@@ -61,15 +75,42 @@ class Feature(proto.Enum):
6175

6276

6377
class LabelDetectionMode(proto.Enum):
64-
r"""Label detection mode."""
78+
r"""Label detection mode.
79+
80+
Values:
81+
LABEL_DETECTION_MODE_UNSPECIFIED (0):
82+
Unspecified.
83+
SHOT_MODE (1):
84+
Detect shot-level labels.
85+
FRAME_MODE (2):
86+
Detect frame-level labels.
87+
SHOT_AND_FRAME_MODE (3):
88+
Detect both shot-level and frame-level
89+
labels.
90+
"""
6591
LABEL_DETECTION_MODE_UNSPECIFIED = 0
6692
SHOT_MODE = 1
6793
FRAME_MODE = 2
6894
SHOT_AND_FRAME_MODE = 3
6995

7096

7197
class Likelihood(proto.Enum):
72-
r"""Bucketized representation of likelihood."""
98+
r"""Bucketized representation of likelihood.
99+
100+
Values:
101+
LIKELIHOOD_UNSPECIFIED (0):
102+
Unspecified likelihood.
103+
VERY_UNLIKELY (1):
104+
Very unlikely.
105+
UNLIKELY (2):
106+
Unlikely.
107+
POSSIBLE (3):
108+
Possible.
109+
LIKELY (4):
110+
Likely.
111+
VERY_LIKELY (5):
112+
Very likely.
113+
"""
73114
LIKELIHOOD_UNSPECIFIED = 0
74115
VERY_UNLIKELY = 1
75116
UNLIKELY = 2

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p2beta1/services/video_intelligence_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def sample_annotate_video():
557557
# Done; return the response.
558558
return response
559559

560-
def __enter__(self):
560+
def __enter__(self) -> "VideoIntelligenceServiceClient":
561561
return self
562562

563563
def __exit__(self, type, value, traceback):

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p2beta1/types/video_intelligence.py

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,23 @@
5656

5757

5858
class Feature(proto.Enum):
59-
r"""Video annotation feature."""
59+
r"""Video annotation feature.
60+
61+
Values:
62+
FEATURE_UNSPECIFIED (0):
63+
Unspecified.
64+
LABEL_DETECTION (1):
65+
Label detection. Detect objects, such as dog
66+
or flower.
67+
SHOT_CHANGE_DETECTION (2):
68+
Shot change detection.
69+
EXPLICIT_CONTENT_DETECTION (3):
70+
Explicit content detection.
71+
TEXT_DETECTION (7):
72+
OCR text detection and tracking.
73+
OBJECT_TRACKING (9):
74+
Object detection and tracking.
75+
"""
6076
FEATURE_UNSPECIFIED = 0
6177
LABEL_DETECTION = 1
6278
SHOT_CHANGE_DETECTION = 2
@@ -66,15 +82,42 @@ class Feature(proto.Enum):
6682

6783

6884
class LabelDetectionMode(proto.Enum):
69-
r"""Label detection mode."""
85+
r"""Label detection mode.
86+
87+
Values:
88+
LABEL_DETECTION_MODE_UNSPECIFIED (0):
89+
Unspecified.
90+
SHOT_MODE (1):
91+
Detect shot-level labels.
92+
FRAME_MODE (2):
93+
Detect frame-level labels.
94+
SHOT_AND_FRAME_MODE (3):
95+
Detect both shot-level and frame-level
96+
labels.
97+
"""
7098
LABEL_DETECTION_MODE_UNSPECIFIED = 0
7199
SHOT_MODE = 1
72100
FRAME_MODE = 2
73101
SHOT_AND_FRAME_MODE = 3
74102

75103

76104
class Likelihood(proto.Enum):
77-
r"""Bucketized representation of likelihood."""
105+
r"""Bucketized representation of likelihood.
106+
107+
Values:
108+
LIKELIHOOD_UNSPECIFIED (0):
109+
Unspecified likelihood.
110+
VERY_UNLIKELY (1):
111+
Very unlikely.
112+
UNLIKELY (2):
113+
Unlikely.
114+
POSSIBLE (3):
115+
Possible.
116+
LIKELY (4):
117+
Likely.
118+
VERY_LIKELY (5):
119+
Very likely.
120+
"""
78121
LIKELIHOOD_UNSPECIFIED = 0
79122
VERY_UNLIKELY = 1
80123
UNLIKELY = 2

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p3beta1/services/streaming_video_intelligence_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def request_generator():
522522
# Done; return the response.
523523
return response
524524

525-
def __enter__(self):
525+
def __enter__(self) -> "StreamingVideoIntelligenceServiceClient":
526526
return self
527527

528528
def __exit__(self, type, value, traceback):

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p3beta1/services/video_intelligence_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def sample_annotate_video():
557557
# Done; return the response.
558558
return response
559559

560-
def __enter__(self):
560+
def __enter__(self) -> "VideoIntelligenceServiceClient":
561561
return self
562562

563563
def __exit__(self, type, value, traceback):

0 commit comments

Comments
 (0)