com.google.cloud.dialogflow.cx.v3beta1.Webhook Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-dialogflow-cx-v3beta1 Show documentation
Show all versions of proto-google-cloud-dialogflow-cx-v3beta1 Show documentation
PROTO library for proto-google-cloud-dialogflow-cx-v3beta1
The newest version!
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/dialogflow/cx/v3beta1/webhook.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.dialogflow.cx.v3beta1;
/**
*
*
*
* Webhooks host the developer's business logic. During a session, webhooks
* allow the developer to use the data extracted by Dialogflow's natural
* language processing to generate dynamic responses, validate collected data,
* or trigger actions on the backend.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Webhook}
*/
public final class Webhook extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Webhook)
WebhookOrBuilder {
private static final long serialVersionUID = 0L;
// Use Webhook.newBuilder() to construct.
private Webhook(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Webhook() {
name_ = "";
displayName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Webhook();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.class,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.Builder.class);
}
public interface GenericWebServiceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The webhook URI for receiving POST requests. It must use https
* protocol.
*
*
* string uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The uri.
*/
java.lang.String getUri();
/**
*
*
*
* Required. The webhook URI for receiving POST requests. It must use https
* protocol.
*
*
* string uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for uri.
*/
com.google.protobuf.ByteString getUriBytes();
/**
*
*
*
* The user name for HTTP Basic authentication.
*
*
* string username = 2 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.username is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=187
* @return The username.
*/
@java.lang.Deprecated
java.lang.String getUsername();
/**
*
*
*
* The user name for HTTP Basic authentication.
*
*
* string username = 2 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.username is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=187
* @return The bytes for username.
*/
@java.lang.Deprecated
com.google.protobuf.ByteString getUsernameBytes();
/**
*
*
*
* The password for HTTP Basic authentication.
*
*
* string password = 3 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.password is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=190
* @return The password.
*/
@java.lang.Deprecated
java.lang.String getPassword();
/**
*
*
*
* The password for HTTP Basic authentication.
*
*
* string password = 3 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.password is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=190
* @return The bytes for password.
*/
@java.lang.Deprecated
com.google.protobuf.ByteString getPasswordBytes();
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
int getRequestHeadersCount();
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
boolean containsRequestHeaders(java.lang.String key);
/** Use {@link #getRequestHeadersMap()} instead. */
@java.lang.Deprecated
java.util.Map getRequestHeaders();
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
java.util.Map getRequestHeadersMap();
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
/* nullable */
java.lang.String getRequestHeadersOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
java.lang.String getRequestHeadersOrThrow(java.lang.String key);
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the allowedCaCerts.
*/
java.util.List getAllowedCaCertsList();
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of allowedCaCerts.
*/
int getAllowedCaCertsCount();
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The allowedCaCerts at the given index.
*/
com.google.protobuf.ByteString getAllowedCaCerts(int index);
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the oauthConfig field is set.
*/
boolean hasOauthConfig();
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The oauthConfig.
*/
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig getOauthConfig();
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfigOrBuilder
getOauthConfigOrBuilder();
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for serviceAgentAuth.
*/
int getServiceAgentAuthValue();
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The serviceAgentAuth.
*/
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth
getServiceAgentAuth();
/**
*
*
*
* Optional. Type of the webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for webhookType.
*/
int getWebhookTypeValue();
/**
*
*
*
* Optional. Type of the webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The webhookType.
*/
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType getWebhookType();
/**
*
*
*
* Optional. HTTP method for the flexible webhook calls. Standard webhook
* always uses POST.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for httpMethod.
*/
int getHttpMethodValue();
/**
*
*
*
* Optional. HTTP method for the flexible webhook calls. Standard webhook
* always uses POST.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The httpMethod.
*/
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod getHttpMethod();
/**
*
*
*
* Optional. Defines a custom JSON object as request body to send to
* flexible webhook.
*
*
* string request_body = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The requestBody.
*/
java.lang.String getRequestBody();
/**
*
*
*
* Optional. Defines a custom JSON object as request body to send to
* flexible webhook.
*
*
* string request_body = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for requestBody.
*/
com.google.protobuf.ByteString getRequestBodyBytes();
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getParameterMappingCount();
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
boolean containsParameterMapping(java.lang.String key);
/** Use {@link #getParameterMappingMap()} instead. */
@java.lang.Deprecated
java.util.Map getParameterMapping();
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.Map getParameterMappingMap();
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
/* nullable */
java.lang.String getParameterMappingOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.lang.String getParameterMappingOrThrow(java.lang.String key);
}
/**
*
*
*
* Represents configuration for a generic web service.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService}
*/
public static final class GenericWebService extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService)
GenericWebServiceOrBuilder {
private static final long serialVersionUID = 0L;
// Use GenericWebService.newBuilder() to construct.
private GenericWebService(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GenericWebService() {
uri_ = "";
username_ = "";
password_ = "";
allowedCaCerts_ = emptyList(com.google.protobuf.ByteString.class);
serviceAgentAuth_ = 0;
webhookType_ = 0;
httpMethod_ = 0;
requestBody_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new GenericWebService();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 4:
return internalGetRequestHeaders();
case 9:
return internalGetParameterMapping();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.class,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder.class);
}
/**
*
*
*
* Indicate the auth token type generated from the [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
*
*
* Protobuf enum {@code
* google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth}
*/
public enum ServiceAgentAuth implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Service agent auth type unspecified. Default to ID_TOKEN.
*
*
* SERVICE_AGENT_AUTH_UNSPECIFIED = 0;
*/
SERVICE_AGENT_AUTH_UNSPECIFIED(0),
/**
*
*
*
* No token used.
*
*
* NONE = 1;
*/
NONE(1),
/**
*
*
*
* Use [ID
* token](https://cloud.google.com/docs/authentication/token-types#id)
* generated from service agent. This can be used to access Cloud Function
* and Cloud Run after you grant Invoker role to
* `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
*
*
* ID_TOKEN = 2;
*/
ID_TOKEN(2),
/**
*
*
*
* Use [access
* token](https://cloud.google.com/docs/authentication/token-types#access)
* generated from service agent. This can be used to access other Google
* Cloud APIs after you grant required roles to
* `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
*
*
* ACCESS_TOKEN = 3;
*/
ACCESS_TOKEN(3),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Service agent auth type unspecified. Default to ID_TOKEN.
*
*
* SERVICE_AGENT_AUTH_UNSPECIFIED = 0;
*/
public static final int SERVICE_AGENT_AUTH_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* No token used.
*
*
* NONE = 1;
*/
public static final int NONE_VALUE = 1;
/**
*
*
*
* Use [ID
* token](https://cloud.google.com/docs/authentication/token-types#id)
* generated from service agent. This can be used to access Cloud Function
* and Cloud Run after you grant Invoker role to
* `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
*
*
* ID_TOKEN = 2;
*/
public static final int ID_TOKEN_VALUE = 2;
/**
*
*
*
* Use [access
* token](https://cloud.google.com/docs/authentication/token-types#access)
* generated from service agent. This can be used to access other Google
* Cloud APIs after you grant required roles to
* `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
*
*
* ACCESS_TOKEN = 3;
*/
public static final int ACCESS_TOKEN_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ServiceAgentAuth valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ServiceAgentAuth forNumber(int value) {
switch (value) {
case 0:
return SERVICE_AGENT_AUTH_UNSPECIFIED;
case 1:
return NONE;
case 2:
return ID_TOKEN;
case 3:
return ACCESS_TOKEN;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ServiceAgentAuth findValueByNumber(int number) {
return ServiceAgentAuth.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final ServiceAgentAuth[] VALUES = values();
public static ServiceAgentAuth valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ServiceAgentAuth(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth)
}
/**
*
*
*
* Represents the type of webhook configuration.
*
*
* Protobuf enum {@code
* google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType}
*/
public enum WebhookType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Default value. This value is unused.
*
*
* WEBHOOK_TYPE_UNSPECIFIED = 0;
*/
WEBHOOK_TYPE_UNSPECIFIED(0),
/**
*
*
*
* Represents a standard webhook.
*
*
* STANDARD = 1;
*/
STANDARD(1),
/**
*
*
*
* Represents a flexible webhook.
*
*
* FLEXIBLE = 2;
*/
FLEXIBLE(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Default value. This value is unused.
*
*
* WEBHOOK_TYPE_UNSPECIFIED = 0;
*/
public static final int WEBHOOK_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Represents a standard webhook.
*
*
* STANDARD = 1;
*/
public static final int STANDARD_VALUE = 1;
/**
*
*
*
* Represents a flexible webhook.
*
*
* FLEXIBLE = 2;
*/
public static final int FLEXIBLE_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static WebhookType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static WebhookType forNumber(int value) {
switch (value) {
case 0:
return WEBHOOK_TYPE_UNSPECIFIED;
case 1:
return STANDARD;
case 2:
return FLEXIBLE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public WebhookType findValueByNumber(int number) {
return WebhookType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.getDescriptor()
.getEnumTypes()
.get(1);
}
private static final WebhookType[] VALUES = values();
public static WebhookType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private WebhookType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType)
}
/**
*
*
*
* HTTP method to use when calling webhooks.
*
*
* Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod}
*/
public enum HttpMethod implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* HTTP method not specified.
*
*
* HTTP_METHOD_UNSPECIFIED = 0;
*/
HTTP_METHOD_UNSPECIFIED(0),
/**
*
*
*
* HTTP POST Method.
*
*
* POST = 1;
*/
POST(1),
/**
*
*
*
* HTTP GET Method.
*
*
* GET = 2;
*/
GET(2),
/**
*
*
*
* HTTP HEAD Method.
*
*
* HEAD = 3;
*/
HEAD(3),
/**
*
*
*
* HTTP PUT Method.
*
*
* PUT = 4;
*/
PUT(4),
/**
*
*
*
* HTTP DELETE Method.
*
*
* DELETE = 5;
*/
DELETE(5),
/**
*
*
*
* HTTP PATCH Method.
*
*
* PATCH = 6;
*/
PATCH(6),
/**
*
*
*
* HTTP OPTIONS Method.
*
*
* OPTIONS = 7;
*/
OPTIONS(7),
UNRECOGNIZED(-1),
;
/**
*
*
*
* HTTP method not specified.
*
*
* HTTP_METHOD_UNSPECIFIED = 0;
*/
public static final int HTTP_METHOD_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* HTTP POST Method.
*
*
* POST = 1;
*/
public static final int POST_VALUE = 1;
/**
*
*
*
* HTTP GET Method.
*
*
* GET = 2;
*/
public static final int GET_VALUE = 2;
/**
*
*
*
* HTTP HEAD Method.
*
*
* HEAD = 3;
*/
public static final int HEAD_VALUE = 3;
/**
*
*
*
* HTTP PUT Method.
*
*
* PUT = 4;
*/
public static final int PUT_VALUE = 4;
/**
*
*
*
* HTTP DELETE Method.
*
*
* DELETE = 5;
*/
public static final int DELETE_VALUE = 5;
/**
*
*
*
* HTTP PATCH Method.
*
*
* PATCH = 6;
*/
public static final int PATCH_VALUE = 6;
/**
*
*
*
* HTTP OPTIONS Method.
*
*
* OPTIONS = 7;
*/
public static final int OPTIONS_VALUE = 7;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static HttpMethod valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static HttpMethod forNumber(int value) {
switch (value) {
case 0:
return HTTP_METHOD_UNSPECIFIED;
case 1:
return POST;
case 2:
return GET;
case 3:
return HEAD;
case 4:
return PUT;
case 5:
return DELETE;
case 6:
return PATCH;
case 7:
return OPTIONS;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public HttpMethod findValueByNumber(int number) {
return HttpMethod.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.getDescriptor()
.getEnumTypes()
.get(2);
}
private static final HttpMethod[] VALUES = values();
public static HttpMethod valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private HttpMethod(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod)
}
public interface OAuthConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The client ID provided by the 3rd party platform.
*
*
* string client_id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientId.
*/
java.lang.String getClientId();
/**
*
*
*
* Required. The client ID provided by the 3rd party platform.
*
*
* string client_id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientId.
*/
com.google.protobuf.ByteString getClientIdBytes();
/**
*
*
*
* Required. The client secret provided by the 3rd party platform.
*
*
* string client_secret = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientSecret.
*/
java.lang.String getClientSecret();
/**
*
*
*
* Required. The client secret provided by the 3rd party platform.
*
*
* string client_secret = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientSecret.
*/
com.google.protobuf.ByteString getClientSecretBytes();
/**
*
*
*
* Required. The token endpoint provided by the 3rd party platform to
* exchange an access token.
*
*
* string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The tokenEndpoint.
*/
java.lang.String getTokenEndpoint();
/**
*
*
*
* Required. The token endpoint provided by the 3rd party platform to
* exchange an access token.
*
*
* string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for tokenEndpoint.
*/
com.google.protobuf.ByteString getTokenEndpointBytes();
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the scopes.
*/
java.util.List getScopesList();
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of scopes.
*/
int getScopesCount();
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The scopes at the given index.
*/
java.lang.String getScopes(int index);
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the scopes at the given index.
*/
com.google.protobuf.ByteString getScopesBytes(int index);
}
/**
*
*
*
* Represents configuration of OAuth client credential flow for 3rd party
* API authentication.
*
*
* Protobuf type {@code
* google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig}
*/
public static final class OAuthConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig)
OAuthConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use OAuthConfig.newBuilder() to construct.
private OAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OAuthConfig() {
clientId_ = "";
clientSecret_ = "";
tokenEndpoint_ = "";
scopes_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new OAuthConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_OAuthConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_OAuthConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig.Builder
.class);
}
public static final int CLIENT_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object clientId_ = "";
/**
*
*
*
* Required. The client ID provided by the 3rd party platform.
*
*
* string client_id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientId.
*/
@java.lang.Override
public java.lang.String getClientId() {
java.lang.Object ref = clientId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
clientId_ = s;
return s;
}
}
/**
*
*
*
* Required. The client ID provided by the 3rd party platform.
*
*
* string client_id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getClientIdBytes() {
java.lang.Object ref = clientId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
clientId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLIENT_SECRET_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object clientSecret_ = "";
/**
*
*
*
* Required. The client secret provided by the 3rd party platform.
*
*
* string client_secret = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientSecret.
*/
@java.lang.Override
public java.lang.String getClientSecret() {
java.lang.Object ref = clientSecret_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
clientSecret_ = s;
return s;
}
}
/**
*
*
*
* Required. The client secret provided by the 3rd party platform.
*
*
* string client_secret = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientSecret.
*/
@java.lang.Override
public com.google.protobuf.ByteString getClientSecretBytes() {
java.lang.Object ref = clientSecret_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
clientSecret_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TOKEN_ENDPOINT_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object tokenEndpoint_ = "";
/**
*
*
*
* Required. The token endpoint provided by the 3rd party platform to
* exchange an access token.
*
*
* string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The tokenEndpoint.
*/
@java.lang.Override
public java.lang.String getTokenEndpoint() {
java.lang.Object ref = tokenEndpoint_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
tokenEndpoint_ = s;
return s;
}
}
/**
*
*
*
* Required. The token endpoint provided by the 3rd party platform to
* exchange an access token.
*
*
* string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for tokenEndpoint.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTokenEndpointBytes() {
java.lang.Object ref = tokenEndpoint_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
tokenEndpoint_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SCOPES_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList scopes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the scopes.
*/
public com.google.protobuf.ProtocolStringList getScopesList() {
return scopes_;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of scopes.
*/
public int getScopesCount() {
return scopes_.size();
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The scopes at the given index.
*/
public java.lang.String getScopes(int index) {
return scopes_.get(index);
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the scopes at the given index.
*/
public com.google.protobuf.ByteString getScopesBytes(int index) {
return scopes_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clientId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientSecret_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tokenEndpoint_);
}
for (int i = 0; i < scopes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, scopes_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clientId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientSecret_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tokenEndpoint_);
}
{
int dataSize = 0;
for (int i = 0; i < scopes_.size(); i++) {
dataSize += computeStringSizeNoTag(scopes_.getRaw(i));
}
size += dataSize;
size += 1 * getScopesList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig other =
(com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig) obj;
if (!getClientId().equals(other.getClientId())) return false;
if (!getClientSecret().equals(other.getClientSecret())) return false;
if (!getTokenEndpoint().equals(other.getTokenEndpoint())) return false;
if (!getScopesList().equals(other.getScopesList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER;
hash = (53 * hash) + getClientId().hashCode();
hash = (37 * hash) + CLIENT_SECRET_FIELD_NUMBER;
hash = (53 * hash) + getClientSecret().hashCode();
hash = (37 * hash) + TOKEN_ENDPOINT_FIELD_NUMBER;
hash = (53 * hash) + getTokenEndpoint().hashCode();
if (getScopesCount() > 0) {
hash = (37 * hash) + SCOPES_FIELD_NUMBER;
hash = (53 * hash) + getScopesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Represents configuration of OAuth client credential flow for 3rd party
* API authentication.
*
*
* Protobuf type {@code
* google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig)
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_OAuthConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_OAuthConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
.class,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
clientId_ = "";
clientSecret_ = "";
tokenEndpoint_ = "";
scopes_ = com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_OAuthConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
build() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig result =
new com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig(
this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.clientId_ = clientId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.clientSecret_ = clientSecret_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.tokenEndpoint_ = tokenEndpoint_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
scopes_.makeImmutable();
result.scopes_ = scopes_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
.getDefaultInstance()) return this;
if (!other.getClientId().isEmpty()) {
clientId_ = other.clientId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getClientSecret().isEmpty()) {
clientSecret_ = other.clientSecret_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getTokenEndpoint().isEmpty()) {
tokenEndpoint_ = other.tokenEndpoint_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.scopes_.isEmpty()) {
if (scopes_.isEmpty()) {
scopes_ = other.scopes_;
bitField0_ |= 0x00000008;
} else {
ensureScopesIsMutable();
scopes_.addAll(other.scopes_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
clientId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
clientSecret_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
tokenEndpoint_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
java.lang.String s = input.readStringRequireUtf8();
ensureScopesIsMutable();
scopes_.add(s);
break;
} // case 34
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object clientId_ = "";
/**
*
*
*
* Required. The client ID provided by the 3rd party platform.
*
*
* string client_id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientId.
*/
public java.lang.String getClientId() {
java.lang.Object ref = clientId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
clientId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The client ID provided by the 3rd party platform.
*
*
* string client_id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientId.
*/
public com.google.protobuf.ByteString getClientIdBytes() {
java.lang.Object ref = clientId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
clientId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The client ID provided by the 3rd party platform.
*
*
* string client_id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The clientId to set.
* @return This builder for chaining.
*/
public Builder setClientId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clientId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The client ID provided by the 3rd party platform.
*
*
* string client_id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearClientId() {
clientId_ = getDefaultInstance().getClientId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The client ID provided by the 3rd party platform.
*
*
* string client_id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for clientId to set.
* @return This builder for chaining.
*/
public Builder setClientIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clientId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object clientSecret_ = "";
/**
*
*
*
* Required. The client secret provided by the 3rd party platform.
*
*
* string client_secret = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientSecret.
*/
public java.lang.String getClientSecret() {
java.lang.Object ref = clientSecret_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
clientSecret_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The client secret provided by the 3rd party platform.
*
*
* string client_secret = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientSecret.
*/
public com.google.protobuf.ByteString getClientSecretBytes() {
java.lang.Object ref = clientSecret_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
clientSecret_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The client secret provided by the 3rd party platform.
*
*
* string client_secret = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The clientSecret to set.
* @return This builder for chaining.
*/
public Builder setClientSecret(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clientSecret_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The client secret provided by the 3rd party platform.
*
*
* string client_secret = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearClientSecret() {
clientSecret_ = getDefaultInstance().getClientSecret();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. The client secret provided by the 3rd party platform.
*
*
* string client_secret = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for clientSecret to set.
* @return This builder for chaining.
*/
public Builder setClientSecretBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clientSecret_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object tokenEndpoint_ = "";
/**
*
*
*
* Required. The token endpoint provided by the 3rd party platform to
* exchange an access token.
*
*
* string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The tokenEndpoint.
*/
public java.lang.String getTokenEndpoint() {
java.lang.Object ref = tokenEndpoint_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
tokenEndpoint_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The token endpoint provided by the 3rd party platform to
* exchange an access token.
*
*
* string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for tokenEndpoint.
*/
public com.google.protobuf.ByteString getTokenEndpointBytes() {
java.lang.Object ref = tokenEndpoint_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
tokenEndpoint_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The token endpoint provided by the 3rd party platform to
* exchange an access token.
*
*
* string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The tokenEndpoint to set.
* @return This builder for chaining.
*/
public Builder setTokenEndpoint(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
tokenEndpoint_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required. The token endpoint provided by the 3rd party platform to
* exchange an access token.
*
*
* string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearTokenEndpoint() {
tokenEndpoint_ = getDefaultInstance().getTokenEndpoint();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Required. The token endpoint provided by the 3rd party platform to
* exchange an access token.
*
*
* string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for tokenEndpoint to set.
* @return This builder for chaining.
*/
public Builder setTokenEndpointBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
tokenEndpoint_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList scopes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureScopesIsMutable() {
if (!scopes_.isModifiable()) {
scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_);
}
bitField0_ |= 0x00000008;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the scopes.
*/
public com.google.protobuf.ProtocolStringList getScopesList() {
scopes_.makeImmutable();
return scopes_;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of scopes.
*/
public int getScopesCount() {
return scopes_.size();
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The scopes at the given index.
*/
public java.lang.String getScopes(int index) {
return scopes_.get(index);
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the scopes at the given index.
*/
public com.google.protobuf.ByteString getScopesBytes(int index) {
return scopes_.getByteString(index);
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The scopes to set.
* @return This builder for chaining.
*/
public Builder setScopes(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureScopesIsMutable();
scopes_.set(index, value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The scopes to add.
* @return This builder for chaining.
*/
public Builder addScopes(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureScopesIsMutable();
scopes_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The scopes to add.
* @return This builder for chaining.
*/
public Builder addAllScopes(java.lang.Iterable values) {
ensureScopesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearScopes() {
scopes_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes of the scopes to add.
* @return This builder for chaining.
*/
public Builder addScopesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureScopesIsMutable();
scopes_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig)
private static final com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.OAuthConfig
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OAuthConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int URI_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object uri_ = "";
/**
*
*
*
* Required. The webhook URI for receiving POST requests. It must use https
* protocol.
*
*
* string uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The uri.
*/
@java.lang.Override
public java.lang.String getUri() {
java.lang.Object ref = uri_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uri_ = s;
return s;
}
}
/**
*
*
*
* Required. The webhook URI for receiving POST requests. It must use https
* protocol.
*
*
* string uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for uri.
*/
@java.lang.Override
public com.google.protobuf.ByteString getUriBytes() {
java.lang.Object ref = uri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
uri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USERNAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object username_ = "";
/**
*
*
*
* The user name for HTTP Basic authentication.
*
*
* string username = 2 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.username is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=187
* @return The username.
*/
@java.lang.Override
@java.lang.Deprecated
public java.lang.String getUsername() {
java.lang.Object ref = username_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
username_ = s;
return s;
}
}
/**
*
*
*
* The user name for HTTP Basic authentication.
*
*
* string username = 2 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.username is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=187
* @return The bytes for username.
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.protobuf.ByteString getUsernameBytes() {
java.lang.Object ref = username_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
username_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PASSWORD_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object password_ = "";
/**
*
*
*
* The password for HTTP Basic authentication.
*
*
* string password = 3 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.password is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=190
* @return The password.
*/
@java.lang.Override
@java.lang.Deprecated
public java.lang.String getPassword() {
java.lang.Object ref = password_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
password_ = s;
return s;
}
}
/**
*
*
*
* The password for HTTP Basic authentication.
*
*
* string password = 3 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.password is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=190
* @return The bytes for password.
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.protobuf.ByteString getPasswordBytes() {
java.lang.Object ref = password_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
password_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REQUEST_HEADERS_FIELD_NUMBER = 4;
private static final class RequestHeadersDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_RequestHeadersEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField requestHeaders_;
private com.google.protobuf.MapField
internalGetRequestHeaders() {
if (requestHeaders_ == null) {
return com.google.protobuf.MapField.emptyMapField(
RequestHeadersDefaultEntryHolder.defaultEntry);
}
return requestHeaders_;
}
public int getRequestHeadersCount() {
return internalGetRequestHeaders().getMap().size();
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
@java.lang.Override
public boolean containsRequestHeaders(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetRequestHeaders().getMap().containsKey(key);
}
/** Use {@link #getRequestHeadersMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getRequestHeaders() {
return getRequestHeadersMap();
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
@java.lang.Override
public java.util.Map getRequestHeadersMap() {
return internalGetRequestHeaders().getMap();
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
@java.lang.Override
public /* nullable */ java.lang.String getRequestHeadersOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetRequestHeaders().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
@java.lang.Override
public java.lang.String getRequestHeadersOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetRequestHeaders().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int ALLOWED_CA_CERTS_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private com.google.protobuf.Internal.ProtobufList
allowedCaCerts_ = emptyList(com.google.protobuf.ByteString.class);
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the allowedCaCerts.
*/
@java.lang.Override
public java.util.List getAllowedCaCertsList() {
return allowedCaCerts_;
}
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of allowedCaCerts.
*/
public int getAllowedCaCertsCount() {
return allowedCaCerts_.size();
}
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The allowedCaCerts at the given index.
*/
public com.google.protobuf.ByteString getAllowedCaCerts(int index) {
return allowedCaCerts_.get(index);
}
public static final int OAUTH_CONFIG_FIELD_NUMBER = 11;
private com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
oauthConfig_;
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the oauthConfig field is set.
*/
@java.lang.Override
public boolean hasOauthConfig() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The oauthConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
getOauthConfig() {
return oauthConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
.getDefaultInstance()
: oauthConfig_;
}
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfigOrBuilder
getOauthConfigOrBuilder() {
return oauthConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
.getDefaultInstance()
: oauthConfig_;
}
public static final int SERVICE_AGENT_AUTH_FIELD_NUMBER = 12;
private int serviceAgentAuth_ = 0;
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for serviceAgentAuth.
*/
@java.lang.Override
public int getServiceAgentAuthValue() {
return serviceAgentAuth_;
}
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The serviceAgentAuth.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth
getServiceAgentAuth() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth result =
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth
.forNumber(serviceAgentAuth_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth
.UNRECOGNIZED
: result;
}
public static final int WEBHOOK_TYPE_FIELD_NUMBER = 6;
private int webhookType_ = 0;
/**
*
*
*
* Optional. Type of the webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for webhookType.
*/
@java.lang.Override
public int getWebhookTypeValue() {
return webhookType_;
}
/**
*
*
*
* Optional. Type of the webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The webhookType.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType
getWebhookType() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType result =
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType.forNumber(
webhookType_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType
.UNRECOGNIZED
: result;
}
public static final int HTTP_METHOD_FIELD_NUMBER = 7;
private int httpMethod_ = 0;
/**
*
*
*
* Optional. HTTP method for the flexible webhook calls. Standard webhook
* always uses POST.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for httpMethod.
*/
@java.lang.Override
public int getHttpMethodValue() {
return httpMethod_;
}
/**
*
*
*
* Optional. HTTP method for the flexible webhook calls. Standard webhook
* always uses POST.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The httpMethod.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod
getHttpMethod() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod result =
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod.forNumber(
httpMethod_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod.UNRECOGNIZED
: result;
}
public static final int REQUEST_BODY_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object requestBody_ = "";
/**
*
*
*
* Optional. Defines a custom JSON object as request body to send to
* flexible webhook.
*
*
* string request_body = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The requestBody.
*/
@java.lang.Override
public java.lang.String getRequestBody() {
java.lang.Object ref = requestBody_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
requestBody_ = s;
return s;
}
}
/**
*
*
*
* Optional. Defines a custom JSON object as request body to send to
* flexible webhook.
*
*
* string request_body = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for requestBody.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRequestBodyBytes() {
java.lang.Object ref = requestBody_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
requestBody_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PARAMETER_MAPPING_FIELD_NUMBER = 9;
private static final class ParameterMappingDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_ParameterMappingEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField parameterMapping_;
private com.google.protobuf.MapField
internalGetParameterMapping() {
if (parameterMapping_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ParameterMappingDefaultEntryHolder.defaultEntry);
}
return parameterMapping_;
}
public int getParameterMappingCount() {
return internalGetParameterMapping().getMap().size();
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public boolean containsParameterMapping(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetParameterMapping().getMap().containsKey(key);
}
/** Use {@link #getParameterMappingMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getParameterMapping() {
return getParameterMappingMap();
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.Map getParameterMappingMap() {
return internalGetParameterMapping().getMap();
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public /* nullable */ java.lang.String getParameterMappingOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map =
internalGetParameterMapping().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.lang.String getParameterMappingOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map =
internalGetParameterMapping().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, username_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, password_);
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetRequestHeaders(), RequestHeadersDefaultEntryHolder.defaultEntry, 4);
for (int i = 0; i < allowedCaCerts_.size(); i++) {
output.writeBytes(5, allowedCaCerts_.get(i));
}
if (webhookType_
!= com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType
.WEBHOOK_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(6, webhookType_);
}
if (httpMethod_
!= com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod
.HTTP_METHOD_UNSPECIFIED
.getNumber()) {
output.writeEnum(7, httpMethod_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestBody_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, requestBody_);
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output,
internalGetParameterMapping(),
ParameterMappingDefaultEntryHolder.defaultEntry,
9);
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(11, getOauthConfig());
}
if (serviceAgentAuth_
!= com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth
.SERVICE_AGENT_AUTH_UNSPECIFIED
.getNumber()) {
output.writeEnum(12, serviceAgentAuth_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, username_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, password_);
}
for (java.util.Map.Entry entry :
internalGetRequestHeaders().getMap().entrySet()) {
com.google.protobuf.MapEntry requestHeaders__ =
RequestHeadersDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, requestHeaders__);
}
{
int dataSize = 0;
for (int i = 0; i < allowedCaCerts_.size(); i++) {
dataSize +=
com.google.protobuf.CodedOutputStream.computeBytesSizeNoTag(allowedCaCerts_.get(i));
}
size += dataSize;
size += 1 * getAllowedCaCertsList().size();
}
if (webhookType_
!= com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType
.WEBHOOK_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, webhookType_);
}
if (httpMethod_
!= com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod
.HTTP_METHOD_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, httpMethod_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestBody_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, requestBody_);
}
for (java.util.Map.Entry entry :
internalGetParameterMapping().getMap().entrySet()) {
com.google.protobuf.MapEntry parameterMapping__ =
ParameterMappingDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, parameterMapping__);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getOauthConfig());
}
if (serviceAgentAuth_
!= com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth
.SERVICE_AGENT_AUTH_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, serviceAgentAuth_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService other =
(com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) obj;
if (!getUri().equals(other.getUri())) return false;
if (!getUsername().equals(other.getUsername())) return false;
if (!getPassword().equals(other.getPassword())) return false;
if (!internalGetRequestHeaders().equals(other.internalGetRequestHeaders())) return false;
if (!getAllowedCaCertsList().equals(other.getAllowedCaCertsList())) return false;
if (hasOauthConfig() != other.hasOauthConfig()) return false;
if (hasOauthConfig()) {
if (!getOauthConfig().equals(other.getOauthConfig())) return false;
}
if (serviceAgentAuth_ != other.serviceAgentAuth_) return false;
if (webhookType_ != other.webhookType_) return false;
if (httpMethod_ != other.httpMethod_) return false;
if (!getRequestBody().equals(other.getRequestBody())) return false;
if (!internalGetParameterMapping().equals(other.internalGetParameterMapping())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + URI_FIELD_NUMBER;
hash = (53 * hash) + getUri().hashCode();
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
hash = (53 * hash) + getUsername().hashCode();
hash = (37 * hash) + PASSWORD_FIELD_NUMBER;
hash = (53 * hash) + getPassword().hashCode();
if (!internalGetRequestHeaders().getMap().isEmpty()) {
hash = (37 * hash) + REQUEST_HEADERS_FIELD_NUMBER;
hash = (53 * hash) + internalGetRequestHeaders().hashCode();
}
if (getAllowedCaCertsCount() > 0) {
hash = (37 * hash) + ALLOWED_CA_CERTS_FIELD_NUMBER;
hash = (53 * hash) + getAllowedCaCertsList().hashCode();
}
if (hasOauthConfig()) {
hash = (37 * hash) + OAUTH_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getOauthConfig().hashCode();
}
hash = (37 * hash) + SERVICE_AGENT_AUTH_FIELD_NUMBER;
hash = (53 * hash) + serviceAgentAuth_;
hash = (37 * hash) + WEBHOOK_TYPE_FIELD_NUMBER;
hash = (53 * hash) + webhookType_;
hash = (37 * hash) + HTTP_METHOD_FIELD_NUMBER;
hash = (53 * hash) + httpMethod_;
hash = (37 * hash) + REQUEST_BODY_FIELD_NUMBER;
hash = (53 * hash) + getRequestBody().hashCode();
if (!internalGetParameterMapping().getMap().isEmpty()) {
hash = (37 * hash) + PARAMETER_MAPPING_FIELD_NUMBER;
hash = (53 * hash) + internalGetParameterMapping().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Represents configuration for a generic web service.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService)
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 4:
return internalGetRequestHeaders();
case 9:
return internalGetParameterMapping();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 4:
return internalGetMutableRequestHeaders();
case 9:
return internalGetMutableParameterMapping();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.class,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getOauthConfigFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
uri_ = "";
username_ = "";
password_ = "";
internalGetMutableRequestHeaders().clear();
allowedCaCerts_ = emptyList(com.google.protobuf.ByteString.class);
oauthConfig_ = null;
if (oauthConfigBuilder_ != null) {
oauthConfigBuilder_.dispose();
oauthConfigBuilder_ = null;
}
serviceAgentAuth_ = 0;
webhookType_ = 0;
httpMethod_ = 0;
requestBody_ = "";
internalGetMutableParameterMapping().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_GenericWebService_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService build() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService result =
new com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.uri_ = uri_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.username_ = username_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.password_ = password_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.requestHeaders_ = internalGetRequestHeaders();
result.requestHeaders_.makeImmutable();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
allowedCaCerts_.makeImmutable();
result.allowedCaCerts_ = allowedCaCerts_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.oauthConfig_ =
oauthConfigBuilder_ == null ? oauthConfig_ : oauthConfigBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.serviceAgentAuth_ = serviceAgentAuth_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.webhookType_ = webhookType_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.httpMethod_ = httpMethod_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.requestBody_ = requestBody_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.parameterMapping_ = internalGetParameterMapping();
result.parameterMapping_.makeImmutable();
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.getDefaultInstance()) return this;
if (!other.getUri().isEmpty()) {
uri_ = other.uri_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getUsername().isEmpty()) {
username_ = other.username_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getPassword().isEmpty()) {
password_ = other.password_;
bitField0_ |= 0x00000004;
onChanged();
}
internalGetMutableRequestHeaders().mergeFrom(other.internalGetRequestHeaders());
bitField0_ |= 0x00000008;
if (!other.allowedCaCerts_.isEmpty()) {
if (allowedCaCerts_.isEmpty()) {
allowedCaCerts_ = other.allowedCaCerts_;
allowedCaCerts_.makeImmutable();
bitField0_ |= 0x00000010;
} else {
ensureAllowedCaCertsIsMutable();
allowedCaCerts_.addAll(other.allowedCaCerts_);
}
onChanged();
}
if (other.hasOauthConfig()) {
mergeOauthConfig(other.getOauthConfig());
}
if (other.serviceAgentAuth_ != 0) {
setServiceAgentAuthValue(other.getServiceAgentAuthValue());
}
if (other.webhookType_ != 0) {
setWebhookTypeValue(other.getWebhookTypeValue());
}
if (other.httpMethod_ != 0) {
setHttpMethodValue(other.getHttpMethodValue());
}
if (!other.getRequestBody().isEmpty()) {
requestBody_ = other.requestBody_;
bitField0_ |= 0x00000200;
onChanged();
}
internalGetMutableParameterMapping().mergeFrom(other.internalGetParameterMapping());
bitField0_ |= 0x00000400;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
uri_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
username_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
password_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
com.google.protobuf.MapEntry
requestHeaders__ =
input.readMessage(
RequestHeadersDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableRequestHeaders()
.getMutableMap()
.put(requestHeaders__.getKey(), requestHeaders__.getValue());
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
com.google.protobuf.ByteString v = input.readBytes();
ensureAllowedCaCertsIsMutable();
allowedCaCerts_.add(v);
break;
} // case 42
case 48:
{
webhookType_ = input.readEnum();
bitField0_ |= 0x00000080;
break;
} // case 48
case 56:
{
httpMethod_ = input.readEnum();
bitField0_ |= 0x00000100;
break;
} // case 56
case 66:
{
requestBody_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000200;
break;
} // case 66
case 74:
{
com.google.protobuf.MapEntry
parameterMapping__ =
input.readMessage(
ParameterMappingDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableParameterMapping()
.getMutableMap()
.put(parameterMapping__.getKey(), parameterMapping__.getValue());
bitField0_ |= 0x00000400;
break;
} // case 74
case 90:
{
input.readMessage(getOauthConfigFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 90
case 96:
{
serviceAgentAuth_ = input.readEnum();
bitField0_ |= 0x00000040;
break;
} // case 96
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object uri_ = "";
/**
*
*
*
* Required. The webhook URI for receiving POST requests. It must use https
* protocol.
*
*
* string uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The uri.
*/
public java.lang.String getUri() {
java.lang.Object ref = uri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The webhook URI for receiving POST requests. It must use https
* protocol.
*
*
* string uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for uri.
*/
public com.google.protobuf.ByteString getUriBytes() {
java.lang.Object ref = uri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
uri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The webhook URI for receiving POST requests. It must use https
* protocol.
*
*
* string uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The uri to set.
* @return This builder for chaining.
*/
public Builder setUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uri_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The webhook URI for receiving POST requests. It must use https
* protocol.
*
*
* string uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearUri() {
uri_ = getDefaultInstance().getUri();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The webhook URI for receiving POST requests. It must use https
* protocol.
*
*
* string uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for uri to set.
* @return This builder for chaining.
*/
public Builder setUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uri_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object username_ = "";
/**
*
*
*
* The user name for HTTP Basic authentication.
*
*
* string username = 2 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.username is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=187
* @return The username.
*/
@java.lang.Deprecated
public java.lang.String getUsername() {
java.lang.Object ref = username_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
username_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The user name for HTTP Basic authentication.
*
*
* string username = 2 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.username is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=187
* @return The bytes for username.
*/
@java.lang.Deprecated
public com.google.protobuf.ByteString getUsernameBytes() {
java.lang.Object ref = username_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
username_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The user name for HTTP Basic authentication.
*
*
* string username = 2 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.username is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=187
* @param value The username to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder setUsername(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
username_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The user name for HTTP Basic authentication.
*
*
* string username = 2 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.username is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=187
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder clearUsername() {
username_ = getDefaultInstance().getUsername();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The user name for HTTP Basic authentication.
*
*
* string username = 2 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.username is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=187
* @param value The bytes for username to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder setUsernameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
username_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object password_ = "";
/**
*
*
*
* The password for HTTP Basic authentication.
*
*
* string password = 3 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.password is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=190
* @return The password.
*/
@java.lang.Deprecated
public java.lang.String getPassword() {
java.lang.Object ref = password_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
password_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The password for HTTP Basic authentication.
*
*
* string password = 3 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.password is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=190
* @return The bytes for password.
*/
@java.lang.Deprecated
public com.google.protobuf.ByteString getPasswordBytes() {
java.lang.Object ref = password_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
password_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The password for HTTP Basic authentication.
*
*
* string password = 3 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.password is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=190
* @param value The password to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder setPassword(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
password_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The password for HTTP Basic authentication.
*
*
* string password = 3 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.password is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=190
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder clearPassword() {
password_ = getDefaultInstance().getPassword();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* The password for HTTP Basic authentication.
*
*
* string password = 3 [deprecated = true];
*
* @deprecated google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.password is
* deprecated. See google/cloud/dialogflow/cx/v3beta1/webhook.proto;l=190
* @param value The bytes for password to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder setPasswordBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
password_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.MapField requestHeaders_;
private com.google.protobuf.MapField
internalGetRequestHeaders() {
if (requestHeaders_ == null) {
return com.google.protobuf.MapField.emptyMapField(
RequestHeadersDefaultEntryHolder.defaultEntry);
}
return requestHeaders_;
}
private com.google.protobuf.MapField
internalGetMutableRequestHeaders() {
if (requestHeaders_ == null) {
requestHeaders_ =
com.google.protobuf.MapField.newMapField(
RequestHeadersDefaultEntryHolder.defaultEntry);
}
if (!requestHeaders_.isMutable()) {
requestHeaders_ = requestHeaders_.copy();
}
bitField0_ |= 0x00000008;
onChanged();
return requestHeaders_;
}
public int getRequestHeadersCount() {
return internalGetRequestHeaders().getMap().size();
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
@java.lang.Override
public boolean containsRequestHeaders(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetRequestHeaders().getMap().containsKey(key);
}
/** Use {@link #getRequestHeadersMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getRequestHeaders() {
return getRequestHeadersMap();
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
@java.lang.Override
public java.util.Map getRequestHeadersMap() {
return internalGetRequestHeaders().getMap();
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
@java.lang.Override
public /* nullable */ java.lang.String getRequestHeadersOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map =
internalGetRequestHeaders().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
@java.lang.Override
public java.lang.String getRequestHeadersOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map =
internalGetRequestHeaders().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearRequestHeaders() {
bitField0_ = (bitField0_ & ~0x00000008);
internalGetMutableRequestHeaders().getMutableMap().clear();
return this;
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
public Builder removeRequestHeaders(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
internalGetMutableRequestHeaders().getMutableMap().remove(key);
return this;
}
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map getMutableRequestHeaders() {
bitField0_ |= 0x00000008;
return internalGetMutableRequestHeaders().getMutableMap();
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
public Builder putRequestHeaders(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new NullPointerException("map key");
}
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableRequestHeaders().getMutableMap().put(key, value);
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* The HTTP request headers to send together with webhook
* requests.
*
*
* map<string, string> request_headers = 4;
*/
public Builder putAllRequestHeaders(
java.util.Map values) {
internalGetMutableRequestHeaders().getMutableMap().putAll(values);
bitField0_ |= 0x00000008;
return this;
}
private com.google.protobuf.Internal.ProtobufList
allowedCaCerts_ = emptyList(com.google.protobuf.ByteString.class);
private void ensureAllowedCaCertsIsMutable() {
if (!allowedCaCerts_.isModifiable()) {
allowedCaCerts_ = makeMutableCopy(allowedCaCerts_);
}
bitField0_ |= 0x00000010;
}
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the allowedCaCerts.
*/
public java.util.List getAllowedCaCertsList() {
allowedCaCerts_.makeImmutable();
return allowedCaCerts_;
}
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of allowedCaCerts.
*/
public int getAllowedCaCertsCount() {
return allowedCaCerts_.size();
}
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The allowedCaCerts at the given index.
*/
public com.google.protobuf.ByteString getAllowedCaCerts(int index) {
return allowedCaCerts_.get(index);
}
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The allowedCaCerts to set.
* @return This builder for chaining.
*/
public Builder setAllowedCaCerts(int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedCaCertsIsMutable();
allowedCaCerts_.set(index, value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The allowedCaCerts to add.
* @return This builder for chaining.
*/
public Builder addAllowedCaCerts(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedCaCertsIsMutable();
allowedCaCerts_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The allowedCaCerts to add.
* @return This builder for chaining.
*/
public Builder addAllAllowedCaCerts(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureAllowedCaCertsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedCaCerts_);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies a list of allowed custom CA certificates (in DER
* format) for HTTPS verification. This overrides the default SSL trust
* store. If this is empty or unspecified, Dialogflow will use Google's
* default trust store to verify certificates. N.B. Make sure the HTTPS
* server certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* ```
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
* ```
*
*
* repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearAllowedCaCerts() {
allowedCaCerts_ = emptyList(com.google.protobuf.ByteString.class);
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
private com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
oauthConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfigOrBuilder>
oauthConfigBuilder_;
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the oauthConfig field is set.
*/
public boolean hasOauthConfig() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The oauthConfig.
*/
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
getOauthConfig() {
if (oauthConfigBuilder_ == null) {
return oauthConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
.getDefaultInstance()
: oauthConfig_;
} else {
return oauthConfigBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setOauthConfig(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig value) {
if (oauthConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
oauthConfig_ = value;
} else {
oauthConfigBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setOauthConfig(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig.Builder
builderForValue) {
if (oauthConfigBuilder_ == null) {
oauthConfig_ = builderForValue.build();
} else {
oauthConfigBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeOauthConfig(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig value) {
if (oauthConfigBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& oauthConfig_ != null
&& oauthConfig_
!= com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
.getDefaultInstance()) {
getOauthConfigBuilder().mergeFrom(value);
} else {
oauthConfig_ = value;
}
} else {
oauthConfigBuilder_.mergeFrom(value);
}
if (oauthConfig_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearOauthConfig() {
bitField0_ = (bitField0_ & ~0x00000020);
oauthConfig_ = null;
if (oauthConfigBuilder_ != null) {
oauthConfigBuilder_.dispose();
oauthConfigBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig.Builder
getOauthConfigBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getOauthConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfigOrBuilder
getOauthConfigOrBuilder() {
if (oauthConfigBuilder_ != null) {
return oauthConfigBuilder_.getMessageOrBuilder();
} else {
return oauthConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
.getDefaultInstance()
: oauthConfig_;
}
}
/**
*
*
*
* Optional. The OAuth configuration of the webhook. If specified,
* Dialogflow will initiate the OAuth client credential flow to exchange an
* access token from the 3rd party platform and put it in the auth header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfigOrBuilder>
getOauthConfigFieldBuilder() {
if (oauthConfigBuilder_ == null) {
oauthConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.OAuthConfig
.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.OAuthConfigOrBuilder>(getOauthConfig(), getParentForChildren(), isClean());
oauthConfig_ = null;
}
return oauthConfigBuilder_;
}
private int serviceAgentAuth_ = 0;
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for serviceAgentAuth.
*/
@java.lang.Override
public int getServiceAgentAuthValue() {
return serviceAgentAuth_;
}
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for serviceAgentAuth to set.
* @return This builder for chaining.
*/
public Builder setServiceAgentAuthValue(int value) {
serviceAgentAuth_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The serviceAgentAuth.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth
getServiceAgentAuth() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth result =
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth
.forNumber(serviceAgentAuth_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth
.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The serviceAgentAuth to set.
* @return This builder for chaining.
*/
public Builder setServiceAgentAuth(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
serviceAgentAuth_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearServiceAgentAuth() {
bitField0_ = (bitField0_ & ~0x00000040);
serviceAgentAuth_ = 0;
onChanged();
return this;
}
private int webhookType_ = 0;
/**
*
*
*
* Optional. Type of the webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for webhookType.
*/
@java.lang.Override
public int getWebhookTypeValue() {
return webhookType_;
}
/**
*
*
*
* Optional. Type of the webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for webhookType to set.
* @return This builder for chaining.
*/
public Builder setWebhookTypeValue(int value) {
webhookType_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Optional. Type of the webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The webhookType.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType
getWebhookType() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType result =
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType.forNumber(
webhookType_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType
.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Type of the webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The webhookType to set.
* @return This builder for chaining.
*/
public Builder setWebhookType(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
webhookType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Type of the webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearWebhookType() {
bitField0_ = (bitField0_ & ~0x00000080);
webhookType_ = 0;
onChanged();
return this;
}
private int httpMethod_ = 0;
/**
*
*
*
* Optional. HTTP method for the flexible webhook calls. Standard webhook
* always uses POST.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for httpMethod.
*/
@java.lang.Override
public int getHttpMethodValue() {
return httpMethod_;
}
/**
*
*
*
* Optional. HTTP method for the flexible webhook calls. Standard webhook
* always uses POST.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for httpMethod to set.
* @return This builder for chaining.
*/
public Builder setHttpMethodValue(int value) {
httpMethod_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Optional. HTTP method for the flexible webhook calls. Standard webhook
* always uses POST.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The httpMethod.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod
getHttpMethod() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod result =
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod.forNumber(
httpMethod_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod
.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. HTTP method for the flexible webhook calls. Standard webhook
* always uses POST.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The httpMethod to set.
* @return This builder for chaining.
*/
public Builder setHttpMethod(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000100;
httpMethod_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. HTTP method for the flexible webhook calls. Standard webhook
* always uses POST.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearHttpMethod() {
bitField0_ = (bitField0_ & ~0x00000100);
httpMethod_ = 0;
onChanged();
return this;
}
private java.lang.Object requestBody_ = "";
/**
*
*
*
* Optional. Defines a custom JSON object as request body to send to
* flexible webhook.
*
*
* string request_body = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The requestBody.
*/
public java.lang.String getRequestBody() {
java.lang.Object ref = requestBody_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
requestBody_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. Defines a custom JSON object as request body to send to
* flexible webhook.
*
*
* string request_body = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for requestBody.
*/
public com.google.protobuf.ByteString getRequestBodyBytes() {
java.lang.Object ref = requestBody_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
requestBody_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. Defines a custom JSON object as request body to send to
* flexible webhook.
*
*
* string request_body = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The requestBody to set.
* @return This builder for chaining.
*/
public Builder setRequestBody(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
requestBody_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Optional. Defines a custom JSON object as request body to send to
* flexible webhook.
*
*
* string request_body = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearRequestBody() {
requestBody_ = getDefaultInstance().getRequestBody();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
*
*
*
* Optional. Defines a custom JSON object as request body to send to
* flexible webhook.
*
*
* string request_body = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for requestBody to set.
* @return This builder for chaining.
*/
public Builder setRequestBodyBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
requestBody_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
private com.google.protobuf.MapField parameterMapping_;
private com.google.protobuf.MapField
internalGetParameterMapping() {
if (parameterMapping_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ParameterMappingDefaultEntryHolder.defaultEntry);
}
return parameterMapping_;
}
private com.google.protobuf.MapField
internalGetMutableParameterMapping() {
if (parameterMapping_ == null) {
parameterMapping_ =
com.google.protobuf.MapField.newMapField(
ParameterMappingDefaultEntryHolder.defaultEntry);
}
if (!parameterMapping_.isMutable()) {
parameterMapping_ = parameterMapping_.copy();
}
bitField0_ |= 0x00000400;
onChanged();
return parameterMapping_;
}
public int getParameterMappingCount() {
return internalGetParameterMapping().getMap().size();
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public boolean containsParameterMapping(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetParameterMapping().getMap().containsKey(key);
}
/** Use {@link #getParameterMappingMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getParameterMapping() {
return getParameterMappingMap();
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.Map getParameterMappingMap() {
return internalGetParameterMapping().getMap();
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public /* nullable */ java.lang.String getParameterMappingOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map =
internalGetParameterMapping().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.lang.String getParameterMappingOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map =
internalGetParameterMapping().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearParameterMapping() {
bitField0_ = (bitField0_ & ~0x00000400);
internalGetMutableParameterMapping().getMutableMap().clear();
return this;
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeParameterMapping(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
internalGetMutableParameterMapping().getMutableMap().remove(key);
return this;
}
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map getMutableParameterMapping() {
bitField0_ |= 0x00000400;
return internalGetMutableParameterMapping().getMutableMap();
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder putParameterMapping(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new NullPointerException("map key");
}
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableParameterMapping().getMutableMap().put(key, value);
bitField0_ |= 0x00000400;
return this;
}
/**
*
*
*
* Optional. Maps the values extracted from specific fields of the flexible
* webhook response into session parameters.
* - Key: session parameter name
* - Value: field path in the webhook response
*
*
*
* map<string, string> parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder putAllParameterMapping(
java.util.Map values) {
internalGetMutableParameterMapping().getMutableMap().putAll(values);
bitField0_ |= 0x00000400;
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService)
private static final com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public GenericWebService parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ServiceDirectoryConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `Location ID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The service.
*/
java.lang.String getService();
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `Location ID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for service.
*/
com.google.protobuf.ByteString getServiceBytes();
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*
* @return Whether the genericWebService field is set.
*/
boolean hasGenericWebService();
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*
* @return The genericWebService.
*/
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService getGenericWebService();
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder
getGenericWebServiceOrBuilder();
}
/**
*
*
*
* Represents configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig}
*/
public static final class ServiceDirectoryConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig)
ServiceDirectoryConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use ServiceDirectoryConfig.newBuilder() to construct.
private ServiceDirectoryConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ServiceDirectoryConfig() {
service_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ServiceDirectoryConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_ServiceDirectoryConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_ServiceDirectoryConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.Builder.class);
}
private int bitField0_;
public static final int SERVICE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object service_ = "";
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `Location ID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The service.
*/
@java.lang.Override
public java.lang.String getService() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
service_ = s;
return s;
}
}
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `Location ID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for service.
*/
@java.lang.Override
public com.google.protobuf.ByteString getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int GENERIC_WEB_SERVICE_FIELD_NUMBER = 2;
private com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService genericWebService_;
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*
* @return Whether the genericWebService field is set.
*/
@java.lang.Override
public boolean hasGenericWebService() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*
* @return The genericWebService.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService getGenericWebService() {
return genericWebService_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.getDefaultInstance()
: genericWebService_;
}
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder
getGenericWebServiceOrBuilder() {
return genericWebService_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.getDefaultInstance()
: genericWebService_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getGenericWebService());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGenericWebService());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig other =
(com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig) obj;
if (!getService().equals(other.getService())) return false;
if (hasGenericWebService() != other.hasGenericWebService()) return false;
if (hasGenericWebService()) {
if (!getGenericWebService().equals(other.getGenericWebService())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getService().hashCode();
if (hasGenericWebService()) {
hash = (37 * hash) + GENERIC_WEB_SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getGenericWebService().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Represents configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig)
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_ServiceDirectoryConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_ServiceDirectoryConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.Builder
.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getGenericWebServiceFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
service_ = "";
genericWebService_ = null;
if (genericWebServiceBuilder_ != null) {
genericWebServiceBuilder_.dispose();
genericWebServiceBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_ServiceDirectoryConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig build() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig result =
new com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.service_ = service_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.genericWebService_ =
genericWebServiceBuilder_ == null
? genericWebService_
: genericWebServiceBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
.getDefaultInstance()) return this;
if (!other.getService().isEmpty()) {
service_ = other.service_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasGenericWebService()) {
mergeGenericWebService(other.getGenericWebService());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
service_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
input.readMessage(
getGenericWebServiceFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object service_ = "";
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `Location ID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The service.
*/
public java.lang.String getService() {
java.lang.Object ref = service_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
service_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `Location ID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for service.
*/
public com.google.protobuf.ByteString getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `Location ID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @param value The service to set.
* @return This builder for chaining.
*/
public Builder setService(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
service_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `Location ID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return This builder for chaining.
*/
public Builder clearService() {
service_ = getDefaultInstance().getService();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `Location ID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @param value The bytes for service to set.
* @return This builder for chaining.
*/
public Builder setServiceBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
service_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService genericWebService_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder>
genericWebServiceBuilder_;
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*
* @return Whether the genericWebService field is set.
*/
public boolean hasGenericWebService() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*
* @return The genericWebService.
*/
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
getGenericWebService() {
if (genericWebServiceBuilder_ == null) {
return genericWebService_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.getDefaultInstance()
: genericWebService_;
} else {
return genericWebServiceBuilder_.getMessage();
}
}
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*/
public Builder setGenericWebService(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService value) {
if (genericWebServiceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
genericWebService_ = value;
} else {
genericWebServiceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*/
public Builder setGenericWebService(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder
builderForValue) {
if (genericWebServiceBuilder_ == null) {
genericWebService_ = builderForValue.build();
} else {
genericWebServiceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*/
public Builder mergeGenericWebService(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService value) {
if (genericWebServiceBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& genericWebService_ != null
&& genericWebService_
!= com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.getDefaultInstance()) {
getGenericWebServiceBuilder().mergeFrom(value);
} else {
genericWebService_ = value;
}
} else {
genericWebServiceBuilder_.mergeFrom(value);
}
if (genericWebService_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*/
public Builder clearGenericWebService() {
bitField0_ = (bitField0_ & ~0x00000002);
genericWebService_ = null;
if (genericWebServiceBuilder_ != null) {
genericWebServiceBuilder_.dispose();
genericWebServiceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder
getGenericWebServiceBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getGenericWebServiceFieldBuilder().getBuilder();
}
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder
getGenericWebServiceOrBuilder() {
if (genericWebServiceBuilder_ != null) {
return genericWebServiceBuilder_.getMessageOrBuilder();
} else {
return genericWebService_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.getDefaultInstance()
: genericWebService_;
}
}
/**
*
*
*
* Generic Service configuration of this webhook.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 2;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder>
getGenericWebServiceFieldBuilder() {
if (genericWebServiceBuilder_ == null) {
genericWebServiceBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder>(
getGenericWebService(), getParentForChildren(), isClean());
genericWebService_ = null;
}
return genericWebServiceBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig)
private static final com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ServiceDirectoryConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
private int webhookCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object webhook_;
public enum WebhookCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
GENERIC_WEB_SERVICE(4),
SERVICE_DIRECTORY(7),
WEBHOOK_NOT_SET(0);
private final int value;
private WebhookCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static WebhookCase valueOf(int value) {
return forNumber(value);
}
public static WebhookCase forNumber(int value) {
switch (value) {
case 4:
return GENERIC_WEB_SERVICE;
case 7:
return SERVICE_DIRECTORY;
case 0:
return WEBHOOK_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public WebhookCase getWebhookCase() {
return WebhookCase.forNumber(webhookCase_);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* The unique identifier of the webhook.
* Required for the
* [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook]
* method.
* [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook]
* populates the name automatically. Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
*
*
* string name = 1;
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
*
*
* The unique identifier of the webhook.
* Required for the
* [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook]
* method.
* [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook]
* populates the name automatically. Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* Required. The human-readable name of the webhook, unique within the agent.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The displayName.
*/
@java.lang.Override
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
}
}
/**
*
*
*
* Required. The human-readable name of the webhook, unique within the agent.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for displayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int GENERIC_WEB_SERVICE_FIELD_NUMBER = 4;
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*
* @return Whether the genericWebService field is set.
*/
@java.lang.Override
public boolean hasGenericWebService() {
return webhookCase_ == 4;
}
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*
* @return The genericWebService.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService getGenericWebService() {
if (webhookCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) webhook_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.getDefaultInstance();
}
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder
getGenericWebServiceOrBuilder() {
if (webhookCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) webhook_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.getDefaultInstance();
}
public static final int SERVICE_DIRECTORY_FIELD_NUMBER = 7;
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*
* @return Whether the serviceDirectory field is set.
*/
@java.lang.Override
public boolean hasServiceDirectory() {
return webhookCase_ == 7;
}
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*
* @return The serviceDirectory.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
getServiceDirectory() {
if (webhookCase_ == 7) {
return (com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig) webhook_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
.getDefaultInstance();
}
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfigOrBuilder
getServiceDirectoryOrBuilder() {
if (webhookCase_ == 7) {
return (com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig) webhook_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
.getDefaultInstance();
}
public static final int TIMEOUT_FIELD_NUMBER = 6;
private com.google.protobuf.Duration timeout_;
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*
* @return Whether the timeout field is set.
*/
@java.lang.Override
public boolean hasTimeout() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*
* @return The timeout.
*/
@java.lang.Override
public com.google.protobuf.Duration getTimeout() {
return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
}
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() {
return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
}
public static final int DISABLED_FIELD_NUMBER = 5;
private boolean disabled_ = false;
/**
*
*
*
* Indicates whether the webhook is disabled.
*
*
* bool disabled = 5;
*
* @return The disabled.
*/
@java.lang.Override
public boolean getDisabled() {
return disabled_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
if (webhookCase_ == 4) {
output.writeMessage(
4, (com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) webhook_);
}
if (disabled_ != false) {
output.writeBool(5, disabled_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(6, getTimeout());
}
if (webhookCase_ == 7) {
output.writeMessage(
7, (com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig) webhook_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
if (webhookCase_ == 4) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4, (com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) webhook_);
}
if (disabled_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, disabled_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTimeout());
}
if (webhookCase_ == 7) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
7, (com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig) webhook_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Webhook)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Webhook other =
(com.google.cloud.dialogflow.cx.v3beta1.Webhook) obj;
if (!getName().equals(other.getName())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (hasTimeout() != other.hasTimeout()) return false;
if (hasTimeout()) {
if (!getTimeout().equals(other.getTimeout())) return false;
}
if (getDisabled() != other.getDisabled()) return false;
if (!getWebhookCase().equals(other.getWebhookCase())) return false;
switch (webhookCase_) {
case 4:
if (!getGenericWebService().equals(other.getGenericWebService())) return false;
break;
case 7:
if (!getServiceDirectory().equals(other.getServiceDirectory())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
if (hasTimeout()) {
hash = (37 * hash) + TIMEOUT_FIELD_NUMBER;
hash = (53 * hash) + getTimeout().hashCode();
}
hash = (37 * hash) + DISABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled());
switch (webhookCase_) {
case 4:
hash = (37 * hash) + GENERIC_WEB_SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getGenericWebService().hashCode();
break;
case 7:
hash = (37 * hash) + SERVICE_DIRECTORY_FIELD_NUMBER;
hash = (53 * hash) + getServiceDirectory().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.Webhook prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Webhooks host the developer's business logic. During a session, webhooks
* allow the developer to use the data extracted by Dialogflow's natural
* language processing to generate dynamic responses, validate collected data,
* or trigger actions on the backend.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Webhook}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Webhook)
com.google.cloud.dialogflow.cx.v3beta1.WebhookOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.class,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Webhook.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getTimeoutFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
displayName_ = "";
if (genericWebServiceBuilder_ != null) {
genericWebServiceBuilder_.clear();
}
if (serviceDirectoryBuilder_ != null) {
serviceDirectoryBuilder_.clear();
}
timeout_ = null;
if (timeoutBuilder_ != null) {
timeoutBuilder_.dispose();
timeoutBuilder_ = null;
}
disabled_ = false;
webhookCase_ = 0;
webhook_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.WebhookProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Webhook_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook build() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Webhook result =
new com.google.cloud.dialogflow.cx.v3beta1.Webhook(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Webhook result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.displayName_ = displayName_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000010) != 0)) {
result.timeout_ = timeoutBuilder_ == null ? timeout_ : timeoutBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.disabled_ = disabled_;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.Webhook result) {
result.webhookCase_ = webhookCase_;
result.webhook_ = this.webhook_;
if (webhookCase_ == 4 && genericWebServiceBuilder_ != null) {
result.webhook_ = genericWebServiceBuilder_.build();
}
if (webhookCase_ == 7 && serviceDirectoryBuilder_ != null) {
result.webhook_ = serviceDirectoryBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Webhook) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Webhook) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Webhook other) {
if (other == com.google.cloud.dialogflow.cx.v3beta1.Webhook.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasTimeout()) {
mergeTimeout(other.getTimeout());
}
if (other.getDisabled() != false) {
setDisabled(other.getDisabled());
}
switch (other.getWebhookCase()) {
case GENERIC_WEB_SERVICE:
{
mergeGenericWebService(other.getGenericWebService());
break;
}
case SERVICE_DIRECTORY:
{
mergeServiceDirectory(other.getServiceDirectory());
break;
}
case WEBHOOK_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 34:
{
input.readMessage(
getGenericWebServiceFieldBuilder().getBuilder(), extensionRegistry);
webhookCase_ = 4;
break;
} // case 34
case 40:
{
disabled_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 40
case 50:
{
input.readMessage(getTimeoutFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 50
case 58:
{
input.readMessage(
getServiceDirectoryFieldBuilder().getBuilder(), extensionRegistry);
webhookCase_ = 7;
break;
} // case 58
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int webhookCase_ = 0;
private java.lang.Object webhook_;
public WebhookCase getWebhookCase() {
return WebhookCase.forNumber(webhookCase_);
}
public Builder clearWebhook() {
webhookCase_ = 0;
webhook_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* The unique identifier of the webhook.
* Required for the
* [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook]
* method.
* [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook]
* populates the name automatically. Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
*
*
* string name = 1;
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The unique identifier of the webhook.
* Required for the
* [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook]
* method.
* [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook]
* populates the name automatically. Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The unique identifier of the webhook.
* Required for the
* [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook]
* method.
* [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook]
* populates the name automatically. Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
*
*
* string name = 1;
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The unique identifier of the webhook.
* Required for the
* [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook]
* method.
* [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook]
* populates the name automatically. Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The unique identifier of the webhook.
* Required for the
* [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook]
* method.
* [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook]
* populates the name automatically. Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
*
*
* string name = 1;
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
* Required. The human-readable name of the webhook, unique within the agent.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The human-readable name of the webhook, unique within the agent.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The human-readable name of the webhook, unique within the agent.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The human-readable name of the webhook, unique within the agent.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. The human-readable name of the webhook, unique within the agent.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder>
genericWebServiceBuilder_;
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*
* @return Whether the genericWebService field is set.
*/
@java.lang.Override
public boolean hasGenericWebService() {
return webhookCase_ == 4;
}
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*
* @return The genericWebService.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService getGenericWebService() {
if (genericWebServiceBuilder_ == null) {
if (webhookCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) webhook_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.getDefaultInstance();
} else {
if (webhookCase_ == 4) {
return genericWebServiceBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.getDefaultInstance();
}
}
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*/
public Builder setGenericWebService(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService value) {
if (genericWebServiceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
webhook_ = value;
onChanged();
} else {
genericWebServiceBuilder_.setMessage(value);
}
webhookCase_ = 4;
return this;
}
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*/
public Builder setGenericWebService(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder builderForValue) {
if (genericWebServiceBuilder_ == null) {
webhook_ = builderForValue.build();
onChanged();
} else {
genericWebServiceBuilder_.setMessage(builderForValue.build());
}
webhookCase_ = 4;
return this;
}
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*/
public Builder mergeGenericWebService(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService value) {
if (genericWebServiceBuilder_ == null) {
if (webhookCase_ == 4
&& webhook_
!= com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.getDefaultInstance()) {
webhook_ =
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.newBuilder(
(com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) webhook_)
.mergeFrom(value)
.buildPartial();
} else {
webhook_ = value;
}
onChanged();
} else {
if (webhookCase_ == 4) {
genericWebServiceBuilder_.mergeFrom(value);
} else {
genericWebServiceBuilder_.setMessage(value);
}
}
webhookCase_ = 4;
return this;
}
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*/
public Builder clearGenericWebService() {
if (genericWebServiceBuilder_ == null) {
if (webhookCase_ == 4) {
webhookCase_ = 0;
webhook_ = null;
onChanged();
}
} else {
if (webhookCase_ == 4) {
webhookCase_ = 0;
webhook_ = null;
}
genericWebServiceBuilder_.clear();
}
return this;
}
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder
getGenericWebServiceBuilder() {
return getGenericWebServiceFieldBuilder().getBuilder();
}
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder
getGenericWebServiceOrBuilder() {
if ((webhookCase_ == 4) && (genericWebServiceBuilder_ != null)) {
return genericWebServiceBuilder_.getMessageOrBuilder();
} else {
if (webhookCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) webhook_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService
.getDefaultInstance();
}
}
/**
*
*
*
* Configuration for a generic web service.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService generic_web_service = 4;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder>
getGenericWebServiceFieldBuilder() {
if (genericWebServiceBuilder_ == null) {
if (!(webhookCase_ == 4)) {
webhook_ =
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.getDefaultInstance();
}
genericWebServiceBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebServiceOrBuilder>(
(com.google.cloud.dialogflow.cx.v3beta1.Webhook.GenericWebService) webhook_,
getParentForChildren(),
isClean());
webhook_ = null;
}
webhookCase_ = 4;
onChanged();
return genericWebServiceBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfigOrBuilder>
serviceDirectoryBuilder_;
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*
* @return Whether the serviceDirectory field is set.
*/
@java.lang.Override
public boolean hasServiceDirectory() {
return webhookCase_ == 7;
}
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*
* @return The serviceDirectory.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
getServiceDirectory() {
if (serviceDirectoryBuilder_ == null) {
if (webhookCase_ == 7) {
return (com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig) webhook_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
.getDefaultInstance();
} else {
if (webhookCase_ == 7) {
return serviceDirectoryBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
.getDefaultInstance();
}
}
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*/
public Builder setServiceDirectory(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig value) {
if (serviceDirectoryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
webhook_ = value;
onChanged();
} else {
serviceDirectoryBuilder_.setMessage(value);
}
webhookCase_ = 7;
return this;
}
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*/
public Builder setServiceDirectory(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.Builder
builderForValue) {
if (serviceDirectoryBuilder_ == null) {
webhook_ = builderForValue.build();
onChanged();
} else {
serviceDirectoryBuilder_.setMessage(builderForValue.build());
}
webhookCase_ = 7;
return this;
}
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*/
public Builder mergeServiceDirectory(
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig value) {
if (serviceDirectoryBuilder_ == null) {
if (webhookCase_ == 7
&& webhook_
!= com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
.getDefaultInstance()) {
webhook_ =
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.newBuilder(
(com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig)
webhook_)
.mergeFrom(value)
.buildPartial();
} else {
webhook_ = value;
}
onChanged();
} else {
if (webhookCase_ == 7) {
serviceDirectoryBuilder_.mergeFrom(value);
} else {
serviceDirectoryBuilder_.setMessage(value);
}
}
webhookCase_ = 7;
return this;
}
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*/
public Builder clearServiceDirectory() {
if (serviceDirectoryBuilder_ == null) {
if (webhookCase_ == 7) {
webhookCase_ = 0;
webhook_ = null;
onChanged();
}
} else {
if (webhookCase_ == 7) {
webhookCase_ = 0;
webhook_ = null;
}
serviceDirectoryBuilder_.clear();
}
return this;
}
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.Builder
getServiceDirectoryBuilder() {
return getServiceDirectoryFieldBuilder().getBuilder();
}
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfigOrBuilder
getServiceDirectoryOrBuilder() {
if ((webhookCase_ == 7) && (serviceDirectoryBuilder_ != null)) {
return serviceDirectoryBuilder_.getMessageOrBuilder();
} else {
if (webhookCase_ == 7) {
return (com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig) webhook_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
.getDefaultInstance();
}
}
/**
*
*
*
* Configuration for a [Service
* Directory](https://cloud.google.com/service-directory) service.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig service_directory = 7;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfigOrBuilder>
getServiceDirectoryFieldBuilder() {
if (serviceDirectoryBuilder_ == null) {
if (!(webhookCase_ == 7)) {
webhook_ =
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig
.getDefaultInstance();
}
serviceDirectoryBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfigOrBuilder>(
(com.google.cloud.dialogflow.cx.v3beta1.Webhook.ServiceDirectoryConfig) webhook_,
getParentForChildren(),
isClean());
webhook_ = null;
}
webhookCase_ = 7;
onChanged();
return serviceDirectoryBuilder_;
}
private com.google.protobuf.Duration timeout_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
timeoutBuilder_;
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*
* @return Whether the timeout field is set.
*/
public boolean hasTimeout() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*
* @return The timeout.
*/
public com.google.protobuf.Duration getTimeout() {
if (timeoutBuilder_ == null) {
return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
} else {
return timeoutBuilder_.getMessage();
}
}
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*/
public Builder setTimeout(com.google.protobuf.Duration value) {
if (timeoutBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
timeout_ = value;
} else {
timeoutBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*/
public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) {
if (timeoutBuilder_ == null) {
timeout_ = builderForValue.build();
} else {
timeoutBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*/
public Builder mergeTimeout(com.google.protobuf.Duration value) {
if (timeoutBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)
&& timeout_ != null
&& timeout_ != com.google.protobuf.Duration.getDefaultInstance()) {
getTimeoutBuilder().mergeFrom(value);
} else {
timeout_ = value;
}
} else {
timeoutBuilder_.mergeFrom(value);
}
if (timeout_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*/
public Builder clearTimeout() {
bitField0_ = (bitField0_ & ~0x00000010);
timeout_ = null;
if (timeoutBuilder_ != null) {
timeoutBuilder_.dispose();
timeoutBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*/
public com.google.protobuf.Duration.Builder getTimeoutBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getTimeoutFieldBuilder().getBuilder();
}
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*/
public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() {
if (timeoutBuilder_ != null) {
return timeoutBuilder_.getMessageOrBuilder();
} else {
return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
}
}
/**
*
*
*
* Webhook execution timeout. Execution is considered failed if Dialogflow
* doesn't receive a response from webhook at the end of the timeout period.
* Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
*
*
* .google.protobuf.Duration timeout = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
getTimeoutFieldBuilder() {
if (timeoutBuilder_ == null) {
timeoutBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>(
getTimeout(), getParentForChildren(), isClean());
timeout_ = null;
}
return timeoutBuilder_;
}
private boolean disabled_;
/**
*
*
*
* Indicates whether the webhook is disabled.
*
*
* bool disabled = 5;
*
* @return The disabled.
*/
@java.lang.Override
public boolean getDisabled() {
return disabled_;
}
/**
*
*
*
* Indicates whether the webhook is disabled.
*
*
* bool disabled = 5;
*
* @param value The disabled to set.
* @return This builder for chaining.
*/
public Builder setDisabled(boolean value) {
disabled_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Indicates whether the webhook is disabled.
*
*
* bool disabled = 5;
*
* @return This builder for chaining.
*/
public Builder clearDisabled() {
bitField0_ = (bitField0_ & ~0x00000020);
disabled_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Webhook)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Webhook)
private static final com.google.cloud.dialogflow.cx.v3beta1.Webhook DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Webhook();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Webhook getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Webhook parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Webhook getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}