Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
feat: Add IngestConversationsStats (#287)
Browse files Browse the repository at this point in the history
* feat: Add IngestConversationsStats
docs: Reformat some lines of code

PiperOrigin-RevId: 506985378

Source-Link: googleapis/googleapis@cfed8e6

Source-Link: https://github.com/googleapis/googleapis-gen/commit/13ec51989f7be48f9e889d827daf9707e3182613
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 4, 2023
1 parent 0a4c0fe commit 9e3af8b
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,48 @@ class IngestConversationsMetadata(proto.Message):
Output only. Partial errors during ingest
operation that might cause the operation output
to be incomplete.
ingest_conversations_stats (google.cloud.contact_center_insights_v1.types.IngestConversationsMetadata.IngestConversationsStats):
Output only. Statistics for
IngestConversations operation.
"""

class IngestConversationsStats(proto.Message):
r"""Statistics for IngestConversations operation.
Attributes:
processed_object_count (int):
Output only. The number of objects processed
during the ingest operation.
duplicates_skipped_count (int):
Output only. The number of objects skipped
because another conversation with the same
transcript uri had already been ingested.
successful_ingest_count (int):
Output only. The number of new conversations
added during this ingest operation.
failed_ingest_count (int):
Output only. The number of objects which were unable to be
ingested due to errors. The errors are populated in the
partial_errors field.
"""

processed_object_count: int = proto.Field(
proto.INT32,
number=1,
)
duplicates_skipped_count: int = proto.Field(
proto.INT32,
number=2,
)
successful_ingest_count: int = proto.Field(
proto.INT32,
number=3,
)
failed_ingest_count: int = proto.Field(
proto.INT32,
number=4,
)

create_time: timestamp_pb2.Timestamp = proto.Field(
proto.MESSAGE,
number=1,
Expand All @@ -609,6 +649,11 @@ class IngestConversationsMetadata(proto.Message):
number=4,
message=status_pb2.Status,
)
ingest_conversations_stats: IngestConversationsStats = proto.Field(
proto.MESSAGE,
number=5,
message=IngestConversationsStats,
)


class IngestConversationsResponse(proto.Message):
Expand Down
10 changes: 9 additions & 1 deletion google/cloud/contact_center_insights_v1/types/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,9 @@ class IssueModel(proto.Message):
update_time (google.protobuf.timestamp_pb2.Timestamp):
Output only. The most recent time at which
the issue model was updated.
issue_count (int):
Output only. Number of issues in this issue
model.
state (google.cloud.contact_center_insights_v1.types.IssueModel.State):
Output only. State of the model.
input_data_config (google.cloud.contact_center_insights_v1.types.IssueModel.InputDataConfig):
Expand Down Expand Up @@ -1286,6 +1289,10 @@ class InputDataConfig(proto.Message):
number=4,
message=timestamp_pb2.Timestamp,
)
issue_count: int = proto.Field(
proto.INT64,
number=8,
)
state: State = proto.Field(
proto.ENUM,
number=5,
Expand Down Expand Up @@ -2196,7 +2203,8 @@ class View(proto.Message):
Output only. The most recent time at which
the view was updated.
value (str):
String with specific view properties.
String with specific view properties, must be
non-empty.
"""

name: str = proto.Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4372,6 +4372,7 @@ def test_update_issue_model(request_type, transport: str = "grpc"):
call.return_value = resources.IssueModel(
name="name_value",
display_name="display_name_value",
issue_count=1201,
state=resources.IssueModel.State.UNDEPLOYED,
)
response = client.update_issue_model(request)
Expand All @@ -4385,6 +4386,7 @@ def test_update_issue_model(request_type, transport: str = "grpc"):
assert isinstance(response, resources.IssueModel)
assert response.name == "name_value"
assert response.display_name == "display_name_value"
assert response.issue_count == 1201
assert response.state == resources.IssueModel.State.UNDEPLOYED


Expand Down Expand Up @@ -4429,6 +4431,7 @@ async def test_update_issue_model_async(
resources.IssueModel(
name="name_value",
display_name="display_name_value",
issue_count=1201,
state=resources.IssueModel.State.UNDEPLOYED,
)
)
Expand All @@ -4443,6 +4446,7 @@ async def test_update_issue_model_async(
assert isinstance(response, resources.IssueModel)
assert response.name == "name_value"
assert response.display_name == "display_name_value"
assert response.issue_count == 1201
assert response.state == resources.IssueModel.State.UNDEPLOYED


Expand Down Expand Up @@ -4635,6 +4639,7 @@ def test_get_issue_model(request_type, transport: str = "grpc"):
call.return_value = resources.IssueModel(
name="name_value",
display_name="display_name_value",
issue_count=1201,
state=resources.IssueModel.State.UNDEPLOYED,
)
response = client.get_issue_model(request)
Expand All @@ -4648,6 +4653,7 @@ def test_get_issue_model(request_type, transport: str = "grpc"):
assert isinstance(response, resources.IssueModel)
assert response.name == "name_value"
assert response.display_name == "display_name_value"
assert response.issue_count == 1201
assert response.state == resources.IssueModel.State.UNDEPLOYED


Expand Down Expand Up @@ -4688,6 +4694,7 @@ async def test_get_issue_model_async(
resources.IssueModel(
name="name_value",
display_name="display_name_value",
issue_count=1201,
state=resources.IssueModel.State.UNDEPLOYED,
)
)
Expand All @@ -4702,6 +4709,7 @@ async def test_get_issue_model_async(
assert isinstance(response, resources.IssueModel)
assert response.name == "name_value"
assert response.display_name == "display_name_value"
assert response.issue_count == 1201
assert response.state == resources.IssueModel.State.UNDEPLOYED


Expand Down

0 comments on commit 9e3af8b

Please sign in to comment.