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

Commit 5a337c9

Browse files
yoshi-automationchingor13
authored andcommitted
feat: adds Subtitle to Intent (#6)
1 parent c638c42 commit 5a337c9

15 files changed

Lines changed: 820 additions & 412 deletions

File tree

.kokoro/release/drop.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ env_vars: {
44
key: "TRAMPOLINE_BUILD_FILE"
55
value: "github/java-dialogflow/.kokoro/release/drop.sh"
66
}
7-
8-
# Download staging properties file.
9-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-dialogflow"

.kokoro/release/promote.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@ env_vars: {
44
key: "TRAMPOLINE_BUILD_FILE"
55
value: "github/java-dialogflow/.kokoro/release/promote.sh"
66
}
7-
8-
# Download staging properties file.
9-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-dialogflow"
10-

proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Intent.java

Lines changed: 206 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19941,6 +19941,27 @@ public interface ListSelectOrBuilder
1994119941
*/
1994219942
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder getItemsOrBuilder(
1994319943
int index);
19944+
19945+
/**
19946+
*
19947+
*
19948+
* <pre>
19949+
* Optional. Subtitle of the list.
19950+
* </pre>
19951+
*
19952+
* <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
19953+
*/
19954+
java.lang.String getSubtitle();
19955+
/**
19956+
*
19957+
*
19958+
* <pre>
19959+
* Optional. Subtitle of the list.
19960+
* </pre>
19961+
*
19962+
* <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
19963+
*/
19964+
com.google.protobuf.ByteString getSubtitleBytes();
1994419965
}
1994519966
/**
1994619967
*
@@ -19964,6 +19985,7 @@ private ListSelect(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
1996419985
private ListSelect() {
1996519986
title_ = "";
1996619987
items_ = java.util.Collections.emptyList();
19988+
subtitle_ = "";
1996719989
}
1996819990

1996919991
@java.lang.Override
@@ -20011,6 +20033,13 @@ private ListSelect(
2001120033
extensionRegistry));
2001220034
break;
2001320035
}
20036+
case 26:
20037+
{
20038+
java.lang.String s = input.readStringRequireUtf8();
20039+
20040+
subtitle_ = s;
20041+
break;
20042+
}
2001420043
default:
2001520044
{
2001620045
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -21660,6 +21689,49 @@ public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item getItems(in
2166021689
return items_.get(index);
2166121690
}
2166221691

21692+
public static final int SUBTITLE_FIELD_NUMBER = 3;
21693+
private volatile java.lang.Object subtitle_;
21694+
/**
21695+
*
21696+
*
21697+
* <pre>
21698+
* Optional. Subtitle of the list.
21699+
* </pre>
21700+
*
21701+
* <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
21702+
*/
21703+
public java.lang.String getSubtitle() {
21704+
java.lang.Object ref = subtitle_;
21705+
if (ref instanceof java.lang.String) {
21706+
return (java.lang.String) ref;
21707+
} else {
21708+
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
21709+
java.lang.String s = bs.toStringUtf8();
21710+
subtitle_ = s;
21711+
return s;
21712+
}
21713+
}
21714+
/**
21715+
*
21716+
*
21717+
* <pre>
21718+
* Optional. Subtitle of the list.
21719+
* </pre>
21720+
*
21721+
* <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
21722+
*/
21723+
public com.google.protobuf.ByteString getSubtitleBytes() {
21724+
java.lang.Object ref = subtitle_;
21725+
if (ref instanceof java.lang.String) {
21726+
com.google.protobuf.ByteString b =
21727+
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
21728+
subtitle_ = b;
21729+
return b;
21730+
} else {
21731+
return (com.google.protobuf.ByteString) ref;
21732+
}
21733+
}
21734+
2166321735
private byte memoizedIsInitialized = -1;
2166421736

2166521737
@java.lang.Override
@@ -21680,6 +21752,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
2168021752
for (int i = 0; i < items_.size(); i++) {
2168121753
output.writeMessage(2, items_.get(i));
2168221754
}
21755+
if (!getSubtitleBytes().isEmpty()) {
21756+
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subtitle_);
21757+
}
2168321758
unknownFields.writeTo(output);
2168421759
}
2168521760

@@ -21695,6 +21770,9 @@ public int getSerializedSize() {
2169521770
for (int i = 0; i < items_.size(); i++) {
2169621771
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, items_.get(i));
2169721772
}
21773+
if (!getSubtitleBytes().isEmpty()) {
21774+
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subtitle_);
21775+
}
2169821776
size += unknownFields.getSerializedSize();
2169921777
memoizedSize = size;
2170021778
return size;
@@ -21713,6 +21791,7 @@ public boolean equals(final java.lang.Object obj) {
2171321791

2171421792
if (!getTitle().equals(other.getTitle())) return false;
2171521793
if (!getItemsList().equals(other.getItemsList())) return false;
21794+
if (!getSubtitle().equals(other.getSubtitle())) return false;
2171621795
if (!unknownFields.equals(other.unknownFields)) return false;
2171721796
return true;
2171821797
}
@@ -21730,6 +21809,8 @@ public int hashCode() {
2173021809
hash = (37 * hash) + ITEMS_FIELD_NUMBER;
2173121810
hash = (53 * hash) + getItemsList().hashCode();
2173221811
}
21812+
hash = (37 * hash) + SUBTITLE_FIELD_NUMBER;
21813+
hash = (53 * hash) + getSubtitle().hashCode();
2173321814
hash = (29 * hash) + unknownFields.hashCode();
2173421815
memoizedHashCode = hash;
2173521816
return hash;
@@ -21888,6 +21969,8 @@ public Builder clear() {
2188821969
} else {
2188921970
itemsBuilder_.clear();
2189021971
}
21972+
subtitle_ = "";
21973+
2189121974
return this;
2189221975
}
2189321976

@@ -21928,6 +22011,7 @@ public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect buildPartial() {
2192822011
} else {
2192922012
result.items_ = itemsBuilder_.build();
2193022013
}
22014+
result.subtitle_ = subtitle_;
2193122015
result.bitField0_ = to_bitField0_;
2193222016
onBuilt();
2193322017
return result;
@@ -22013,6 +22097,10 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.ListSelec
2201322097
}
2201422098
}
2201522099
}
22100+
if (!other.getSubtitle().isEmpty()) {
22101+
subtitle_ = other.subtitle_;
22102+
onChanged();
22103+
}
2201622104
this.mergeUnknownFields(other.unknownFields);
2201722105
onChanged();
2201822106
return this;
@@ -22545,6 +22633,100 @@ public Builder removeItems(int index) {
2254522633
return itemsBuilder_;
2254622634
}
2254722635

22636+
private java.lang.Object subtitle_ = "";
22637+
/**
22638+
*
22639+
*
22640+
* <pre>
22641+
* Optional. Subtitle of the list.
22642+
* </pre>
22643+
*
22644+
* <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
22645+
*/
22646+
public java.lang.String getSubtitle() {
22647+
java.lang.Object ref = subtitle_;
22648+
if (!(ref instanceof java.lang.String)) {
22649+
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
22650+
java.lang.String s = bs.toStringUtf8();
22651+
subtitle_ = s;
22652+
return s;
22653+
} else {
22654+
return (java.lang.String) ref;
22655+
}
22656+
}
22657+
/**
22658+
*
22659+
*
22660+
* <pre>
22661+
* Optional. Subtitle of the list.
22662+
* </pre>
22663+
*
22664+
* <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
22665+
*/
22666+
public com.google.protobuf.ByteString getSubtitleBytes() {
22667+
java.lang.Object ref = subtitle_;
22668+
if (ref instanceof String) {
22669+
com.google.protobuf.ByteString b =
22670+
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
22671+
subtitle_ = b;
22672+
return b;
22673+
} else {
22674+
return (com.google.protobuf.ByteString) ref;
22675+
}
22676+
}
22677+
/**
22678+
*
22679+
*
22680+
* <pre>
22681+
* Optional. Subtitle of the list.
22682+
* </pre>
22683+
*
22684+
* <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
22685+
*/
22686+
public Builder setSubtitle(java.lang.String value) {
22687+
if (value == null) {
22688+
throw new NullPointerException();
22689+
}
22690+
22691+
subtitle_ = value;
22692+
onChanged();
22693+
return this;
22694+
}
22695+
/**
22696+
*
22697+
*
22698+
* <pre>
22699+
* Optional. Subtitle of the list.
22700+
* </pre>
22701+
*
22702+
* <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
22703+
*/
22704+
public Builder clearSubtitle() {
22705+
22706+
subtitle_ = getDefaultInstance().getSubtitle();
22707+
onChanged();
22708+
return this;
22709+
}
22710+
/**
22711+
*
22712+
*
22713+
* <pre>
22714+
* Optional. Subtitle of the list.
22715+
* </pre>
22716+
*
22717+
* <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
22718+
*/
22719+
public Builder setSubtitleBytes(com.google.protobuf.ByteString value) {
22720+
if (value == null) {
22721+
throw new NullPointerException();
22722+
}
22723+
checkByteStringIsUtf8(value);
22724+
22725+
subtitle_ = value;
22726+
onChanged();
22727+
return this;
22728+
}
22729+
2254822730
@java.lang.Override
2254922731
public final Builder setUnknownFields(
2255022732
final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -30813,9 +30995,12 @@ public com.google.cloud.dialogflow.v2.Intent.WebhookState getWebhookState() {
3081330995
*
3081430996
* <pre>
3081530997
* Optional. The priority of this intent. Higher numbers represent higher
30816-
* priorities. If this is zero or unspecified, we use the default
30817-
* priority 500000.
30818-
* Negative numbers mean that the intent is disabled.
30998+
* priorities.
30999+
* - If the supplied value is unspecified or 0, the service
31000+
* translates the value to 500,000, which corresponds to the
31001+
* `Normal` priority in the console.
31002+
* - If the supplied value is negative, the intent is ignored
31003+
* in runtime detect intent requests.
3081931004
* </pre>
3082031005
*
3082131006
* <code>int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
@@ -32788,9 +32973,12 @@ public Builder clearWebhookState() {
3278832973
*
3278932974
* <pre>
3279032975
* Optional. The priority of this intent. Higher numbers represent higher
32791-
* priorities. If this is zero or unspecified, we use the default
32792-
* priority 500000.
32793-
* Negative numbers mean that the intent is disabled.
32976+
* priorities.
32977+
* - If the supplied value is unspecified or 0, the service
32978+
* translates the value to 500,000, which corresponds to the
32979+
* `Normal` priority in the console.
32980+
* - If the supplied value is negative, the intent is ignored
32981+
* in runtime detect intent requests.
3279432982
* </pre>
3279532983
*
3279632984
* <code>int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
@@ -32803,9 +32991,12 @@ public int getPriority() {
3280332991
*
3280432992
* <pre>
3280532993
* Optional. The priority of this intent. Higher numbers represent higher
32806-
* priorities. If this is zero or unspecified, we use the default
32807-
* priority 500000.
32808-
* Negative numbers mean that the intent is disabled.
32994+
* priorities.
32995+
* - If the supplied value is unspecified or 0, the service
32996+
* translates the value to 500,000, which corresponds to the
32997+
* `Normal` priority in the console.
32998+
* - If the supplied value is negative, the intent is ignored
32999+
* in runtime detect intent requests.
3280933000
* </pre>
3281033001
*
3281133002
* <code>int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
@@ -32821,9 +33012,12 @@ public Builder setPriority(int value) {
3282133012
*
3282233013
* <pre>
3282333014
* Optional. The priority of this intent. Higher numbers represent higher
32824-
* priorities. If this is zero or unspecified, we use the default
32825-
* priority 500000.
32826-
* Negative numbers mean that the intent is disabled.
33015+
* priorities.
33016+
* - If the supplied value is unspecified or 0, the service
33017+
* translates the value to 500,000, which corresponds to the
33018+
* `Normal` priority in the console.
33019+
* - If the supplied value is negative, the intent is ignored
33020+
* in runtime detect intent requests.
3282733021
* </pre>
3282833022
*
3282933023
* <code>int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL];</code>

proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/IntentOrBuilder.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,12 @@ public interface IntentOrBuilder
101101
*
102102
* <pre>
103103
* Optional. The priority of this intent. Higher numbers represent higher
104-
* priorities. If this is zero or unspecified, we use the default
105-
* priority 500000.
106-
* Negative numbers mean that the intent is disabled.
104+
* priorities.
105+
* - If the supplied value is unspecified or 0, the service
106+
* translates the value to 500,000, which corresponds to the
107+
* `Normal` priority in the console.
108+
* - If the supplied value is negative, the intent is ignored
109+
* in runtime detect intent requests.
107110
* </pre>
108111
*
109112
* <code>int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL];</code>

0 commit comments

Comments
 (0)