Skip to content

Commit 9e5ab6d

Browse files
feat: Add IngestConversationsStats (#287)
* feat: Add IngestConversationsStats docs: Reformat some lines of code PiperOrigin-RevId: 506985378 Source-Link: googleapis/googleapis@cfed8e6 Source-Link: googleapis/googleapis-gen@13ec519 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTNlYzUxOTg5ZjdiZTQ4ZjllODg5ZDgyN2RhZjk3MDdlMzE4MjYxMyJ9 * 🦉 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 7ddc0ca commit 9e5ab6d

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/types/contact_center_insights.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,48 @@ class IngestConversationsMetadata(proto.Message):
587587
Output only. Partial errors during ingest
588588
operation that might cause the operation output
589589
to be incomplete.
590+
ingest_conversations_stats (google.cloud.contact_center_insights_v1.types.IngestConversationsMetadata.IngestConversationsStats):
591+
Output only. Statistics for
592+
IngestConversations operation.
590593
"""
591594

595+
class IngestConversationsStats(proto.Message):
596+
r"""Statistics for IngestConversations operation.
597+
598+
Attributes:
599+
processed_object_count (int):
600+
Output only. The number of objects processed
601+
during the ingest operation.
602+
duplicates_skipped_count (int):
603+
Output only. The number of objects skipped
604+
because another conversation with the same
605+
transcript uri had already been ingested.
606+
successful_ingest_count (int):
607+
Output only. The number of new conversations
608+
added during this ingest operation.
609+
failed_ingest_count (int):
610+
Output only. The number of objects which were unable to be
611+
ingested due to errors. The errors are populated in the
612+
partial_errors field.
613+
"""
614+
615+
processed_object_count: int = proto.Field(
616+
proto.INT32,
617+
number=1,
618+
)
619+
duplicates_skipped_count: int = proto.Field(
620+
proto.INT32,
621+
number=2,
622+
)
623+
successful_ingest_count: int = proto.Field(
624+
proto.INT32,
625+
number=3,
626+
)
627+
failed_ingest_count: int = proto.Field(
628+
proto.INT32,
629+
number=4,
630+
)
631+
592632
create_time: timestamp_pb2.Timestamp = proto.Field(
593633
proto.MESSAGE,
594634
number=1,
@@ -609,6 +649,11 @@ class IngestConversationsMetadata(proto.Message):
609649
number=4,
610650
message=status_pb2.Status,
611651
)
652+
ingest_conversations_stats: IngestConversationsStats = proto.Field(
653+
proto.MESSAGE,
654+
number=5,
655+
message=IngestConversationsStats,
656+
)
612657

613658

614659
class IngestConversationsResponse(proto.Message):

packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/types/resources.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,9 @@ class IssueModel(proto.Message):
12011201
update_time (google.protobuf.timestamp_pb2.Timestamp):
12021202
Output only. The most recent time at which
12031203
the issue model was updated.
1204+
issue_count (int):
1205+
Output only. Number of issues in this issue
1206+
model.
12041207
state (google.cloud.contact_center_insights_v1.types.IssueModel.State):
12051208
Output only. State of the model.
12061209
input_data_config (google.cloud.contact_center_insights_v1.types.IssueModel.InputDataConfig):
@@ -1286,6 +1289,10 @@ class InputDataConfig(proto.Message):
12861289
number=4,
12871290
message=timestamp_pb2.Timestamp,
12881291
)
1292+
issue_count: int = proto.Field(
1293+
proto.INT64,
1294+
number=8,
1295+
)
12891296
state: State = proto.Field(
12901297
proto.ENUM,
12911298
number=5,
@@ -2196,7 +2203,8 @@ class View(proto.Message):
21962203
Output only. The most recent time at which
21972204
the view was updated.
21982205
value (str):
2199-
String with specific view properties.
2206+
String with specific view properties, must be
2207+
non-empty.
22002208
"""
22012209

22022210
name: str = proto.Field(

packages/google-cloud-contact-center-insights/tests/unit/gapic/contact_center_insights_v1/test_contact_center_insights.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4372,6 +4372,7 @@ def test_update_issue_model(request_type, transport: str = "grpc"):
43724372
call.return_value = resources.IssueModel(
43734373
name="name_value",
43744374
display_name="display_name_value",
4375+
issue_count=1201,
43754376
state=resources.IssueModel.State.UNDEPLOYED,
43764377
)
43774378
response = client.update_issue_model(request)
@@ -4385,6 +4386,7 @@ def test_update_issue_model(request_type, transport: str = "grpc"):
43854386
assert isinstance(response, resources.IssueModel)
43864387
assert response.name == "name_value"
43874388
assert response.display_name == "display_name_value"
4389+
assert response.issue_count == 1201
43884390
assert response.state == resources.IssueModel.State.UNDEPLOYED
43894391

43904392

@@ -4429,6 +4431,7 @@ async def test_update_issue_model_async(
44294431
resources.IssueModel(
44304432
name="name_value",
44314433
display_name="display_name_value",
4434+
issue_count=1201,
44324435
state=resources.IssueModel.State.UNDEPLOYED,
44334436
)
44344437
)
@@ -4443,6 +4446,7 @@ async def test_update_issue_model_async(
44434446
assert isinstance(response, resources.IssueModel)
44444447
assert response.name == "name_value"
44454448
assert response.display_name == "display_name_value"
4449+
assert response.issue_count == 1201
44464450
assert response.state == resources.IssueModel.State.UNDEPLOYED
44474451

44484452

@@ -4635,6 +4639,7 @@ def test_get_issue_model(request_type, transport: str = "grpc"):
46354639
call.return_value = resources.IssueModel(
46364640
name="name_value",
46374641
display_name="display_name_value",
4642+
issue_count=1201,
46384643
state=resources.IssueModel.State.UNDEPLOYED,
46394644
)
46404645
response = client.get_issue_model(request)
@@ -4648,6 +4653,7 @@ def test_get_issue_model(request_type, transport: str = "grpc"):
46484653
assert isinstance(response, resources.IssueModel)
46494654
assert response.name == "name_value"
46504655
assert response.display_name == "display_name_value"
4656+
assert response.issue_count == 1201
46514657
assert response.state == resources.IssueModel.State.UNDEPLOYED
46524658

46534659

@@ -4688,6 +4694,7 @@ async def test_get_issue_model_async(
46884694
resources.IssueModel(
46894695
name="name_value",
46904696
display_name="display_name_value",
4697+
issue_count=1201,
46914698
state=resources.IssueModel.State.UNDEPLOYED,
46924699
)
46934700
)
@@ -4702,6 +4709,7 @@ async def test_get_issue_model_async(
47024709
assert isinstance(response, resources.IssueModel)
47034710
assert response.name == "name_value"
47044711
assert response.display_name == "display_name_value"
4712+
assert response.issue_count == 1201
47054713
assert response.state == resources.IssueModel.State.UNDEPLOYED
47064714

47074715

0 commit comments

Comments
 (0)