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

com.google.cloud.eventarc.publishing.v1.PublishEventsRequest Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/eventarc/publishing/v1/publisher.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.eventarc.publishing.v1;

/**
 *
 *
 * 
 * The request message for the PublishEvents method.
 * 
* * Protobuf type {@code google.cloud.eventarc.publishing.v1.PublishEventsRequest} */ public final class PublishEventsRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.eventarc.publishing.v1.PublishEventsRequest) PublishEventsRequestOrBuilder { private static final long serialVersionUID = 0L; // Use PublishEventsRequest.newBuilder() to construct. private PublishEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PublishEventsRequest() { channel_ = ""; events_ = java.util.Collections.emptyList(); textEvents_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new PublishEventsRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.eventarc.publishing.v1.PublisherProto .internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.eventarc.publishing.v1.PublisherProto .internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.class, com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.Builder.class); } public static final int CHANNEL_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object channel_ = ""; /** * * *
   * The full name of the channel to publish to. For example:
   * `projects/{project}/locations/{location}/channels/{channel-id}`.
   * 
* * string channel = 1; * * @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; } } /** * * *
   * The full name of the channel to publish to. For example:
   * `projects/{project}/locations/{location}/channels/{channel-id}`.
   * 
* * string channel = 1; * * @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 EVENTS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List events_; /** * * *
   * The CloudEvents v1.0 events to publish. No other types are allowed.
   * If this field is set, then the `text_events` fields must not be set.
   * 
* * repeated .google.protobuf.Any events = 2; */ @java.lang.Override public java.util.List getEventsList() { return events_; } /** * * *
   * The CloudEvents v1.0 events to publish. No other types are allowed.
   * If this field is set, then the `text_events` fields must not be set.
   * 
* * repeated .google.protobuf.Any events = 2; */ @java.lang.Override public java.util.List getEventsOrBuilderList() { return events_; } /** * * *
   * The CloudEvents v1.0 events to publish. No other types are allowed.
   * If this field is set, then the `text_events` fields must not be set.
   * 
* * repeated .google.protobuf.Any events = 2; */ @java.lang.Override public int getEventsCount() { return events_.size(); } /** * * *
   * The CloudEvents v1.0 events to publish. No other types are allowed.
   * If this field is set, then the `text_events` fields must not be set.
   * 
* * repeated .google.protobuf.Any events = 2; */ @java.lang.Override public com.google.protobuf.Any getEvents(int index) { return events_.get(index); } /** * * *
   * The CloudEvents v1.0 events to publish. No other types are allowed.
   * If this field is set, then the `text_events` fields must not be set.
   * 
* * repeated .google.protobuf.Any events = 2; */ @java.lang.Override public com.google.protobuf.AnyOrBuilder getEventsOrBuilder(int index) { return events_.get(index); } public static final int TEXT_EVENTS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList textEvents_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * The text representation of events to publish.
   * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
   * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
   * for specification.
   * If this field is set, then the `events` fields must not be set.
   * 
* * repeated string text_events = 3; * * @return A list containing the textEvents. */ public com.google.protobuf.ProtocolStringList getTextEventsList() { return textEvents_; } /** * * *
   * The text representation of events to publish.
   * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
   * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
   * for specification.
   * If this field is set, then the `events` fields must not be set.
   * 
* * repeated string text_events = 3; * * @return The count of textEvents. */ public int getTextEventsCount() { return textEvents_.size(); } /** * * *
   * The text representation of events to publish.
   * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
   * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
   * for specification.
   * If this field is set, then the `events` fields must not be set.
   * 
* * repeated string text_events = 3; * * @param index The index of the element to return. * @return The textEvents at the given index. */ public java.lang.String getTextEvents(int index) { return textEvents_.get(index); } /** * * *
   * The text representation of events to publish.
   * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
   * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
   * for specification.
   * If this field is set, then the `events` fields must not be set.
   * 
* * repeated string text_events = 3; * * @param index The index of the value to return. * @return The bytes of the textEvents at the given index. */ public com.google.protobuf.ByteString getTextEventsBytes(int index) { return textEvents_.getByteString(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channel_); } for (int i = 0; i < events_.size(); i++) { output.writeMessage(2, events_.get(i)); } for (int i = 0; i < textEvents_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, textEvents_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channel_); } for (int i = 0; i < events_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, events_.get(i)); } { int dataSize = 0; for (int i = 0; i < textEvents_.size(); i++) { dataSize += computeStringSizeNoTag(textEvents_.getRaw(i)); } size += dataSize; size += 1 * getTextEventsList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.eventarc.publishing.v1.PublishEventsRequest)) { return super.equals(obj); } com.google.cloud.eventarc.publishing.v1.PublishEventsRequest other = (com.google.cloud.eventarc.publishing.v1.PublishEventsRequest) obj; if (!getChannel().equals(other.getChannel())) return false; if (!getEventsList().equals(other.getEventsList())) return false; if (!getTextEventsList().equals(other.getTextEventsList())) 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) + CHANNEL_FIELD_NUMBER; hash = (53 * hash) + getChannel().hashCode(); if (getEventsCount() > 0) { hash = (37 * hash) + EVENTS_FIELD_NUMBER; hash = (53 * hash) + getEventsList().hashCode(); } if (getTextEventsCount() > 0) { hash = (37 * hash) + TEXT_EVENTS_FIELD_NUMBER; hash = (53 * hash) + getTextEventsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.eventarc.publishing.v1.PublishEventsRequest 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; } /** * * *
   * The request message for the PublishEvents method.
   * 
* * Protobuf type {@code google.cloud.eventarc.publishing.v1.PublishEventsRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.eventarc.publishing.v1.PublishEventsRequest) com.google.cloud.eventarc.publishing.v1.PublishEventsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.eventarc.publishing.v1.PublisherProto .internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.eventarc.publishing.v1.PublisherProto .internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.class, com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.Builder.class); } // Construct using com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; channel_ = ""; if (eventsBuilder_ == null) { events_ = java.util.Collections.emptyList(); } else { events_ = null; eventsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); textEvents_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.eventarc.publishing.v1.PublisherProto .internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_descriptor; } @java.lang.Override public com.google.cloud.eventarc.publishing.v1.PublishEventsRequest getDefaultInstanceForType() { return com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.getDefaultInstance(); } @java.lang.Override public com.google.cloud.eventarc.publishing.v1.PublishEventsRequest build() { com.google.cloud.eventarc.publishing.v1.PublishEventsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.eventarc.publishing.v1.PublishEventsRequest buildPartial() { com.google.cloud.eventarc.publishing.v1.PublishEventsRequest result = new com.google.cloud.eventarc.publishing.v1.PublishEventsRequest(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.eventarc.publishing.v1.PublishEventsRequest result) { if (eventsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { events_ = java.util.Collections.unmodifiableList(events_); bitField0_ = (bitField0_ & ~0x00000002); } result.events_ = events_; } else { result.events_ = eventsBuilder_.build(); } } private void buildPartial0( com.google.cloud.eventarc.publishing.v1.PublishEventsRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.channel_ = channel_; } if (((from_bitField0_ & 0x00000004) != 0)) { textEvents_.makeImmutable(); result.textEvents_ = textEvents_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.eventarc.publishing.v1.PublishEventsRequest) { return mergeFrom((com.google.cloud.eventarc.publishing.v1.PublishEventsRequest) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.eventarc.publishing.v1.PublishEventsRequest other) { if (other == com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.getDefaultInstance()) return this; if (!other.getChannel().isEmpty()) { channel_ = other.channel_; bitField0_ |= 0x00000001; onChanged(); } if (eventsBuilder_ == null) { if (!other.events_.isEmpty()) { if (events_.isEmpty()) { events_ = other.events_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureEventsIsMutable(); events_.addAll(other.events_); } onChanged(); } } else { if (!other.events_.isEmpty()) { if (eventsBuilder_.isEmpty()) { eventsBuilder_.dispose(); eventsBuilder_ = null; events_ = other.events_; bitField0_ = (bitField0_ & ~0x00000002); eventsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEventsFieldBuilder() : null; } else { eventsBuilder_.addAllMessages(other.events_); } } } if (!other.textEvents_.isEmpty()) { if (textEvents_.isEmpty()) { textEvents_ = other.textEvents_; bitField0_ |= 0x00000004; } else { ensureTextEventsIsMutable(); textEvents_.addAll(other.textEvents_); } 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: { channel_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { com.google.protobuf.Any m = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.add(m); } else { eventsBuilder_.addMessage(m); } break; } // case 18 case 26: { java.lang.String s = input.readStringRequireUtf8(); ensureTextEventsIsMutable(); textEvents_.add(s); break; } // case 26 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 channel_ = ""; /** * * *
     * The full name of the channel to publish to. For example:
     * `projects/{project}/locations/{location}/channels/{channel-id}`.
     * 
* * string channel = 1; * * @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; } } /** * * *
     * The full name of the channel to publish to. For example:
     * `projects/{project}/locations/{location}/channels/{channel-id}`.
     * 
* * string channel = 1; * * @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; } } /** * * *
     * The full name of the channel to publish to. For example:
     * `projects/{project}/locations/{location}/channels/{channel-id}`.
     * 
* * string channel = 1; * * @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_ |= 0x00000001; onChanged(); return this; } /** * * *
     * The full name of the channel to publish to. For example:
     * `projects/{project}/locations/{location}/channels/{channel-id}`.
     * 
* * string channel = 1; * * @return This builder for chaining. */ public Builder clearChannel() { channel_ = getDefaultInstance().getChannel(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * The full name of the channel to publish to. For example:
     * `projects/{project}/locations/{location}/channels/{channel-id}`.
     * 
* * string channel = 1; * * @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_ |= 0x00000001; onChanged(); return this; } private java.util.List events_ = java.util.Collections.emptyList(); private void ensureEventsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { events_ = new java.util.ArrayList(events_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> eventsBuilder_; /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public java.util.List getEventsList() { if (eventsBuilder_ == null) { return java.util.Collections.unmodifiableList(events_); } else { return eventsBuilder_.getMessageList(); } } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public int getEventsCount() { if (eventsBuilder_ == null) { return events_.size(); } else { return eventsBuilder_.getCount(); } } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public com.google.protobuf.Any getEvents(int index) { if (eventsBuilder_ == null) { return events_.get(index); } else { return eventsBuilder_.getMessage(index); } } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public Builder setEvents(int index, com.google.protobuf.Any value) { if (eventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventsIsMutable(); events_.set(index, value); onChanged(); } else { eventsBuilder_.setMessage(index, value); } return this; } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public Builder setEvents(int index, com.google.protobuf.Any.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.set(index, builderForValue.build()); onChanged(); } else { eventsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public Builder addEvents(com.google.protobuf.Any value) { if (eventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventsIsMutable(); events_.add(value); onChanged(); } else { eventsBuilder_.addMessage(value); } return this; } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public Builder addEvents(int index, com.google.protobuf.Any value) { if (eventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventsIsMutable(); events_.add(index, value); onChanged(); } else { eventsBuilder_.addMessage(index, value); } return this; } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public Builder addEvents(com.google.protobuf.Any.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.add(builderForValue.build()); onChanged(); } else { eventsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public Builder addEvents(int index, com.google.protobuf.Any.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.add(index, builderForValue.build()); onChanged(); } else { eventsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public Builder addAllEvents(java.lang.Iterable values) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, events_); onChanged(); } else { eventsBuilder_.addAllMessages(values); } return this; } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public Builder clearEvents() { if (eventsBuilder_ == null) { events_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { eventsBuilder_.clear(); } return this; } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public Builder removeEvents(int index) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.remove(index); onChanged(); } else { eventsBuilder_.remove(index); } return this; } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public com.google.protobuf.Any.Builder getEventsBuilder(int index) { return getEventsFieldBuilder().getBuilder(index); } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public com.google.protobuf.AnyOrBuilder getEventsOrBuilder(int index) { if (eventsBuilder_ == null) { return events_.get(index); } else { return eventsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public java.util.List getEventsOrBuilderList() { if (eventsBuilder_ != null) { return eventsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(events_); } } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public com.google.protobuf.Any.Builder addEventsBuilder() { return getEventsFieldBuilder().addBuilder(com.google.protobuf.Any.getDefaultInstance()); } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public com.google.protobuf.Any.Builder addEventsBuilder(int index) { return getEventsFieldBuilder() .addBuilder(index, com.google.protobuf.Any.getDefaultInstance()); } /** * * *
     * The CloudEvents v1.0 events to publish. No other types are allowed.
     * If this field is set, then the `text_events` fields must not be set.
     * 
* * repeated .google.protobuf.Any events = 2; */ public java.util.List getEventsBuilderList() { return getEventsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> getEventsFieldBuilder() { if (eventsBuilder_ == null) { eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( events_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); events_ = null; } return eventsBuilder_; } private com.google.protobuf.LazyStringArrayList textEvents_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureTextEventsIsMutable() { if (!textEvents_.isModifiable()) { textEvents_ = new com.google.protobuf.LazyStringArrayList(textEvents_); } bitField0_ |= 0x00000004; } /** * * *
     * The text representation of events to publish.
     * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
     * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
     * for specification.
     * If this field is set, then the `events` fields must not be set.
     * 
* * repeated string text_events = 3; * * @return A list containing the textEvents. */ public com.google.protobuf.ProtocolStringList getTextEventsList() { textEvents_.makeImmutable(); return textEvents_; } /** * * *
     * The text representation of events to publish.
     * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
     * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
     * for specification.
     * If this field is set, then the `events` fields must not be set.
     * 
* * repeated string text_events = 3; * * @return The count of textEvents. */ public int getTextEventsCount() { return textEvents_.size(); } /** * * *
     * The text representation of events to publish.
     * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
     * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
     * for specification.
     * If this field is set, then the `events` fields must not be set.
     * 
* * repeated string text_events = 3; * * @param index The index of the element to return. * @return The textEvents at the given index. */ public java.lang.String getTextEvents(int index) { return textEvents_.get(index); } /** * * *
     * The text representation of events to publish.
     * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
     * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
     * for specification.
     * If this field is set, then the `events` fields must not be set.
     * 
* * repeated string text_events = 3; * * @param index The index of the value to return. * @return The bytes of the textEvents at the given index. */ public com.google.protobuf.ByteString getTextEventsBytes(int index) { return textEvents_.getByteString(index); } /** * * *
     * The text representation of events to publish.
     * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
     * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
     * for specification.
     * If this field is set, then the `events` fields must not be set.
     * 
* * repeated string text_events = 3; * * @param index The index to set the value at. * @param value The textEvents to set. * @return This builder for chaining. */ public Builder setTextEvents(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureTextEventsIsMutable(); textEvents_.set(index, value); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The text representation of events to publish.
     * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
     * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
     * for specification.
     * If this field is set, then the `events` fields must not be set.
     * 
* * repeated string text_events = 3; * * @param value The textEvents to add. * @return This builder for chaining. */ public Builder addTextEvents(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureTextEventsIsMutable(); textEvents_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The text representation of events to publish.
     * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
     * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
     * for specification.
     * If this field is set, then the `events` fields must not be set.
     * 
* * repeated string text_events = 3; * * @param values The textEvents to add. * @return This builder for chaining. */ public Builder addAllTextEvents(java.lang.Iterable values) { ensureTextEventsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textEvents_); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The text representation of events to publish.
     * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
     * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
     * for specification.
     * If this field is set, then the `events` fields must not be set.
     * 
* * repeated string text_events = 3; * * @return This builder for chaining. */ public Builder clearTextEvents() { textEvents_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); ; onChanged(); return this; } /** * * *
     * The text representation of events to publish.
     * CloudEvent v1.0 in JSON format is the only allowed type. Refer to
     * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
     * for specification.
     * If this field is set, then the `events` fields must not be set.
     * 
* * repeated string text_events = 3; * * @param value The bytes of the textEvents to add. * @return This builder for chaining. */ public Builder addTextEventsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureTextEventsIsMutable(); textEvents_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.eventarc.publishing.v1.PublishEventsRequest) } // @@protoc_insertion_point(class_scope:google.cloud.eventarc.publishing.v1.PublishEventsRequest) private static final com.google.cloud.eventarc.publishing.v1.PublishEventsRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.eventarc.publishing.v1.PublishEventsRequest(); } public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public PublishEventsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.eventarc.publishing.v1.PublishEventsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy