Skip to content

Commit

Permalink
feat!: regenerate library based on dialogflow/v2 proto changes (#569)
Browse files Browse the repository at this point in the history
* sample-test should fail

* fix resource name

* lint

* test

* update copyright

* pick up v2/ proto change

* fix sample-test for proto change

* new resource name

* test

* test

* test

* test

* proper resource path

* all green now

* fix & gts lint

* remove createDocument test

* lint

Co-authored-by: Alexander Fenster <fenster@google.com>
  • Loading branch information
xiaozhenliu-gg5 and alexander-fenster authored Apr 6, 2020
1 parent 7459428 commit 0bcaf57
Show file tree
Hide file tree
Showing 35 changed files with 4,584 additions and 1,375 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-dialogflow/.jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2019 Google, LLC.',
copyright: 'Copyright 2020 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/dialogflow',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ message GetAgentRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
child_type: "dialogflow.googleapis.com/Agent"
}
];
}
Expand All @@ -323,19 +323,21 @@ message DeleteAgentRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
child_type: "dialogflow.googleapis.com/Agent"
}
];
}

// ============================================================================
// Requests and responses for custom methods.
// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
message SearchAgentsRequest {
// Required. The project to list agents from.
// Format: `projects/<Project ID or '-'>`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
child_type: "dialogflow.googleapis.com/Agent"
}
];

Expand Down Expand Up @@ -365,7 +367,7 @@ message TrainAgentRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
child_type: "dialogflow.googleapis.com/Agent"
}
];
}
Expand All @@ -377,7 +379,7 @@ message ExportAgentRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
child_type: "dialogflow.googleapis.com/Agent"
}
];

Expand Down Expand Up @@ -408,7 +410,7 @@ message ImportAgentRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
child_type: "dialogflow.googleapis.com/Agent"
}
];

Expand All @@ -430,7 +432,7 @@ message RestoreAgentRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
child_type: "dialogflow.googleapis.com/Agent"
}
];

Expand All @@ -452,7 +454,7 @@ message GetValidationResultRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
child_type: "dialogflow.googleapis.com/Agent"
}
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ message Context {
option (google.api.resource) = {
type: "dialogflow.googleapis.com/Context"
pattern: "projects/{project}/agent/sessions/{session}/contexts/{context}"
pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}"
};

// Required. The unique identifier of the context. Format:
Expand All @@ -156,15 +157,26 @@ message Context {
string name = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. The number of conversational query requests after which the
// context expires. If set to `0` (the default) the context expires
// context expires. The default is `0`. If set to `0`, the context expires
// immediately. Contexts expire automatically after 20 minutes if there
// are no matching queries.
int32 lifespan_count = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. The collection of parameters associated with this context.
// Refer to [this
// doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
// for syntax.
//
// Depending on your protocol or client library language, this is a
// map, associative array, symbol table, dictionary, or JSON object
// composed of a collection of (MapKey, MapValue) pairs:
//
// - MapKey type: string
// - MapKey value: parameter name
// - MapValue type:
// - If parameter's entity type is a composite entity: map
// - Else: string
// - MapValue value:
// - If parameter's entity type is a composite entity:
// map from composite entity property names to property values
// - Else: parameter value
google.protobuf.Struct parameters = 3 [(google.api.field_behavior) = OPTIONAL];
}

Expand All @@ -176,7 +188,12 @@ message ListContextsRequest {
// ID>/sessions/<Session ID>`.
// If `Environment ID` is not specified, we assume default 'draft'
// environment. If `User ID` is not specified, we assume default '-' user.
string parent = 1 [(google.api.field_behavior) = REQUIRED];
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "dialogflow.googleapis.com/Context"
}
];

// Optional. The maximum number of items to return in a single page. By
// default 100 and at most 1000.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,15 @@ message ListEntityTypesRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Agent"
child_type: "dialogflow.googleapis.com/EntityType"
}
];

// Optional. The language to list entity synonyms for. If not specified,
// the agent's default language is used.
// [Many
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
// are supported. Note: languages must be enabled in the agent before they can
// be used.
// Optional. The language used to access language-specific data.
// If not specified, the agent's default language is used.
// For more information, see
// [Multilingual intent and entity
// data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
string language_code = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. The maximum number of items to return in a single page. By
Expand Down Expand Up @@ -332,12 +331,11 @@ message GetEntityTypeRequest {
}
];

// Optional. The language to retrieve entity synonyms for. If not specified,
// the agent's default language is used.
// [Many
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
// are supported. Note: languages must be enabled in the agent before they can
// be used.
// Optional. The language used to access language-specific data.
// If not specified, the agent's default language is used.
// For more information, see
// [Multilingual intent and entity
// data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
string language_code = 2 [(google.api.field_behavior) = OPTIONAL];
}

Expand All @@ -348,19 +346,18 @@ message CreateEntityTypeRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Agent"
child_type: "dialogflow.googleapis.com/EntityType"
}
];

// Required. The entity type to create.
EntityType entity_type = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. The language of entity synonyms defined in `entity_type`. If not
// specified, the agent's default language is used.
// [Many
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
// are supported. Note: languages must be enabled in the agent before they can
// be used.
// Optional. The language used to access language-specific data.
// If not specified, the agent's default language is used.
// For more information, see
// [Multilingual intent and entity
// data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
string language_code = 3 [(google.api.field_behavior) = OPTIONAL];
}

Expand All @@ -369,12 +366,11 @@ message UpdateEntityTypeRequest {
// Required. The entity type to update.
EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. The language of entity synonyms defined in `entity_type`. If not
// specified, the agent's default language is used.
// [Many
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
// are supported. Note: languages must be enabled in the agent before they can
// be used.
// Optional. The language used to access language-specific data.
// If not specified, the agent's default language is used.
// For more information, see
// [Multilingual intent and entity
// data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
string language_code = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. The mask to control which fields get updated.
Expand All @@ -400,7 +396,7 @@ message BatchUpdateEntityTypesRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Agent"
child_type: "dialogflow.googleapis.com/EntityType"
}
];

Expand All @@ -421,12 +417,11 @@ message BatchUpdateEntityTypesRequest {
EntityTypeBatch entity_type_batch_inline = 3;
}

// Optional. The language of entity synonyms defined in `entity_types`. If not
// specified, the agent's default language is used.
// [Many
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
// are supported. Note: languages must be enabled in the agent before they can
// be used.
// Optional. The language used to access language-specific data.
// If not specified, the agent's default language is used.
// For more information, see
// [Multilingual intent and entity
// data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
string language_code = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. The mask to control which fields get updated.
Expand All @@ -446,7 +441,7 @@ message BatchDeleteEntityTypesRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Agent"
child_type: "dialogflow.googleapis.com/EntityType"
}
];

Expand All @@ -469,12 +464,11 @@ message BatchCreateEntitiesRequest {
// Required. The entities to create.
repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. The language of entity synonyms defined in `entities`. If not
// specified, the agent's default language is used.
// [Many
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
// are supported. Note: languages must be enabled in the agent before they can
// be used.
// Optional. The language used to access language-specific data.
// If not specified, the agent's default language is used.
// For more information, see
// [Multilingual intent and entity
// data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
string language_code = 3 [(google.api.field_behavior) = OPTIONAL];
}

Expand All @@ -492,12 +486,11 @@ message BatchUpdateEntitiesRequest {
// Required. The entities to update or create.
repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. The language of entity synonyms defined in `entities`. If not
// specified, the agent's default language is used.
// [Many
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
// are supported. Note: languages must be enabled in the agent before they can
// be used.
// Optional. The language used to access language-specific data.
// If not specified, the agent's default language is used.
// For more information, see
// [Multilingual intent and entity
// data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
string language_code = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. The mask to control which fields get updated.
Expand All @@ -520,12 +513,11 @@ message BatchDeleteEntitiesRequest {
// `projects/<Project ID>`.
repeated string entity_values = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. The language of entity synonyms defined in `entities`. If not
// specified, the agent's default language is used.
// [Many
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
// are supported. Note: languages must be enabled in the agent before they can
// be used.
// Optional. The language used to access language-specific data.
// If not specified, the agent's default language is used.
// For more information, see
// [Multilingual intent and entity
// data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
string language_code = 3 [(google.api.field_behavior) = OPTIONAL];
}

Expand Down
Loading

0 comments on commit 0bcaf57

Please sign in to comment.