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

Commit

Permalink
feat: new API for the View resource (#89)
Browse files Browse the repository at this point in the history
* feat: new API for the View resource

PiperOrigin-RevId: 420129820

Source-Link: googleapis/googleapis@c203eea

Source-Link: https://github.com/googleapis/googleapis-gen/commit/ddaafab91678bc0ff2aec1be577a6000d4393ac7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGRhYWZhYjkxNjc4YmMwZmYyYWVjMWJlNTc3YTYwMDBkNDM5M2FjNyJ9

* 🦉 Updates from OwlBot

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>
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 20, 2022
1 parent 33c1f02 commit 8aa89e5
Show file tree
Hide file tree
Showing 48 changed files with 5,383 additions and 639 deletions.
4 changes: 2 additions & 2 deletions .jsdoc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@ module.exports = {
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2021 Google LLC',
copyright: 'Copyright 2022 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/contact-center-insights',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,48 @@ service ContactCenterInsights {
};
option (google.api.method_signature) = "settings,update_mask";
}

// Creates a view.
rpc CreateView(CreateViewRequest) returns (View) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/views"
body: "view"
};
option (google.api.method_signature) = "parent,view";
}

// Gets a view.
rpc GetView(GetViewRequest) returns (View) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/views/*}"
};
option (google.api.method_signature) = "name";
}

// Lists views.
rpc ListViews(ListViewsRequest) returns (ListViewsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/views"
};
option (google.api.method_signature) = "parent";
}

// Updates a view.
rpc UpdateView(UpdateViewRequest) returns (View) {
option (google.api.http) = {
patch: "/v1/{view.name=projects/*/locations/*/views/*}"
body: "view"
};
option (google.api.method_signature) = "view,update_mask";
}

// Deletes a view.
rpc DeleteView(DeleteViewRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/views/*}"
};
option (google.api.method_signature) = "name";
}
}

// The request for calculating conversation statistics.
Expand All @@ -334,10 +376,11 @@ enum ConversationView {
// ListConversationsRequest.
CONVERSATION_VIEW_UNSPECIFIED = 0;

// Transcript field is not populated in the response.
// Transcript field is not populated in the response for Insights
// conversation.
BASIC = 1;

// All fields are populated.
// All fields are populated for Insights conversation.
FULL = 2;
}

Expand Down Expand Up @@ -968,3 +1011,83 @@ message UpdateSettingsRequest {
// Required. The list of fields to be updated.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}

// The request to create a view.
message CreateViewRequest {
// Required. The parent resource of the view. Required. The location to create
// a view for.
// Format: `projects/<Project ID>/locations/<Location ID>` or
// `projects/<Project Number>/locations/<Location ID>`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];

// Required. The view resource to create.
View view = 2 [(google.api.field_behavior) = REQUIRED];
}

// The request to get a view.
message GetViewRequest {
// Required. The name of the view to get.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "contactcenterinsights.googleapis.com/View"
}
];
}

// The request to list views.
message ListViewsRequest {
// Required. The parent resource of the views.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];

// The maximum number of views to return in the response. If this
// value is zero, the service will select a default size. A call may return
// fewer objects than requested. A non-empty `next_page_token` in the response
// indicates that more data is available.
int32 page_size = 2;

// The value returned by the last `ListViewsResponse`; indicates
// that this is a continuation of a prior `ListViews` call and
// the system should return the next page of data.
string page_token = 3;
}

// The response of listing views.
message ListViewsResponse {
// The views that match the request.
repeated View views = 1;

// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
string next_page_token = 2;
}

// The request to update a view.
message UpdateViewRequest {
// Required. The new view.
View view = 1 [(google.api.field_behavior) = REQUIRED];

// The list of fields to be updated.
google.protobuf.FieldMask update_mask = 2;
}

// The request to delete a view.
message DeleteViewRequest {
// Required. The name of the view to delete.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "contactcenterinsights.googleapis.com/View"
}
];
}
34 changes: 32 additions & 2 deletions protos/google/cloud/contactcenterinsights/v1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.ContactCenterInsights.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1;contactcenterinsights";
Expand Down Expand Up @@ -201,6 +200,9 @@ message Conversation {
// Dialogflow intent, format:
// projects/{project}/agent/{agent}/intents/{intent}
map<string, DialogflowIntent> dialogflow_intents = 18 [(google.api.field_behavior) = OUTPUT_ONLY];

// Obfuscated user ID which the customer sent to us.
string obfuscated_user_id = 21;
}

// The analysis resource.
Expand Down Expand Up @@ -298,7 +300,10 @@ message AnalysisResult {
// Issue Modeling result on a conversation.
message IssueModelResult {
// Issue model that generates the result.
string issue_model = 1;
// Format: projects/{project}/locations/{location}/issueModels/{issue_model}
string issue_model = 1 [(google.api.resource_reference) = {
type: "contactcenterinsights.googleapis.com/IssueModel"
}];

// All the matched issues.
repeated IssueAssignment issues = 2;
Expand Down Expand Up @@ -1084,3 +1089,28 @@ message ConversationParticipant {
// The role of the participant.
Role role = 2;
}

// The View resource.
message View {
option (google.api.resource) = {
type: "contactcenterinsights.googleapis.com/View"
pattern: "projects/{project}/locations/{location}/views/{view}"
};

// Immutable. The resource name of the view.
// Format:
// projects/{project}/locations/{location}/views/{view}
string name = 1 [(google.api.field_behavior) = IMMUTABLE];

// The human-readable display name of the view.
string display_name = 2;

// Output only. The time at which this view was created.
google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The most recent time at which the view was updated.
google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// String with specific view properties.
string value = 5;
}
Loading

0 comments on commit 8aa89e5

Please sign in to comment.