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

feat: remove feature flag disable_issue_modeling #78

Merged
merged 2 commits into from Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -39,17 +39,15 @@ option ruby_package = "Google::Cloud::ContactCenterInsights::V1";
// An API that lets users analyze and explore their business conversation data.
service ContactCenterInsights {
option (google.api.default_host) = "contactcenterinsights.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";

// Creates a conversation.
rpc CreateConversation(CreateConversationRequest) returns (Conversation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/conversations"
body: "conversation"
};
option (google.api.method_signature) =
"parent,conversation,conversation_id";
option (google.api.method_signature) = "parent,conversation,conversation_id";
}

// Updates a conversation.
Expand All @@ -70,17 +68,15 @@ service ContactCenterInsights {
}

// Lists conversations.
rpc ListConversations(ListConversationsRequest)
returns (ListConversationsResponse) {
rpc ListConversations(ListConversationsRequest) returns (ListConversationsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/conversations"
};
option (google.api.method_signature) = "parent";
}

// Deletes a conversation.
rpc DeleteConversation(DeleteConversationRequest)
returns (google.protobuf.Empty) {
rpc DeleteConversation(DeleteConversationRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/conversations/*}"
};
Expand All @@ -89,8 +85,7 @@ service ContactCenterInsights {

// Creates an analysis. The long running operation is done when the analysis
// has completed.
rpc CreateAnalysis(CreateAnalysisRequest)
returns (google.longrunning.Operation) {
rpc CreateAnalysis(CreateAnalysisRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*/conversations/*}/analyses"
body: "analysis"
Expand Down Expand Up @@ -127,8 +122,7 @@ service ContactCenterInsights {
}

// Export insights data to a destination defined in the request body.
rpc ExportInsightsData(ExportInsightsDataRequest)
returns (google.longrunning.Operation) {
rpc ExportInsightsData(ExportInsightsDataRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/insightsdata:export"
body: "*"
Expand All @@ -141,8 +135,7 @@ service ContactCenterInsights {
}

// Creates an issue model.
rpc CreateIssueModel(CreateIssueModelRequest)
returns (google.longrunning.Operation) {
rpc CreateIssueModel(CreateIssueModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/issueModels"
body: "issue_model"
Expand Down Expand Up @@ -172,17 +165,15 @@ service ContactCenterInsights {
}

// Lists issue models.
rpc ListIssueModels(ListIssueModelsRequest)
returns (ListIssueModelsResponse) {
rpc ListIssueModels(ListIssueModelsRequest) returns (ListIssueModelsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/issueModels"
};
option (google.api.method_signature) = "parent";
}

// Deletes an issue model.
rpc DeleteIssueModel(DeleteIssueModelRequest)
returns (google.longrunning.Operation) {
rpc DeleteIssueModel(DeleteIssueModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/issueModels/*}"
};
Expand All @@ -195,8 +186,7 @@ service ContactCenterInsights {

// Deploys an issue model. Returns an error if a model is already deployed.
// An issue model can only be used in analysis after it has been deployed.
rpc DeployIssueModel(DeployIssueModelRequest)
returns (google.longrunning.Operation) {
rpc DeployIssueModel(DeployIssueModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/issueModels/*}:deploy"
body: "*"
Expand All @@ -210,8 +200,7 @@ service ContactCenterInsights {

// Undeploys an issue model.
// An issue model can not be used in analysis after it has been undeployed.
rpc UndeployIssueModel(UndeployIssueModelRequest)
returns (google.longrunning.Operation) {
rpc UndeployIssueModel(UndeployIssueModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/issueModels/*}:undeploy"
body: "*"
Expand Down Expand Up @@ -249,8 +238,7 @@ service ContactCenterInsights {
}

// Gets an issue model's statistics.
rpc CalculateIssueModelStats(CalculateIssueModelStatsRequest)
returns (CalculateIssueModelStatsResponse) {
rpc CalculateIssueModelStats(CalculateIssueModelStatsRequest) returns (CalculateIssueModelStatsResponse) {
option (google.api.http) = {
get: "/v1/{issue_model=projects/*/locations/*/issueModels/*}:calculateIssueModelStats"
};
Expand All @@ -275,17 +263,15 @@ service ContactCenterInsights {
}

// Lists phrase matchers.
rpc ListPhraseMatchers(ListPhraseMatchersRequest)
returns (ListPhraseMatchersResponse) {
rpc ListPhraseMatchers(ListPhraseMatchersRequest) returns (ListPhraseMatchersResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/phraseMatchers"
};
option (google.api.method_signature) = "parent";
}

// Deletes a phrase matcher.
rpc DeletePhraseMatcher(DeletePhraseMatcherRequest)
returns (google.protobuf.Empty) {
rpc DeletePhraseMatcher(DeletePhraseMatcherRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/phraseMatchers/*}"
};
Expand Down Expand Up @@ -397,14 +383,13 @@ message CalculateStatsResponse {

// A map associating each issue resource name with its respective number of
// matches in the set of conversations. Key has the format:
// `projects/<Project ID>/locations/<Location ID>/issueModels/<Issue Model
// ID>/issues/<Issue ID>`
// `projects/<Project-ID>/locations/<Location-ID>/issueModels/<Issue-Model-ID>/issues/<Issue-ID>`
// Deprecated, use `issue_matches_stats` field instead.
map<string, int32> issue_matches = 6 [deprecated = true];

// A map associating each issue resource name with its respective number of
// matches in the set of conversations. Key has the format:
// `projects/<ProjectID>/locations/<LocationID>/issueModels/<IssueModelID>/issues/<IssueID>`
// `projects/<Project-ID>/locations/<Location-ID>/issueModels/<Issue-Model-ID>/issues/<Issue-ID>`
map<string, IssueModelLabelStats.IssueStats> issue_matches_stats = 8;

// A time series representing the count of conversations created over time
Expand All @@ -415,12 +400,10 @@ message CalculateStatsResponse {
// Metadata for a create analysis operation.
message CreateAnalysisOperationMetadata {
// Output only. The time the operation was created.
google.protobuf.Timestamp create_time = 1
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The time the operation finished running.
google.protobuf.Timestamp end_time = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The Conversation that this Analysis Operation belongs to.
string conversation = 3 [
Expand Down Expand Up @@ -448,8 +431,8 @@ message CreateConversationRequest {
// component of the conversation's resource name. If no ID is specified, a
// server-generated ID will be used.
//
// This value should be 4-32 characters and must match the regular
// expression /^[a-z0-9-]{4,32}$/. Valid characters are /[a-z][0-9]-/
// This value should be 4-64 characters and must match the regular
// expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`
string conversation_id = 3;
}

Expand Down Expand Up @@ -613,9 +596,9 @@ message ExportInsightsDataRequest {
// the resource project will be used.
string project_id = 3;

// Required. The name of the BigQuery dataset that the snapshot result
// should be exported to. If this dataset does not exist, the export call
// returns an INVALID_ARGUMENT error.
// Required. The name of the BigQuery dataset that the snapshot result should be
// exported to. If this dataset does not exist, the export call returns an
// INVALID_ARGUMENT error.
string dataset = 1 [(google.api.field_behavior) = REQUIRED];

// The BigQuery table name to which the insights data should be written.
Expand Down Expand Up @@ -651,12 +634,10 @@ message ExportInsightsDataRequest {
// Metadata for an export insights operation.
message ExportInsightsDataMetadata {
// Output only. The time the operation was created.
google.protobuf.Timestamp create_time = 1
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The time the operation finished running.
google.protobuf.Timestamp end_time = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// The original request for export.
ExportInsightsDataRequest request = 3;
Expand All @@ -667,7 +648,9 @@ message ExportInsightsDataMetadata {
}

// Response for an export insights operation.
message ExportInsightsDataResponse {}
message ExportInsightsDataResponse {

}

// The request to create an issue model.
message CreateIssueModelRequest {
Expand All @@ -686,12 +669,10 @@ message CreateIssueModelRequest {
// Metadata for creating an issue model.
message CreateIssueModelMetadata {
// Output only. The time the operation was created.
google.protobuf.Timestamp create_time = 1
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The time the operation finished running.
google.protobuf.Timestamp end_time = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// The original request for creation.
CreateIssueModelRequest request = 3;
Expand Down Expand Up @@ -748,12 +729,10 @@ message DeleteIssueModelRequest {
// Metadata for deleting an issue model.
message DeleteIssueModelMetadata {
// Output only. The time the operation was created.
google.protobuf.Timestamp create_time = 1
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The time the operation finished running.
google.protobuf.Timestamp end_time = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// The original request for deletion.
DeleteIssueModelRequest request = 3;
Expand All @@ -771,17 +750,17 @@ message DeployIssueModelRequest {
}

// The response to deploy an issue model.
message DeployIssueModelResponse {}
message DeployIssueModelResponse {

}

// Metadata for deploying an issue model.
message DeployIssueModelMetadata {
// Output only. The time the operation was created.
google.protobuf.Timestamp create_time = 1
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The time the operation finished running.
google.protobuf.Timestamp end_time = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// The original request for deployment.
DeployIssueModelRequest request = 3;
Expand All @@ -799,17 +778,17 @@ message UndeployIssueModelRequest {
}

// The response to undeploy an issue model.
message UndeployIssueModelResponse {}
message UndeployIssueModelResponse {

}

// Metadata for undeploying an issue model.
message UndeployIssueModelMetadata {
// Output only. The time the operation was created.
google.protobuf.Timestamp create_time = 1
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The time the operation finished running.
google.protobuf.Timestamp end_time = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// The original request for undeployment.
UndeployIssueModelRequest request = 3;
Expand Down Expand Up @@ -872,10 +851,10 @@ message CalculateIssueModelStatsResponse {

// Request to create a phrase matcher.
message CreatePhraseMatcherRequest {
// Required. The parent resource of the phrase matcher. Required. The location
// to create a phrase matcher for. Format: `projects/<Project
// ID>/locations/<Location ID>` or `projects/<Project
// Number>/locations/<Location ID>`
// Required. The parent resource of the phrase matcher. Required. The location to create
// a phrase matcher 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) = {
Expand Down Expand Up @@ -971,6 +950,5 @@ message UpdateSettingsRequest {
Settings settings = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The list of fields to be updated.
google.protobuf.FieldMask update_mask = 2
[(google.api.field_behavior) = REQUIRED];
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}
Expand Up @@ -31,8 +31,8 @@ function main(parent, conversation) {
* A unique ID for the new conversation. This ID will become the final
* component of the conversation's resource name. If no ID is specified, a
* server-generated ID will be used.
* This value should be 4-32 characters and must match the regular
* expression /^[a-z0-9-]{4,32}$/. Valid characters are /[a-z][0-9]-/
* This value should be 4-64 characters and must match the regular
* expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`
*/
// const conversationId = 'abc123'

Expand Down
Expand Up @@ -20,10 +20,10 @@ function main(parent, phraseMatcher) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource of the phrase matcher. Required. The location
* to create a phrase matcher for. Format: `projects/<Project
* ID>/locations/<Location ID>` or `projects/<Project
* Number>/locations/<Location ID>`
* Required. The parent resource of the phrase matcher. Required. The location to create
* a phrase matcher for.
* Format: `projects/<Project ID>/locations/<Location ID>` or
* `projects/<Project Number>/locations/<Location ID>`
*/
// const parent = 'abc123'
/**
Expand Down
12 changes: 6 additions & 6 deletions src/v1/contact_center_insights_client.ts
Expand Up @@ -472,8 +472,8 @@ export class ContactCenterInsightsClient {
* component of the conversation's resource name. If no ID is specified, a
* server-generated ID will be used.
*
* This value should be 4-32 characters and must match the regular
* expression /^{@link 0-9|a-z0-9-]{4,32}$/. Valid characters are /[a-z}-/
* This value should be 4-64 characters and must match the regular
* expression `^{@link 0-9|a-z0-9-]{4,64}$`. Valid characters are `[a-z}-`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
Expand Down Expand Up @@ -1744,10 +1744,10 @@ export class ContactCenterInsightsClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent resource of the phrase matcher. Required. The location
* to create a phrase matcher for. Format: `projects/<Project
* ID>/locations/<Location ID>` or `projects/<Project
* Number>/locations/<Location ID>`
* Required. The parent resource of the phrase matcher. Required. The location to create
* a phrase matcher for.
* Format: `projects/<Project ID>/locations/<Location ID>` or
* `projects/<Project Number>/locations/<Location ID>`
* @param {google.cloud.contactcenterinsights.v1.PhraseMatcher} request.phraseMatcher
* Required. The phrase matcher resource to create.
* @param {object} [options]
Expand Down