All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.events.cloud.eventarc.v1.Trigger Maven / Gradle / Ivy

There is a newer version: 0.15.0
Show newest version
/*
 * Copyright 2023 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/events/cloud/eventarc/v1/data.proto

package com.google.events.cloud.eventarc.v1;

/**
 *
 *
 * 
 * A representation of the trigger resource.
 * 
* * Protobuf type {@code google.events.cloud.eventarc.v1.Trigger} */ public final class Trigger extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.events.cloud.eventarc.v1.Trigger) TriggerOrBuilder { private static final long serialVersionUID = 0L; // Use Trigger.newBuilder() to construct. private Trigger(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Trigger() { name_ = ""; uid_ = ""; eventFilters_ = java.util.Collections.emptyList(); serviceAccount_ = ""; channel_ = ""; eventDataContentType_ = ""; etag_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Trigger(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.events.cloud.eventarc.v1.Data .internal_static_google_events_cloud_eventarc_v1_Trigger_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 12: return internalGetLabels(); case 15: return internalGetConditions(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.events.cloud.eventarc.v1.Data .internal_static_google_events_cloud_eventarc_v1_Trigger_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.events.cloud.eventarc.v1.Trigger.class, com.google.events.cloud.eventarc.v1.Trigger.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Required. The resource name of the trigger. Must be unique within the
   * location of the project and must be in
   * `projects/{project}/locations/{location}/triggers/{trigger}` format.
   * 
* * 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; } } /** * * *
   * Required. The resource name of the trigger. Must be unique within the
   * location of the project and must be in
   * `projects/{project}/locations/{location}/triggers/{trigger}` format.
   * 
* * 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 UID_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object uid_ = ""; /** * * *
   * Output only. Server-assigned unique identifier for the trigger. The value
   * is a UUID4 string and guaranteed to remain unchanged until the resource is
   * deleted.
   * 
* * string uid = 2; * * @return The uid. */ @java.lang.Override public java.lang.String getUid() { java.lang.Object ref = uid_; 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(); uid_ = s; return s; } } /** * * *
   * Output only. Server-assigned unique identifier for the trigger. The value
   * is a UUID4 string and guaranteed to remain unchanged until the resource is
   * deleted.
   * 
* * string uid = 2; * * @return The bytes for uid. */ @java.lang.Override public com.google.protobuf.ByteString getUidBytes() { java.lang.Object ref = uid_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); uid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CREATE_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp createTime_; /** * * *
   * Output only. The creation time.
   * 
* * .google.protobuf.Timestamp create_time = 5; * * @return Whether the createTime field is set. */ @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } /** * * *
   * Output only. The creation time.
   * 
* * .google.protobuf.Timestamp create_time = 5; * * @return The createTime. */ @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** * * *
   * Output only. The creation time.
   * 
* * .google.protobuf.Timestamp create_time = 5; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } public static final int UPDATE_TIME_FIELD_NUMBER = 6; private com.google.protobuf.Timestamp updateTime_; /** * * *
   * Output only. The last-modified time.
   * 
* * .google.protobuf.Timestamp update_time = 6; * * @return Whether the updateTime field is set. */ @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } /** * * *
   * Output only. The last-modified time.
   * 
* * .google.protobuf.Timestamp update_time = 6; * * @return The updateTime. */ @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } /** * * *
   * Output only. The last-modified time.
   * 
* * .google.protobuf.Timestamp update_time = 6; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } public static final int EVENT_FILTERS_FIELD_NUMBER = 8; @SuppressWarnings("serial") private java.util.List eventFilters_; /** * * *
   * Required. Unordered list. The list of filters that applies to event
   * attributes. Only events that match all the provided filters are sent to the
   * destination.
   * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ @java.lang.Override public java.util.List getEventFiltersList() { return eventFilters_; } /** * * *
   * Required. Unordered list. The list of filters that applies to event
   * attributes. Only events that match all the provided filters are sent to the
   * destination.
   * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ @java.lang.Override public java.util.List getEventFiltersOrBuilderList() { return eventFilters_; } /** * * *
   * Required. Unordered list. The list of filters that applies to event
   * attributes. Only events that match all the provided filters are sent to the
   * destination.
   * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ @java.lang.Override public int getEventFiltersCount() { return eventFilters_.size(); } /** * * *
   * Required. Unordered list. The list of filters that applies to event
   * attributes. Only events that match all the provided filters are sent to the
   * destination.
   * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ @java.lang.Override public com.google.events.cloud.eventarc.v1.EventFilter getEventFilters(int index) { return eventFilters_.get(index); } /** * * *
   * Required. Unordered list. The list of filters that applies to event
   * attributes. Only events that match all the provided filters are sent to the
   * destination.
   * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ @java.lang.Override public com.google.events.cloud.eventarc.v1.EventFilterOrBuilder getEventFiltersOrBuilder( int index) { return eventFilters_.get(index); } public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 9; @SuppressWarnings("serial") private volatile java.lang.Object serviceAccount_ = ""; /** * * *
   * Optional. The IAM service account email associated with the trigger. The
   * service account represents the identity of the trigger.
   * The principal who calls this API must have the `iam.serviceAccounts.actAs`
   * permission in the service account. See
   * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
   * for more information.
   * For Cloud Run destinations, this service account is used to generate
   * identity tokens when invoking the service. See
   * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
   * for information on how to invoke authenticated Cloud Run services.
   * To create Audit Log triggers, the service account should also
   * have the `roles/eventarc.eventReceiver` IAM role.
   * 
* * string service_account = 9; * * @return The serviceAccount. */ @java.lang.Override public java.lang.String getServiceAccount() { java.lang.Object ref = serviceAccount_; 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(); serviceAccount_ = s; return s; } } /** * * *
   * Optional. The IAM service account email associated with the trigger. The
   * service account represents the identity of the trigger.
   * The principal who calls this API must have the `iam.serviceAccounts.actAs`
   * permission in the service account. See
   * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
   * for more information.
   * For Cloud Run destinations, this service account is used to generate
   * identity tokens when invoking the service. See
   * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
   * for information on how to invoke authenticated Cloud Run services.
   * To create Audit Log triggers, the service account should also
   * have the `roles/eventarc.eventReceiver` IAM role.
   * 
* * string service_account = 9; * * @return The bytes for serviceAccount. */ @java.lang.Override public com.google.protobuf.ByteString getServiceAccountBytes() { java.lang.Object ref = serviceAccount_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); serviceAccount_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESTINATION_FIELD_NUMBER = 10; private com.google.events.cloud.eventarc.v1.Destination destination_; /** * * *
   * Required. Destination specifies where the events should be sent to.
   * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; * * @return Whether the destination field is set. */ @java.lang.Override public boolean hasDestination() { return destination_ != null; } /** * * *
   * Required. Destination specifies where the events should be sent to.
   * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; * * @return The destination. */ @java.lang.Override public com.google.events.cloud.eventarc.v1.Destination getDestination() { return destination_ == null ? com.google.events.cloud.eventarc.v1.Destination.getDefaultInstance() : destination_; } /** * * *
   * Required. Destination specifies where the events should be sent to.
   * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; */ @java.lang.Override public com.google.events.cloud.eventarc.v1.DestinationOrBuilder getDestinationOrBuilder() { return destination_ == null ? com.google.events.cloud.eventarc.v1.Destination.getDefaultInstance() : destination_; } public static final int TRANSPORT_FIELD_NUMBER = 11; private com.google.events.cloud.eventarc.v1.Transport transport_; /** * * *
   * Optional. To deliver messages, Eventarc might use other Google Cloud
   * products as a transport intermediary. This field contains a reference to
   * that transport intermediary. This information can be used for debugging
   * purposes.
   * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; * * @return Whether the transport field is set. */ @java.lang.Override public boolean hasTransport() { return transport_ != null; } /** * * *
   * Optional. To deliver messages, Eventarc might use other Google Cloud
   * products as a transport intermediary. This field contains a reference to
   * that transport intermediary. This information can be used for debugging
   * purposes.
   * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; * * @return The transport. */ @java.lang.Override public com.google.events.cloud.eventarc.v1.Transport getTransport() { return transport_ == null ? com.google.events.cloud.eventarc.v1.Transport.getDefaultInstance() : transport_; } /** * * *
   * Optional. To deliver messages, Eventarc might use other Google Cloud
   * products as a transport intermediary. This field contains a reference to
   * that transport intermediary. This information can be used for debugging
   * purposes.
   * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; */ @java.lang.Override public com.google.events.cloud.eventarc.v1.TransportOrBuilder getTransportOrBuilder() { return transport_ == null ? com.google.events.cloud.eventarc.v1.Transport.getDefaultInstance() : transport_; } public static final int LABELS_FIELD_NUMBER = 12; private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.events.cloud.eventarc.v1.Data .internal_static_google_events_cloud_eventarc_v1_Trigger_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
   * Optional. User labels attached to the triggers that can be used to group
   * resources.
   * 
* * map<string, string> labels = 12; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
   * Optional. User labels attached to the triggers that can be used to group
   * resources.
   * 
* * map<string, string> labels = 12; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
   * Optional. User labels attached to the triggers that can be used to group
   * resources.
   * 
* * map<string, string> labels = 12; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Optional. User labels attached to the triggers that can be used to group
   * resources.
   * 
* * map<string, string> labels = 12; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int CHANNEL_FIELD_NUMBER = 13; @SuppressWarnings("serial") private volatile java.lang.Object channel_ = ""; /** * * *
   * Optional. The name of the channel associated with the trigger in
   * `projects/{project}/locations/{location}/channels/{channel}` format.
   * You must provide a channel to receive events from Eventarc SaaS partners.
   * 
* * string channel = 13; * * @return The channel. */ @java.lang.Override public java.lang.String getChannel() { java.lang.Object ref = channel_; 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(); channel_ = s; return s; } } /** * * *
   * Optional. The name of the channel associated with the trigger in
   * `projects/{project}/locations/{location}/channels/{channel}` format.
   * You must provide a channel to receive events from Eventarc SaaS partners.
   * 
* * string channel = 13; * * @return The bytes for channel. */ @java.lang.Override public com.google.protobuf.ByteString getChannelBytes() { java.lang.Object ref = channel_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); channel_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONDITIONS_FIELD_NUMBER = 15; private static final class ConditionsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.google.events.cloud.eventarc.v1.StateCondition> defaultEntry = com.google.protobuf.MapEntry . newDefaultInstance( com.google.events.cloud.eventarc.v1.Data .internal_static_google_events_cloud_eventarc_v1_Trigger_ConditionsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.google.events.cloud.eventarc.v1.StateCondition.getDefaultInstance()); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, com.google.events.cloud.eventarc.v1.StateCondition> conditions_; private com.google.protobuf.MapField< java.lang.String, com.google.events.cloud.eventarc.v1.StateCondition> internalGetConditions() { if (conditions_ == null) { return com.google.protobuf.MapField.emptyMapField(ConditionsDefaultEntryHolder.defaultEntry); } return conditions_; } public int getConditionsCount() { return internalGetConditions().getMap().size(); } /** * * *
   * Output only. The reason(s) why a trigger is in FAILED state.
   * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ @java.lang.Override public boolean containsConditions(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetConditions().getMap().containsKey(key); } /** Use {@link #getConditionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getConditions() { return getConditionsMap(); } /** * * *
   * Output only. The reason(s) why a trigger is in FAILED state.
   * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ @java.lang.Override public java.util.Map getConditionsMap() { return internalGetConditions().getMap(); } /** * * *
   * Output only. The reason(s) why a trigger is in FAILED state.
   * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ @java.lang.Override public /* nullable */ com.google.events.cloud.eventarc.v1.StateCondition getConditionsOrDefault( java.lang.String key, /* nullable */ com.google.events.cloud.eventarc.v1.StateCondition defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetConditions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Output only. The reason(s) why a trigger is in FAILED state.
   * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ @java.lang.Override public com.google.events.cloud.eventarc.v1.StateCondition getConditionsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetConditions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int EVENT_DATA_CONTENT_TYPE_FIELD_NUMBER = 16; @SuppressWarnings("serial") private volatile java.lang.Object eventDataContentType_ = ""; /** * * *
   * Optional. EventDataContentType specifies the type of payload in MIME
   * format that is expected from the CloudEvent data field. This is set to
   * `application/json` if the value is not defined.
   * 
* * string event_data_content_type = 16; * * @return The eventDataContentType. */ @java.lang.Override public java.lang.String getEventDataContentType() { java.lang.Object ref = eventDataContentType_; 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(); eventDataContentType_ = s; return s; } } /** * * *
   * Optional. EventDataContentType specifies the type of payload in MIME
   * format that is expected from the CloudEvent data field. This is set to
   * `application/json` if the value is not defined.
   * 
* * string event_data_content_type = 16; * * @return The bytes for eventDataContentType. */ @java.lang.Override public com.google.protobuf.ByteString getEventDataContentTypeBytes() { java.lang.Object ref = eventDataContentType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); eventDataContentType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ETAG_FIELD_NUMBER = 99; @SuppressWarnings("serial") private volatile java.lang.Object etag_ = ""; /** * * *
   * Output only. This checksum is computed by the server based on the value of
   * other fields, and might be sent only on create requests to ensure that the
   * client has an up-to-date value before proceeding.
   * 
* * string etag = 99; * * @return The etag. */ @java.lang.Override public java.lang.String getEtag() { java.lang.Object ref = etag_; 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(); etag_ = s; return s; } } /** * * *
   * Output only. This checksum is computed by the server based on the value of
   * other fields, and might be sent only on create requests to ensure that the
   * client has an up-to-date value before proceeding.
   * 
* * string etag = 99; * * @return The bytes for etag. */ @java.lang.Override public com.google.protobuf.ByteString getEtagBytes() { java.lang.Object ref = etag_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); etag_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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(uid_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); } if (createTime_ != null) { output.writeMessage(5, getCreateTime()); } if (updateTime_ != null) { output.writeMessage(6, getUpdateTime()); } for (int i = 0; i < eventFilters_.size(); i++) { output.writeMessage(8, eventFilters_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, serviceAccount_); } if (destination_ != null) { output.writeMessage(10, getDestination()); } if (transport_ != null) { output.writeMessage(11, getTransport()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 12); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 13, channel_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetConditions(), ConditionsDefaultEntryHolder.defaultEntry, 15); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventDataContentType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 16, eventDataContentType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 99, etag_); } 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(uid_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); } if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); } if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); } for (int i = 0; i < eventFilters_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, eventFilters_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, serviceAccount_); } if (destination_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDestination()); } if (transport_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getTransport()); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry labels__ = LabelsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, labels__); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, channel_); } for (java.util.Map.Entry entry : internalGetConditions().getMap().entrySet()) { com.google.protobuf.MapEntry< java.lang.String, com.google.events.cloud.eventarc.v1.StateCondition> conditions__ = ConditionsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, conditions__); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventDataContentType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, eventDataContentType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(99, etag_); } 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.events.cloud.eventarc.v1.Trigger)) { return super.equals(obj); } com.google.events.cloud.eventarc.v1.Trigger other = (com.google.events.cloud.eventarc.v1.Trigger) obj; if (!getName().equals(other.getName())) return false; if (!getUid().equals(other.getUid())) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } if (hasUpdateTime() != other.hasUpdateTime()) return false; if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } if (!getEventFiltersList().equals(other.getEventFiltersList())) return false; if (!getServiceAccount().equals(other.getServiceAccount())) return false; if (hasDestination() != other.hasDestination()) return false; if (hasDestination()) { if (!getDestination().equals(other.getDestination())) return false; } if (hasTransport() != other.hasTransport()) return false; if (hasTransport()) { if (!getTransport().equals(other.getTransport())) return false; } if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getChannel().equals(other.getChannel())) return false; if (!internalGetConditions().equals(other.internalGetConditions())) return false; if (!getEventDataContentType().equals(other.getEventDataContentType())) return false; if (!getEtag().equals(other.getEtag())) 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + UID_FIELD_NUMBER; hash = (53 * hash) + getUid().hashCode(); if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } if (hasUpdateTime()) { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } if (getEventFiltersCount() > 0) { hash = (37 * hash) + EVENT_FILTERS_FIELD_NUMBER; hash = (53 * hash) + getEventFiltersList().hashCode(); } hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; hash = (53 * hash) + getServiceAccount().hashCode(); if (hasDestination()) { hash = (37 * hash) + DESTINATION_FIELD_NUMBER; hash = (53 * hash) + getDestination().hashCode(); } if (hasTransport()) { hash = (37 * hash) + TRANSPORT_FIELD_NUMBER; hash = (53 * hash) + getTransport().hashCode(); } if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (37 * hash) + CHANNEL_FIELD_NUMBER; hash = (53 * hash) + getChannel().hashCode(); if (!internalGetConditions().getMap().isEmpty()) { hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetConditions().hashCode(); } hash = (37 * hash) + EVENT_DATA_CONTENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + getEventDataContentType().hashCode(); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.events.cloud.eventarc.v1.Trigger parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.events.cloud.eventarc.v1.Trigger parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.events.cloud.eventarc.v1.Trigger parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.events.cloud.eventarc.v1.Trigger 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.events.cloud.eventarc.v1.Trigger parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.events.cloud.eventarc.v1.Trigger parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.events.cloud.eventarc.v1.Trigger parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.events.cloud.eventarc.v1.Trigger 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.events.cloud.eventarc.v1.Trigger parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.events.cloud.eventarc.v1.Trigger 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.events.cloud.eventarc.v1.Trigger parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.events.cloud.eventarc.v1.Trigger 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.events.cloud.eventarc.v1.Trigger 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; } /** * * *
   * A representation of the trigger resource.
   * 
* * Protobuf type {@code google.events.cloud.eventarc.v1.Trigger} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.events.cloud.eventarc.v1.Trigger) com.google.events.cloud.eventarc.v1.TriggerOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.events.cloud.eventarc.v1.Data .internal_static_google_events_cloud_eventarc_v1_Trigger_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 12: return internalGetLabels(); case 15: return internalGetConditions(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField(int number) { switch (number) { case 12: return internalGetMutableLabels(); case 15: return internalGetMutableConditions(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.events.cloud.eventarc.v1.Data .internal_static_google_events_cloud_eventarc_v1_Trigger_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.events.cloud.eventarc.v1.Trigger.class, com.google.events.cloud.eventarc.v1.Trigger.Builder.class); } // Construct using com.google.events.cloud.eventarc.v1.Trigger.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; uid_ = ""; createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); updateTimeBuilder_ = null; } if (eventFiltersBuilder_ == null) { eventFilters_ = java.util.Collections.emptyList(); } else { eventFilters_ = null; eventFiltersBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); serviceAccount_ = ""; destination_ = null; if (destinationBuilder_ != null) { destinationBuilder_.dispose(); destinationBuilder_ = null; } transport_ = null; if (transportBuilder_ != null) { transportBuilder_.dispose(); transportBuilder_ = null; } internalGetMutableLabels().clear(); channel_ = ""; internalGetMutableConditions().clear(); eventDataContentType_ = ""; etag_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.events.cloud.eventarc.v1.Data .internal_static_google_events_cloud_eventarc_v1_Trigger_descriptor; } @java.lang.Override public com.google.events.cloud.eventarc.v1.Trigger getDefaultInstanceForType() { return com.google.events.cloud.eventarc.v1.Trigger.getDefaultInstance(); } @java.lang.Override public com.google.events.cloud.eventarc.v1.Trigger build() { com.google.events.cloud.eventarc.v1.Trigger result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.events.cloud.eventarc.v1.Trigger buildPartial() { com.google.events.cloud.eventarc.v1.Trigger result = new com.google.events.cloud.eventarc.v1.Trigger(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.events.cloud.eventarc.v1.Trigger result) { if (eventFiltersBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { eventFilters_ = java.util.Collections.unmodifiableList(eventFilters_); bitField0_ = (bitField0_ & ~0x00000010); } result.eventFilters_ = eventFilters_; } else { result.eventFilters_ = eventFiltersBuilder_.build(); } } private void buildPartial0(com.google.events.cloud.eventarc.v1.Trigger result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.uid_ = uid_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); } if (((from_bitField0_ & 0x00000008) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); } if (((from_bitField0_ & 0x00000020) != 0)) { result.serviceAccount_ = serviceAccount_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.destination_ = destinationBuilder_ == null ? destination_ : destinationBuilder_.build(); } if (((from_bitField0_ & 0x00000080) != 0)) { result.transport_ = transportBuilder_ == null ? transport_ : transportBuilder_.build(); } if (((from_bitField0_ & 0x00000100) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } if (((from_bitField0_ & 0x00000200) != 0)) { result.channel_ = channel_; } if (((from_bitField0_ & 0x00000400) != 0)) { result.conditions_ = internalGetConditions(); result.conditions_.makeImmutable(); } if (((from_bitField0_ & 0x00000800) != 0)) { result.eventDataContentType_ = eventDataContentType_; } if (((from_bitField0_ & 0x00001000) != 0)) { result.etag_ = etag_; } } @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.events.cloud.eventarc.v1.Trigger) { return mergeFrom((com.google.events.cloud.eventarc.v1.Trigger) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.events.cloud.eventarc.v1.Trigger other) { if (other == com.google.events.cloud.eventarc.v1.Trigger.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getUid().isEmpty()) { uid_ = other.uid_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } if (eventFiltersBuilder_ == null) { if (!other.eventFilters_.isEmpty()) { if (eventFilters_.isEmpty()) { eventFilters_ = other.eventFilters_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureEventFiltersIsMutable(); eventFilters_.addAll(other.eventFilters_); } onChanged(); } } else { if (!other.eventFilters_.isEmpty()) { if (eventFiltersBuilder_.isEmpty()) { eventFiltersBuilder_.dispose(); eventFiltersBuilder_ = null; eventFilters_ = other.eventFilters_; bitField0_ = (bitField0_ & ~0x00000010); eventFiltersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEventFiltersFieldBuilder() : null; } else { eventFiltersBuilder_.addAllMessages(other.eventFilters_); } } } if (!other.getServiceAccount().isEmpty()) { serviceAccount_ = other.serviceAccount_; bitField0_ |= 0x00000020; onChanged(); } if (other.hasDestination()) { mergeDestination(other.getDestination()); } if (other.hasTransport()) { mergeTransport(other.getTransport()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); bitField0_ |= 0x00000100; if (!other.getChannel().isEmpty()) { channel_ = other.channel_; bitField0_ |= 0x00000200; onChanged(); } internalGetMutableConditions().mergeFrom(other.internalGetConditions()); bitField0_ |= 0x00000400; if (!other.getEventDataContentType().isEmpty()) { eventDataContentType_ = other.eventDataContentType_; bitField0_ |= 0x00000800; onChanged(); } if (!other.getEtag().isEmpty()) { etag_ = other.etag_; bitField0_ |= 0x00001000; 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: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { uid_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 42: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 42 case 50: { input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 50 case 66: { com.google.events.cloud.eventarc.v1.EventFilter m = input.readMessage( com.google.events.cloud.eventarc.v1.EventFilter.parser(), extensionRegistry); if (eventFiltersBuilder_ == null) { ensureEventFiltersIsMutable(); eventFilters_.add(m); } else { eventFiltersBuilder_.addMessage(m); } break; } // case 66 case 74: { serviceAccount_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 74 case 82: { input.readMessage(getDestinationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 82 case 90: { input.readMessage(getTransportFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 90 case 98: { com.google.protobuf.MapEntry labels__ = input.readMessage( LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); bitField0_ |= 0x00000100; break; } // case 98 case 106: { channel_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000200; break; } // case 106 case 122: { com.google.protobuf.MapEntry< java.lang.String, com.google.events.cloud.eventarc.v1.StateCondition> conditions__ = input.readMessage( ConditionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableConditions() .getMutableMap() .put(conditions__.getKey(), conditions__.getValue()); bitField0_ |= 0x00000400; break; } // case 122 case 130: { eventDataContentType_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000800; break; } // case 130 case 794: { etag_ = input.readStringRequireUtf8(); bitField0_ |= 0x00001000; break; } // case 794 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 name_ = ""; /** * * *
     * Required. The resource name of the trigger. Must be unique within the
     * location of the project and must be in
     * `projects/{project}/locations/{location}/triggers/{trigger}` format.
     * 
* * 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; } } /** * * *
     * Required. The resource name of the trigger. Must be unique within the
     * location of the project and must be in
     * `projects/{project}/locations/{location}/triggers/{trigger}` format.
     * 
* * 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; } } /** * * *
     * Required. The resource name of the trigger. Must be unique within the
     * location of the project and must be in
     * `projects/{project}/locations/{location}/triggers/{trigger}` format.
     * 
* * 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; } /** * * *
     * Required. The resource name of the trigger. Must be unique within the
     * location of the project and must be in
     * `projects/{project}/locations/{location}/triggers/{trigger}` format.
     * 
* * string name = 1; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. The resource name of the trigger. Must be unique within the
     * location of the project and must be in
     * `projects/{project}/locations/{location}/triggers/{trigger}` format.
     * 
* * 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 uid_ = ""; /** * * *
     * Output only. Server-assigned unique identifier for the trigger. The value
     * is a UUID4 string and guaranteed to remain unchanged until the resource is
     * deleted.
     * 
* * string uid = 2; * * @return The uid. */ public java.lang.String getUid() { java.lang.Object ref = uid_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); uid_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. Server-assigned unique identifier for the trigger. The value
     * is a UUID4 string and guaranteed to remain unchanged until the resource is
     * deleted.
     * 
* * string uid = 2; * * @return The bytes for uid. */ public com.google.protobuf.ByteString getUidBytes() { java.lang.Object ref = uid_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); uid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. Server-assigned unique identifier for the trigger. The value
     * is a UUID4 string and guaranteed to remain unchanged until the resource is
     * deleted.
     * 
* * string uid = 2; * * @param value The uid to set. * @return This builder for chaining. */ public Builder setUid(java.lang.String value) { if (value == null) { throw new NullPointerException(); } uid_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Output only. Server-assigned unique identifier for the trigger. The value
     * is a UUID4 string and guaranteed to remain unchanged until the resource is
     * deleted.
     * 
* * string uid = 2; * * @return This builder for chaining. */ public Builder clearUid() { uid_ = getDefaultInstance().getUid(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * Output only. Server-assigned unique identifier for the trigger. The value
     * is a UUID4 string and guaranteed to remain unchanged until the resource is
     * deleted.
     * 
* * string uid = 2; * * @param value The bytes for uid to set. * @return This builder for chaining. */ public Builder setUidBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); uid_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; /** * * *
     * Output only. The creation time.
     * 
* * .google.protobuf.Timestamp create_time = 5; * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Output only. The creation time.
     * 
* * .google.protobuf.Timestamp create_time = 5; * * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** * * *
     * Output only. The creation time.
     * 
* * .google.protobuf.Timestamp create_time = 5; */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } createTime_ = value; } else { createTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Output only. The creation time.
     * 
* * .google.protobuf.Timestamp create_time = 5; */ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); } else { createTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Output only. The creation time.
     * 
* * .google.protobuf.Timestamp create_time = 5; */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); } else { createTime_ = value; } } else { createTimeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Output only. The creation time.
     * 
* * .google.protobuf.Timestamp create_time = 5; */ public Builder clearCreateTime() { bitField0_ = (bitField0_ & ~0x00000004); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. The creation time.
     * 
* * .google.protobuf.Timestamp create_time = 5; */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. The creation time.
     * 
* * .google.protobuf.Timestamp create_time = 5; */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** * * *
     * Output only. The creation time.
     * 
* * .google.protobuf.Timestamp create_time = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getCreateTime(), getParentForChildren(), isClean()); createTime_ = null; } return createTimeBuilder_; } private com.google.protobuf.Timestamp updateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; /** * * *
     * Output only. The last-modified time.
     * 
* * .google.protobuf.Timestamp update_time = 6; * * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Output only. The last-modified time.
     * 
* * .google.protobuf.Timestamp update_time = 6; * * @return The updateTime. */ public com.google.protobuf.Timestamp getUpdateTime() { if (updateTimeBuilder_ == null) { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } else { return updateTimeBuilder_.getMessage(); } } /** * * *
     * Output only. The last-modified time.
     * 
* * .google.protobuf.Timestamp update_time = 6; */ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } updateTime_ = value; } else { updateTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Output only. The last-modified time.
     * 
* * .google.protobuf.Timestamp update_time = 6; */ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (updateTimeBuilder_ == null) { updateTime_ = builderForValue.build(); } else { updateTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Output only. The last-modified time.
     * 
* * .google.protobuf.Timestamp update_time = 6; */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); } else { updateTime_ = value; } } else { updateTimeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Output only. The last-modified time.
     * 
* * .google.protobuf.Timestamp update_time = 6; */ public Builder clearUpdateTime() { bitField0_ = (bitField0_ & ~0x00000008); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); updateTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. The last-modified time.
     * 
* * .google.protobuf.Timestamp update_time = 6; */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. The last-modified time.
     * 
* * .google.protobuf.Timestamp update_time = 6; */ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (updateTimeBuilder_ != null) { return updateTimeBuilder_.getMessageOrBuilder(); } else { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } } /** * * *
     * Output only. The last-modified time.
     * 
* * .google.protobuf.Timestamp update_time = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getUpdateTimeFieldBuilder() { if (updateTimeBuilder_ == null) { updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getUpdateTime(), getParentForChildren(), isClean()); updateTime_ = null; } return updateTimeBuilder_; } private java.util.List eventFilters_ = java.util.Collections.emptyList(); private void ensureEventFiltersIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { eventFilters_ = new java.util.ArrayList(eventFilters_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.events.cloud.eventarc.v1.EventFilter, com.google.events.cloud.eventarc.v1.EventFilter.Builder, com.google.events.cloud.eventarc.v1.EventFilterOrBuilder> eventFiltersBuilder_; /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public java.util.List getEventFiltersList() { if (eventFiltersBuilder_ == null) { return java.util.Collections.unmodifiableList(eventFilters_); } else { return eventFiltersBuilder_.getMessageList(); } } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public int getEventFiltersCount() { if (eventFiltersBuilder_ == null) { return eventFilters_.size(); } else { return eventFiltersBuilder_.getCount(); } } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public com.google.events.cloud.eventarc.v1.EventFilter getEventFilters(int index) { if (eventFiltersBuilder_ == null) { return eventFilters_.get(index); } else { return eventFiltersBuilder_.getMessage(index); } } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public Builder setEventFilters( int index, com.google.events.cloud.eventarc.v1.EventFilter value) { if (eventFiltersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventFiltersIsMutable(); eventFilters_.set(index, value); onChanged(); } else { eventFiltersBuilder_.setMessage(index, value); } return this; } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public Builder setEventFilters( int index, com.google.events.cloud.eventarc.v1.EventFilter.Builder builderForValue) { if (eventFiltersBuilder_ == null) { ensureEventFiltersIsMutable(); eventFilters_.set(index, builderForValue.build()); onChanged(); } else { eventFiltersBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public Builder addEventFilters(com.google.events.cloud.eventarc.v1.EventFilter value) { if (eventFiltersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventFiltersIsMutable(); eventFilters_.add(value); onChanged(); } else { eventFiltersBuilder_.addMessage(value); } return this; } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public Builder addEventFilters( int index, com.google.events.cloud.eventarc.v1.EventFilter value) { if (eventFiltersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventFiltersIsMutable(); eventFilters_.add(index, value); onChanged(); } else { eventFiltersBuilder_.addMessage(index, value); } return this; } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public Builder addEventFilters( com.google.events.cloud.eventarc.v1.EventFilter.Builder builderForValue) { if (eventFiltersBuilder_ == null) { ensureEventFiltersIsMutable(); eventFilters_.add(builderForValue.build()); onChanged(); } else { eventFiltersBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public Builder addEventFilters( int index, com.google.events.cloud.eventarc.v1.EventFilter.Builder builderForValue) { if (eventFiltersBuilder_ == null) { ensureEventFiltersIsMutable(); eventFilters_.add(index, builderForValue.build()); onChanged(); } else { eventFiltersBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public Builder addAllEventFilters( java.lang.Iterable values) { if (eventFiltersBuilder_ == null) { ensureEventFiltersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, eventFilters_); onChanged(); } else { eventFiltersBuilder_.addAllMessages(values); } return this; } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public Builder clearEventFilters() { if (eventFiltersBuilder_ == null) { eventFilters_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { eventFiltersBuilder_.clear(); } return this; } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public Builder removeEventFilters(int index) { if (eventFiltersBuilder_ == null) { ensureEventFiltersIsMutable(); eventFilters_.remove(index); onChanged(); } else { eventFiltersBuilder_.remove(index); } return this; } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public com.google.events.cloud.eventarc.v1.EventFilter.Builder getEventFiltersBuilder( int index) { return getEventFiltersFieldBuilder().getBuilder(index); } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public com.google.events.cloud.eventarc.v1.EventFilterOrBuilder getEventFiltersOrBuilder( int index) { if (eventFiltersBuilder_ == null) { return eventFilters_.get(index); } else { return eventFiltersBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public java.util.List getEventFiltersOrBuilderList() { if (eventFiltersBuilder_ != null) { return eventFiltersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(eventFilters_); } } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public com.google.events.cloud.eventarc.v1.EventFilter.Builder addEventFiltersBuilder() { return getEventFiltersFieldBuilder() .addBuilder(com.google.events.cloud.eventarc.v1.EventFilter.getDefaultInstance()); } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public com.google.events.cloud.eventarc.v1.EventFilter.Builder addEventFiltersBuilder( int index) { return getEventFiltersFieldBuilder() .addBuilder(index, com.google.events.cloud.eventarc.v1.EventFilter.getDefaultInstance()); } /** * * *
     * Required. Unordered list. The list of filters that applies to event
     * attributes. Only events that match all the provided filters are sent to the
     * destination.
     * 
* * repeated .google.events.cloud.eventarc.v1.EventFilter event_filters = 8; */ public java.util.List getEventFiltersBuilderList() { return getEventFiltersFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.events.cloud.eventarc.v1.EventFilter, com.google.events.cloud.eventarc.v1.EventFilter.Builder, com.google.events.cloud.eventarc.v1.EventFilterOrBuilder> getEventFiltersFieldBuilder() { if (eventFiltersBuilder_ == null) { eventFiltersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.events.cloud.eventarc.v1.EventFilter, com.google.events.cloud.eventarc.v1.EventFilter.Builder, com.google.events.cloud.eventarc.v1.EventFilterOrBuilder>( eventFilters_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); eventFilters_ = null; } return eventFiltersBuilder_; } private java.lang.Object serviceAccount_ = ""; /** * * *
     * Optional. The IAM service account email associated with the trigger. The
     * service account represents the identity of the trigger.
     * The principal who calls this API must have the `iam.serviceAccounts.actAs`
     * permission in the service account. See
     * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
     * for more information.
     * For Cloud Run destinations, this service account is used to generate
     * identity tokens when invoking the service. See
     * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
     * for information on how to invoke authenticated Cloud Run services.
     * To create Audit Log triggers, the service account should also
     * have the `roles/eventarc.eventReceiver` IAM role.
     * 
* * string service_account = 9; * * @return The serviceAccount. */ public java.lang.String getServiceAccount() { java.lang.Object ref = serviceAccount_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); serviceAccount_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. The IAM service account email associated with the trigger. The
     * service account represents the identity of the trigger.
     * The principal who calls this API must have the `iam.serviceAccounts.actAs`
     * permission in the service account. See
     * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
     * for more information.
     * For Cloud Run destinations, this service account is used to generate
     * identity tokens when invoking the service. See
     * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
     * for information on how to invoke authenticated Cloud Run services.
     * To create Audit Log triggers, the service account should also
     * have the `roles/eventarc.eventReceiver` IAM role.
     * 
* * string service_account = 9; * * @return The bytes for serviceAccount. */ public com.google.protobuf.ByteString getServiceAccountBytes() { java.lang.Object ref = serviceAccount_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); serviceAccount_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. The IAM service account email associated with the trigger. The
     * service account represents the identity of the trigger.
     * The principal who calls this API must have the `iam.serviceAccounts.actAs`
     * permission in the service account. See
     * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
     * for more information.
     * For Cloud Run destinations, this service account is used to generate
     * identity tokens when invoking the service. See
     * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
     * for information on how to invoke authenticated Cloud Run services.
     * To create Audit Log triggers, the service account should also
     * have the `roles/eventarc.eventReceiver` IAM role.
     * 
* * string service_account = 9; * * @param value The serviceAccount to set. * @return This builder for chaining. */ public Builder setServiceAccount(java.lang.String value) { if (value == null) { throw new NullPointerException(); } serviceAccount_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Optional. The IAM service account email associated with the trigger. The
     * service account represents the identity of the trigger.
     * The principal who calls this API must have the `iam.serviceAccounts.actAs`
     * permission in the service account. See
     * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
     * for more information.
     * For Cloud Run destinations, this service account is used to generate
     * identity tokens when invoking the service. See
     * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
     * for information on how to invoke authenticated Cloud Run services.
     * To create Audit Log triggers, the service account should also
     * have the `roles/eventarc.eventReceiver` IAM role.
     * 
* * string service_account = 9; * * @return This builder for chaining. */ public Builder clearServiceAccount() { serviceAccount_ = getDefaultInstance().getServiceAccount(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * * *
     * Optional. The IAM service account email associated with the trigger. The
     * service account represents the identity of the trigger.
     * The principal who calls this API must have the `iam.serviceAccounts.actAs`
     * permission in the service account. See
     * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
     * for more information.
     * For Cloud Run destinations, this service account is used to generate
     * identity tokens when invoking the service. See
     * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
     * for information on how to invoke authenticated Cloud Run services.
     * To create Audit Log triggers, the service account should also
     * have the `roles/eventarc.eventReceiver` IAM role.
     * 
* * string service_account = 9; * * @param value The bytes for serviceAccount to set. * @return This builder for chaining. */ public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); serviceAccount_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } private com.google.events.cloud.eventarc.v1.Destination destination_; private com.google.protobuf.SingleFieldBuilderV3< com.google.events.cloud.eventarc.v1.Destination, com.google.events.cloud.eventarc.v1.Destination.Builder, com.google.events.cloud.eventarc.v1.DestinationOrBuilder> destinationBuilder_; /** * * *
     * Required. Destination specifies where the events should be sent to.
     * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; * * @return Whether the destination field is set. */ public boolean hasDestination() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
     * Required. Destination specifies where the events should be sent to.
     * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; * * @return The destination. */ public com.google.events.cloud.eventarc.v1.Destination getDestination() { if (destinationBuilder_ == null) { return destination_ == null ? com.google.events.cloud.eventarc.v1.Destination.getDefaultInstance() : destination_; } else { return destinationBuilder_.getMessage(); } } /** * * *
     * Required. Destination specifies where the events should be sent to.
     * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; */ public Builder setDestination(com.google.events.cloud.eventarc.v1.Destination value) { if (destinationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } destination_ = value; } else { destinationBuilder_.setMessage(value); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Required. Destination specifies where the events should be sent to.
     * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; */ public Builder setDestination( com.google.events.cloud.eventarc.v1.Destination.Builder builderForValue) { if (destinationBuilder_ == null) { destination_ = builderForValue.build(); } else { destinationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Required. Destination specifies where the events should be sent to.
     * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; */ public Builder mergeDestination(com.google.events.cloud.eventarc.v1.Destination value) { if (destinationBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0) && destination_ != null && destination_ != com.google.events.cloud.eventarc.v1.Destination.getDefaultInstance()) { getDestinationBuilder().mergeFrom(value); } else { destination_ = value; } } else { destinationBuilder_.mergeFrom(value); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Required. Destination specifies where the events should be sent to.
     * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; */ public Builder clearDestination() { bitField0_ = (bitField0_ & ~0x00000040); destination_ = null; if (destinationBuilder_ != null) { destinationBuilder_.dispose(); destinationBuilder_ = null; } onChanged(); return this; } /** * * *
     * Required. Destination specifies where the events should be sent to.
     * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; */ public com.google.events.cloud.eventarc.v1.Destination.Builder getDestinationBuilder() { bitField0_ |= 0x00000040; onChanged(); return getDestinationFieldBuilder().getBuilder(); } /** * * *
     * Required. Destination specifies where the events should be sent to.
     * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; */ public com.google.events.cloud.eventarc.v1.DestinationOrBuilder getDestinationOrBuilder() { if (destinationBuilder_ != null) { return destinationBuilder_.getMessageOrBuilder(); } else { return destination_ == null ? com.google.events.cloud.eventarc.v1.Destination.getDefaultInstance() : destination_; } } /** * * *
     * Required. Destination specifies where the events should be sent to.
     * 
* * .google.events.cloud.eventarc.v1.Destination destination = 10; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.events.cloud.eventarc.v1.Destination, com.google.events.cloud.eventarc.v1.Destination.Builder, com.google.events.cloud.eventarc.v1.DestinationOrBuilder> getDestinationFieldBuilder() { if (destinationBuilder_ == null) { destinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.events.cloud.eventarc.v1.Destination, com.google.events.cloud.eventarc.v1.Destination.Builder, com.google.events.cloud.eventarc.v1.DestinationOrBuilder>( getDestination(), getParentForChildren(), isClean()); destination_ = null; } return destinationBuilder_; } private com.google.events.cloud.eventarc.v1.Transport transport_; private com.google.protobuf.SingleFieldBuilderV3< com.google.events.cloud.eventarc.v1.Transport, com.google.events.cloud.eventarc.v1.Transport.Builder, com.google.events.cloud.eventarc.v1.TransportOrBuilder> transportBuilder_; /** * * *
     * Optional. To deliver messages, Eventarc might use other Google Cloud
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; * * @return Whether the transport field is set. */ public boolean hasTransport() { return ((bitField0_ & 0x00000080) != 0); } /** * * *
     * Optional. To deliver messages, Eventarc might use other Google Cloud
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; * * @return The transport. */ public com.google.events.cloud.eventarc.v1.Transport getTransport() { if (transportBuilder_ == null) { return transport_ == null ? com.google.events.cloud.eventarc.v1.Transport.getDefaultInstance() : transport_; } else { return transportBuilder_.getMessage(); } } /** * * *
     * Optional. To deliver messages, Eventarc might use other Google Cloud
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; */ public Builder setTransport(com.google.events.cloud.eventarc.v1.Transport value) { if (transportBuilder_ == null) { if (value == null) { throw new NullPointerException(); } transport_ = value; } else { transportBuilder_.setMessage(value); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Optional. To deliver messages, Eventarc might use other Google Cloud
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; */ public Builder setTransport( com.google.events.cloud.eventarc.v1.Transport.Builder builderForValue) { if (transportBuilder_ == null) { transport_ = builderForValue.build(); } else { transportBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Optional. To deliver messages, Eventarc might use other Google Cloud
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; */ public Builder mergeTransport(com.google.events.cloud.eventarc.v1.Transport value) { if (transportBuilder_ == null) { if (((bitField0_ & 0x00000080) != 0) && transport_ != null && transport_ != com.google.events.cloud.eventarc.v1.Transport.getDefaultInstance()) { getTransportBuilder().mergeFrom(value); } else { transport_ = value; } } else { transportBuilder_.mergeFrom(value); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Optional. To deliver messages, Eventarc might use other Google Cloud
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; */ public Builder clearTransport() { bitField0_ = (bitField0_ & ~0x00000080); transport_ = null; if (transportBuilder_ != null) { transportBuilder_.dispose(); transportBuilder_ = null; } onChanged(); return this; } /** * * *
     * Optional. To deliver messages, Eventarc might use other Google Cloud
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; */ public com.google.events.cloud.eventarc.v1.Transport.Builder getTransportBuilder() { bitField0_ |= 0x00000080; onChanged(); return getTransportFieldBuilder().getBuilder(); } /** * * *
     * Optional. To deliver messages, Eventarc might use other Google Cloud
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; */ public com.google.events.cloud.eventarc.v1.TransportOrBuilder getTransportOrBuilder() { if (transportBuilder_ != null) { return transportBuilder_.getMessageOrBuilder(); } else { return transport_ == null ? com.google.events.cloud.eventarc.v1.Transport.getDefaultInstance() : transport_; } } /** * * *
     * Optional. To deliver messages, Eventarc might use other Google Cloud
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * 
* * .google.events.cloud.eventarc.v1.Transport transport = 11; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.events.cloud.eventarc.v1.Transport, com.google.events.cloud.eventarc.v1.Transport.Builder, com.google.events.cloud.eventarc.v1.TransportOrBuilder> getTransportFieldBuilder() { if (transportBuilder_ == null) { transportBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.events.cloud.eventarc.v1.Transport, com.google.events.cloud.eventarc.v1.Transport.Builder, com.google.events.cloud.eventarc.v1.TransportOrBuilder>( getTransport(), getParentForChildren(), isClean()); transport_ = null; } return transportBuilder_; } private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } private com.google.protobuf.MapField internalGetMutableLabels() { if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } bitField0_ |= 0x00000100; onChanged(); return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
     * Optional. User labels attached to the triggers that can be used to group
     * resources.
     * 
* * map<string, string> labels = 12; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
     * Optional. User labels attached to the triggers that can be used to group
     * resources.
     * 
* * map<string, string> labels = 12; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
     * Optional. User labels attached to the triggers that can be used to group
     * resources.
     * 
* * map<string, string> labels = 12; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * Optional. User labels attached to the triggers that can be used to group
     * resources.
     * 
* * map<string, string> labels = 12; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearLabels() { bitField0_ = (bitField0_ & ~0x00000100); internalGetMutableLabels().getMutableMap().clear(); return this; } /** * * *
     * Optional. User labels attached to the triggers that can be used to group
     * resources.
     * 
* * map<string, string> labels = 12; */ public Builder removeLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableLabels().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000100; return internalGetMutableLabels().getMutableMap(); } /** * * *
     * Optional. User labels attached to the triggers that can be used to group
     * resources.
     * 
* * map<string, string> labels = 12; */ public Builder putLabels(java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); bitField0_ |= 0x00000100; return this; } /** * * *
     * Optional. User labels attached to the triggers that can be used to group
     * resources.
     * 
* * map<string, string> labels = 12; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); bitField0_ |= 0x00000100; return this; } private java.lang.Object channel_ = ""; /** * * *
     * Optional. The name of the channel associated with the trigger in
     * `projects/{project}/locations/{location}/channels/{channel}` format.
     * You must provide a channel to receive events from Eventarc SaaS partners.
     * 
* * string channel = 13; * * @return The channel. */ public java.lang.String getChannel() { java.lang.Object ref = channel_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); channel_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. The name of the channel associated with the trigger in
     * `projects/{project}/locations/{location}/channels/{channel}` format.
     * You must provide a channel to receive events from Eventarc SaaS partners.
     * 
* * string channel = 13; * * @return The bytes for channel. */ public com.google.protobuf.ByteString getChannelBytes() { java.lang.Object ref = channel_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); channel_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. The name of the channel associated with the trigger in
     * `projects/{project}/locations/{location}/channels/{channel}` format.
     * You must provide a channel to receive events from Eventarc SaaS partners.
     * 
* * string channel = 13; * * @param value The channel to set. * @return This builder for chaining. */ public Builder setChannel(java.lang.String value) { if (value == null) { throw new NullPointerException(); } channel_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * Optional. The name of the channel associated with the trigger in
     * `projects/{project}/locations/{location}/channels/{channel}` format.
     * You must provide a channel to receive events from Eventarc SaaS partners.
     * 
* * string channel = 13; * * @return This builder for chaining. */ public Builder clearChannel() { channel_ = getDefaultInstance().getChannel(); bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } /** * * *
     * Optional. The name of the channel associated with the trigger in
     * `projects/{project}/locations/{location}/channels/{channel}` format.
     * You must provide a channel to receive events from Eventarc SaaS partners.
     * 
* * string channel = 13; * * @param value The bytes for channel to set. * @return This builder for chaining. */ public Builder setChannelBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); channel_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, com.google.events.cloud.eventarc.v1.StateCondition> conditions_; private com.google.protobuf.MapField< java.lang.String, com.google.events.cloud.eventarc.v1.StateCondition> internalGetConditions() { if (conditions_ == null) { return com.google.protobuf.MapField.emptyMapField( ConditionsDefaultEntryHolder.defaultEntry); } return conditions_; } private com.google.protobuf.MapField< java.lang.String, com.google.events.cloud.eventarc.v1.StateCondition> internalGetMutableConditions() { if (conditions_ == null) { conditions_ = com.google.protobuf.MapField.newMapField(ConditionsDefaultEntryHolder.defaultEntry); } if (!conditions_.isMutable()) { conditions_ = conditions_.copy(); } bitField0_ |= 0x00000400; onChanged(); return conditions_; } public int getConditionsCount() { return internalGetConditions().getMap().size(); } /** * * *
     * Output only. The reason(s) why a trigger is in FAILED state.
     * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ @java.lang.Override public boolean containsConditions(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetConditions().getMap().containsKey(key); } /** Use {@link #getConditionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getConditions() { return getConditionsMap(); } /** * * *
     * Output only. The reason(s) why a trigger is in FAILED state.
     * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ @java.lang.Override public java.util.Map getConditionsMap() { return internalGetConditions().getMap(); } /** * * *
     * Output only. The reason(s) why a trigger is in FAILED state.
     * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ @java.lang.Override public /* nullable */ com.google.events.cloud.eventarc.v1.StateCondition getConditionsOrDefault( java.lang.String key, /* nullable */ com.google.events.cloud.eventarc.v1.StateCondition defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetConditions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * Output only. The reason(s) why a trigger is in FAILED state.
     * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ @java.lang.Override public com.google.events.cloud.eventarc.v1.StateCondition getConditionsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetConditions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearConditions() { bitField0_ = (bitField0_ & ~0x00000400); internalGetMutableConditions().getMutableMap().clear(); return this; } /** * * *
     * Output only. The reason(s) why a trigger is in FAILED state.
     * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ public Builder removeConditions(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableConditions().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableConditions() { bitField0_ |= 0x00000400; return internalGetMutableConditions().getMutableMap(); } /** * * *
     * Output only. The reason(s) why a trigger is in FAILED state.
     * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ public Builder putConditions( java.lang.String key, com.google.events.cloud.eventarc.v1.StateCondition value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableConditions().getMutableMap().put(key, value); bitField0_ |= 0x00000400; return this; } /** * * *
     * Output only. The reason(s) why a trigger is in FAILED state.
     * 
* * map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15; * */ public Builder putAllConditions( java.util.Map values) { internalGetMutableConditions().getMutableMap().putAll(values); bitField0_ |= 0x00000400; return this; } private java.lang.Object eventDataContentType_ = ""; /** * * *
     * Optional. EventDataContentType specifies the type of payload in MIME
     * format that is expected from the CloudEvent data field. This is set to
     * `application/json` if the value is not defined.
     * 
* * string event_data_content_type = 16; * * @return The eventDataContentType. */ public java.lang.String getEventDataContentType() { java.lang.Object ref = eventDataContentType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); eventDataContentType_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. EventDataContentType specifies the type of payload in MIME
     * format that is expected from the CloudEvent data field. This is set to
     * `application/json` if the value is not defined.
     * 
* * string event_data_content_type = 16; * * @return The bytes for eventDataContentType. */ public com.google.protobuf.ByteString getEventDataContentTypeBytes() { java.lang.Object ref = eventDataContentType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); eventDataContentType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. EventDataContentType specifies the type of payload in MIME
     * format that is expected from the CloudEvent data field. This is set to
     * `application/json` if the value is not defined.
     * 
* * string event_data_content_type = 16; * * @param value The eventDataContentType to set. * @return This builder for chaining. */ public Builder setEventDataContentType(java.lang.String value) { if (value == null) { throw new NullPointerException(); } eventDataContentType_ = value; bitField0_ |= 0x00000800; onChanged(); return this; } /** * * *
     * Optional. EventDataContentType specifies the type of payload in MIME
     * format that is expected from the CloudEvent data field. This is set to
     * `application/json` if the value is not defined.
     * 
* * string event_data_content_type = 16; * * @return This builder for chaining. */ public Builder clearEventDataContentType() { eventDataContentType_ = getDefaultInstance().getEventDataContentType(); bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } /** * * *
     * Optional. EventDataContentType specifies the type of payload in MIME
     * format that is expected from the CloudEvent data field. This is set to
     * `application/json` if the value is not defined.
     * 
* * string event_data_content_type = 16; * * @param value The bytes for eventDataContentType to set. * @return This builder for chaining. */ public Builder setEventDataContentTypeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); eventDataContentType_ = value; bitField0_ |= 0x00000800; onChanged(); return this; } private java.lang.Object etag_ = ""; /** * * *
     * Output only. This checksum is computed by the server based on the value of
     * other fields, and might be sent only on create requests to ensure that the
     * client has an up-to-date value before proceeding.
     * 
* * string etag = 99; * * @return The etag. */ public java.lang.String getEtag() { java.lang.Object ref = etag_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); etag_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. This checksum is computed by the server based on the value of
     * other fields, and might be sent only on create requests to ensure that the
     * client has an up-to-date value before proceeding.
     * 
* * string etag = 99; * * @return The bytes for etag. */ public com.google.protobuf.ByteString getEtagBytes() { java.lang.Object ref = etag_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); etag_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. This checksum is computed by the server based on the value of
     * other fields, and might be sent only on create requests to ensure that the
     * client has an up-to-date value before proceeding.
     * 
* * string etag = 99; * * @param value The etag to set. * @return This builder for chaining. */ public Builder setEtag(java.lang.String value) { if (value == null) { throw new NullPointerException(); } etag_ = value; bitField0_ |= 0x00001000; onChanged(); return this; } /** * * *
     * Output only. This checksum is computed by the server based on the value of
     * other fields, and might be sent only on create requests to ensure that the
     * client has an up-to-date value before proceeding.
     * 
* * string etag = 99; * * @return This builder for chaining. */ public Builder clearEtag() { etag_ = getDefaultInstance().getEtag(); bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } /** * * *
     * Output only. This checksum is computed by the server based on the value of
     * other fields, and might be sent only on create requests to ensure that the
     * client has an up-to-date value before proceeding.
     * 
* * string etag = 99; * * @param value The bytes for etag to set. * @return This builder for chaining. */ public Builder setEtagBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); etag_ = value; bitField0_ |= 0x00001000; 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.events.cloud.eventarc.v1.Trigger) } // @@protoc_insertion_point(class_scope:google.events.cloud.eventarc.v1.Trigger) private static final com.google.events.cloud.eventarc.v1.Trigger DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.events.cloud.eventarc.v1.Trigger(); } public static com.google.events.cloud.eventarc.v1.Trigger getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Trigger 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.events.cloud.eventarc.v1.Trigger getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy