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

Commit

Permalink
feat: added location-aware HTTP path binding for ListIntents (#557)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 373895026

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri May 14 17:14:27 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 0d68bbb80a7620b69aff5ab0b497c8a396e73558
Source-Link: googleapis/googleapis@0d68bbb

Co-authored-by: Neenu Shaji <Neenu1995@users.noreply.github.com>
  • Loading branch information
yoshi-automation and Neenu1995 committed May 25, 2021
1 parent bedc483 commit da0f279
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 72 deletions.
Expand Up @@ -178,7 +178,12 @@ public final OperationsClient getOperationsClient() {
* }</pre>
*
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
* ID&gt;/agent`.
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
* <p>Alternatively, you can specify the environment to list intents for. Format:
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
* `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
* will not be returned for non-draft environment.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListIntentsPagedResponse listIntents(AgentName parent) {
Expand All @@ -205,7 +210,12 @@ public final ListIntentsPagedResponse listIntents(AgentName parent) {
* }</pre>
*
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
* ID&gt;/agent`.
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
* <p>Alternatively, you can specify the environment to list intents for. Format:
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
* `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
* will not be returned for non-draft environment.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListIntentsPagedResponse listIntents(String parent) {
Expand All @@ -230,7 +240,12 @@ public final ListIntentsPagedResponse listIntents(String parent) {
* }</pre>
*
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
* ID&gt;/agent`.
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
* <p>Alternatively, you can specify the environment to list intents for. Format:
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
* `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
* will not be returned for non-draft environment.
* @param languageCode 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
Expand Down Expand Up @@ -263,7 +278,12 @@ public final ListIntentsPagedResponse listIntents(AgentName parent, String langu
* }</pre>
*
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
* ID&gt;/agent`.
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
* <p>Alternatively, you can specify the environment to list intents for. Format:
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
* `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
* will not be returned for non-draft environment.
* @param languageCode 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
Expand Down
Expand Up @@ -443,64 +443,66 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ogflow.v2.IntentB\003\340A\002\"B\n\013IntentBatch\0223\n\007"
+ "intents\030\001 \003(\0132\".google.cloud.dialogflow."
+ "v2.Intent*?\n\nIntentView\022\033\n\027INTENT_VIEW_U"
+ "NSPECIFIED\020\000\022\024\n\020INTENT_VIEW_FULL\020\0012\257\020\n\007I"
+ "ntents\022\254\002\n\013ListIntents\022..google.cloud.di"
+ "NSPECIFIED\020\000\022\024\n\020INTENT_VIEW_FULL\020\0012\363\020\n\007I"
+ "ntents\022\360\002\n\013ListIntents\022..google.cloud.di"
+ "alogflow.v2.ListIntentsRequest\032/.google."
+ "cloud.dialogflow.v2.ListIntentsResponse\""
+ "\273\001\202\323\344\223\002\224\001\022%/v2/{parent=projects/*/agent}"
+ "\377\001\202\323\344\223\002\330\001\022%/v2/{parent=projects/*/agent}"
+ "/intentsZ3\0221/v2/{parent=projects/*/locat"
+ "ions/*/agent}/intentsZ6\0224/v2/{parent=pro"
+ "jects/*/agent/environments/*}/intents\332A\006"
+ "parent\332A\024parent,language_code\022\335\001\n\tGetInt"
+ "ent\022,.google.cloud.dialogflow.v2.GetInte"
+ "ntRequest\032\".google.cloud.dialogflow.v2.I"
+ "ntent\"~\202\323\344\223\002\\\022%/v2/{name=projects/*/agen"
+ "t/intents/*}Z3\0221/v2/{name=projects/*/loc"
+ "ations/*/agent/intents/*}\332A\004name\332A\022name,"
+ "language_code\022\206\002\n\014CreateIntent\022/.google."
+ "cloud.dialogflow.v2.CreateIntentRequest\032"
+ "\".google.cloud.dialogflow.v2.Intent\"\240\001\202\323"
+ "\344\223\002l\"%/v2/{parent=projects/*/agent}/inte"
+ "nts:\006intentZ;\"1/v2/{parent=projects/*/lo"
+ "cations/*/agent}/intents:\006intent\332A\rparen"
+ "t,intent\332A\033parent,intent,language_code\022\240"
+ "\002\n\014UpdateIntent\022/.google.cloud.dialogflo"
+ "w.v2.UpdateIntentRequest\032\".google.cloud."
+ "dialogflow.v2.Intent\"\272\001\202\323\344\223\002z2,/v2/{inte"
+ "nt.name=projects/*/agent/intents/*}:\006int"
+ "entZB28/v2/{intent.name=projects/*/locat"
+ "ions/*/agent/intents/*}:\006intent\332A\024intent"
+ ",language_code\332A intent,language_code,up"
+ "date_mask\022\302\001\n\014DeleteIntent\022/.google.clou"
+ "d.dialogflow.v2.DeleteIntentRequest\032\026.go"
+ "ogle.protobuf.Empty\"i\202\323\344\223\002\\*%/v2/{name=p"
+ "rojects/*/agent/intents/*}Z3*1/v2/{name="
+ "projects/*/locations/*/agent/intents/*}\332"
+ "A\004name\022\366\002\n\022BatchUpdateIntents\0225.google.c"
+ "loud.dialogflow.v2.BatchUpdateIntentsReq"
+ "uest\032\035.google.longrunning.Operation\"\211\002\202\323"
+ "\344\223\002z\"1/v2/{parent=projects/*/agent}/inte"
+ "nts:batchUpdate:\001*ZB\"=/v2/{parent=projec"
+ "ts/*/locations/*/agent}/intents:batchUpd"
+ "ate:\001*\332A\027parent,intent_batch_uri\332A\032paren"
+ "t,intent_batch_inline\312AO\n5google.cloud.d"
+ "ialogflow.v2.BatchUpdateIntentsResponse\022"
+ "\026google.protobuf.Struct\022\260\002\n\022BatchDeleteI"
+ "ntents\0225.google.cloud.dialogflow.v2.Batc"
+ "hDeleteIntentsRequest\032\035.google.longrunni"
+ "ng.Operation\"\303\001\202\323\344\223\002z\"1/v2/{parent=proje"
+ "cts/*/agent}/intents:batchDelete:\001*ZB\"=/"
+ "v2/{parent=projects/*/locations/*/agent}"
+ "/intents:batchDelete:\001*\332A\016parent,intents"
+ "\312A/\n\025google.protobuf.Empty\022\026google.proto"
+ "buf.Struct\032x\312A\031dialogflow.googleapis.com"
+ "\322AYhttps://www.googleapis.com/auth/cloud"
+ "-platform,https://www.googleapis.com/aut"
+ "h/dialogflowB\232\001\n\036com.google.cloud.dialog"
+ "flow.v2B\013IntentProtoP\001ZDgoogle.golang.or"
+ "g/genproto/googleapis/cloud/dialogflow/v"
+ "2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dial"
+ "ogflow.V2b\006proto3"
+ "jects/*/agent/environments/*}/intentsZB\022"
+ "@/v2/{parent=projects/*/locations/*/agen"
+ "t/environments/*}/intents\332A\006parent\332A\024par"
+ "ent,language_code\022\335\001\n\tGetIntent\022,.google"
+ ".cloud.dialogflow.v2.GetIntentRequest\032\"."
+ "google.cloud.dialogflow.v2.Intent\"~\202\323\344\223\002"
+ "\\\022%/v2/{name=projects/*/agent/intents/*}"
+ "Z3\0221/v2/{name=projects/*/locations/*/age"
+ "nt/intents/*}\332A\004name\332A\022name,language_cod"
+ "e\022\206\002\n\014CreateIntent\022/.google.cloud.dialog"
+ "flow.v2.CreateIntentRequest\032\".google.clo"
+ "ud.dialogflow.v2.Intent\"\240\001\202\323\344\223\002l\"%/v2/{p"
+ "arent=projects/*/agent}/intents:\006intentZ"
+ ";\"1/v2/{parent=projects/*/locations/*/ag"
+ "ent}/intents:\006intent\332A\rparent,intent\332A\033p"
+ "arent,intent,language_code\022\240\002\n\014UpdateInt"
+ "ent\022/.google.cloud.dialogflow.v2.UpdateI"
+ "ntentRequest\032\".google.cloud.dialogflow.v"
+ "2.Intent\"\272\001\202\323\344\223\002z2,/v2/{intent.name=proj"
+ "ects/*/agent/intents/*}:\006intentZB28/v2/{"
+ "intent.name=projects/*/locations/*/agent"
+ "/intents/*}:\006intent\332A\024intent,language_co"
+ "de\332A intent,language_code,update_mask\022\302\001"
+ "\n\014DeleteIntent\022/.google.cloud.dialogflow"
+ ".v2.DeleteIntentRequest\032\026.google.protobu"
+ "f.Empty\"i\202\323\344\223\002\\*%/v2/{name=projects/*/ag"
+ "ent/intents/*}Z3*1/v2/{name=projects/*/l"
+ "ocations/*/agent/intents/*}\332A\004name\022\366\002\n\022B"
+ "atchUpdateIntents\0225.google.cloud.dialogf"
+ "low.v2.BatchUpdateIntentsRequest\032\035.googl"
+ "e.longrunning.Operation\"\211\002\202\323\344\223\002z\"1/v2/{p"
+ "arent=projects/*/agent}/intents:batchUpd"
+ "ate:\001*ZB\"=/v2/{parent=projects/*/locatio"
+ "ns/*/agent}/intents:batchUpdate:\001*\332A\027par"
+ "ent,intent_batch_uri\332A\032parent,intent_bat"
+ "ch_inline\312AO\n5google.cloud.dialogflow.v2"
+ ".BatchUpdateIntentsResponse\022\026google.prot"
+ "obuf.Struct\022\260\002\n\022BatchDeleteIntents\0225.goo"
+ "gle.cloud.dialogflow.v2.BatchDeleteInten"
+ "tsRequest\032\035.google.longrunning.Operation"
+ "\"\303\001\202\323\344\223\002z\"1/v2/{parent=projects/*/agent}"
+ "/intents:batchDelete:\001*ZB\"=/v2/{parent=p"
+ "rojects/*/locations/*/agent}/intents:bat"
+ "chDelete:\001*\332A\016parent,intents\312A/\n\025google."
+ "protobuf.Empty\022\026google.protobuf.Struct\032x"
+ "\312A\031dialogflow.googleapis.com\322AYhttps://w"
+ "ww.googleapis.com/auth/cloud-platform,ht"
+ "tps://www.googleapis.com/auth/dialogflow"
+ "B\232\001\n\036com.google.cloud.dialogflow.v2B\013Int"
+ "entProtoP\001ZDgoogle.golang.org/genproto/g"
+ "oogleapis/cloud/dialogflow/v2;dialogflow"
+ "\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2b\006p"
+ "roto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand Down
Expand Up @@ -147,7 +147,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
* <pre>
* Required. The agent to list all intents from.
* Format: `projects/&lt;Project ID&gt;/agent`.
* Format: `projects/&lt;Project ID&gt;/agent` or `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agent`.
* Alternatively, you can specify the environment to list intents for.
* Format: `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;`
* or `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`.
* Note: training phrases of the intents will not be returned for non-draft
* environment.
* </pre>
*
* <code>
Expand All @@ -173,7 +180,14 @@ public java.lang.String getParent() {
*
* <pre>
* Required. The agent to list all intents from.
* Format: `projects/&lt;Project ID&gt;/agent`.
* Format: `projects/&lt;Project ID&gt;/agent` or `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agent`.
* Alternatively, you can specify the environment to list intents for.
* Format: `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;`
* or `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`.
* Note: training phrases of the intents will not be returned for non-draft
* environment.
* </pre>
*
* <code>
Expand Down Expand Up @@ -748,7 +762,14 @@ public Builder mergeFrom(
*
* <pre>
* Required. The agent to list all intents from.
* Format: `projects/&lt;Project ID&gt;/agent`.
* Format: `projects/&lt;Project ID&gt;/agent` or `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agent`.
* Alternatively, you can specify the environment to list intents for.
* Format: `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;`
* or `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`.
* Note: training phrases of the intents will not be returned for non-draft
* environment.
* </pre>
*
* <code>
Expand All @@ -773,7 +794,14 @@ public java.lang.String getParent() {
*
* <pre>
* Required. The agent to list all intents from.
* Format: `projects/&lt;Project ID&gt;/agent`.
* Format: `projects/&lt;Project ID&gt;/agent` or `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agent`.
* Alternatively, you can specify the environment to list intents for.
* Format: `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;`
* or `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`.
* Note: training phrases of the intents will not be returned for non-draft
* environment.
* </pre>
*
* <code>
Expand All @@ -798,7 +826,14 @@ public com.google.protobuf.ByteString getParentBytes() {
*
* <pre>
* Required. The agent to list all intents from.
* Format: `projects/&lt;Project ID&gt;/agent`.
* Format: `projects/&lt;Project ID&gt;/agent` or `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agent`.
* Alternatively, you can specify the environment to list intents for.
* Format: `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;`
* or `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`.
* Note: training phrases of the intents will not be returned for non-draft
* environment.
* </pre>
*
* <code>
Expand All @@ -822,7 +857,14 @@ public Builder setParent(java.lang.String value) {
*
* <pre>
* Required. The agent to list all intents from.
* Format: `projects/&lt;Project ID&gt;/agent`.
* Format: `projects/&lt;Project ID&gt;/agent` or `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agent`.
* Alternatively, you can specify the environment to list intents for.
* Format: `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;`
* or `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`.
* Note: training phrases of the intents will not be returned for non-draft
* environment.
* </pre>
*
* <code>
Expand All @@ -842,7 +884,14 @@ public Builder clearParent() {
*
* <pre>
* Required. The agent to list all intents from.
* Format: `projects/&lt;Project ID&gt;/agent`.
* Format: `projects/&lt;Project ID&gt;/agent` or `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agent`.
* Alternatively, you can specify the environment to list intents for.
* Format: `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;`
* or `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`.
* Note: training phrases of the intents will not be returned for non-draft
* environment.
* </pre>
*
* <code>
Expand Down
Expand Up @@ -28,7 +28,14 @@ public interface ListIntentsRequestOrBuilder
*
* <pre>
* Required. The agent to list all intents from.
* Format: `projects/&lt;Project ID&gt;/agent`.
* Format: `projects/&lt;Project ID&gt;/agent` or `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agent`.
* Alternatively, you can specify the environment to list intents for.
* Format: `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;`
* or `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`.
* Note: training phrases of the intents will not be returned for non-draft
* environment.
* </pre>
*
* <code>
Expand All @@ -43,7 +50,14 @@ public interface ListIntentsRequestOrBuilder
*
* <pre>
* Required. The agent to list all intents from.
* Format: `projects/&lt;Project ID&gt;/agent`.
* Format: `projects/&lt;Project ID&gt;/agent` or `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agent`.
* Alternatively, you can specify the environment to list intents for.
* Format: `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;`
* or `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`.
* Note: training phrases of the intents will not be returned for non-draft
* environment.
* </pre>
*
* <code>
Expand Down
Expand Up @@ -53,6 +53,9 @@ service Intents {
additional_bindings {
get: "/v2/{parent=projects/*/agent/environments/*}/intents"
}
additional_bindings {
get: "/v2/{parent=projects/*/locations/*/agent/environments/*}/intents"
}
};
option (google.api.method_signature) = "parent";
option (google.api.method_signature) = "parent,language_code";
Expand Down Expand Up @@ -877,7 +880,15 @@ message Intent {
// The request message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
message ListIntentsRequest {
// Required. The agent to list all intents from.
// Format: `projects/<Project ID>/agent`.
// Format: `projects/<Project ID>/agent` or `projects/<Project
// ID>/locations/<Location ID>/agent`.
//
// Alternatively, you can specify the environment to list intents for.
// Format: `projects/<Project ID>/agent/environments/<Environment ID>`
// or `projects/<Project ID>/locations/<Location
// ID>/agent/environments/<Environment ID>`.
// Note: training phrases of the intents will not be returned for non-draft
// environment.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down
8 changes: 4 additions & 4 deletions synth.metadata
Expand Up @@ -11,16 +11,16 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "162641cfe5573c648df679a6dd30385650a08704",
"internalRef": "373400747"
"sha": "0d68bbb80a7620b69aff5ab0b497c8a396e73558",
"internalRef": "373895026"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "162641cfe5573c648df679a6dd30385650a08704",
"internalRef": "373400747"
"sha": "0d68bbb80a7620b69aff5ab0b497c8a396e73558",
"internalRef": "373895026"
}
},
{
Expand Down

0 comments on commit da0f279

Please sign in to comment.