diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequestOrBuilder.java b/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequestOrBuilder.java deleted file mode 100644 index 10e6d565a4ce..000000000000 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequestOrBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2020 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 - -package com.google.cloud.eventarc.publishing.v1; - -public interface PublishChannelConnectionEventsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The channel_connection that the events are published from. For example:
-   * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
-   * 
- * - * string channel_connection = 1; - * - * @return The channelConnection. - */ - java.lang.String getChannelConnection(); - /** - * - * - *
-   * The channel_connection that the events are published from. For example:
-   * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
-   * 
- * - * string channel_connection = 1; - * - * @return The bytes for channelConnection. - */ - com.google.protobuf.ByteString getChannelConnectionBytes(); - - /** - * - * - *
-   * The CloudEvents v1.0 events to publish. No other types are allowed.
-   * 
- * - * repeated .google.protobuf.Any events = 2; - */ - java.util.List getEventsList(); - /** - * - * - *
-   * The CloudEvents v1.0 events to publish. No other types are allowed.
-   * 
- * - * repeated .google.protobuf.Any events = 2; - */ - com.google.protobuf.Any getEvents(int index); - /** - * - * - *
-   * The CloudEvents v1.0 events to publish. No other types are allowed.
-   * 
- * - * repeated .google.protobuf.Any events = 2; - */ - int getEventsCount(); - /** - * - * - *
-   * The CloudEvents v1.0 events to publish. No other types are allowed.
-   * 
- * - * repeated .google.protobuf.Any events = 2; - */ - java.util.List getEventsOrBuilderList(); - /** - * - * - *
-   * The CloudEvents v1.0 events to publish. No other types are allowed.
-   * 
- * - * repeated .google.protobuf.Any events = 2; - */ - com.google.protobuf.AnyOrBuilder getEventsOrBuilder(int index); -} diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponse.java b/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponse.java deleted file mode 100644 index d88348ff4430..000000000000 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponse.java +++ /dev/null @@ -1,465 +0,0 @@ -/* - * Copyright 2020 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 - -package com.google.cloud.eventarc.publishing.v1; - -/** - * - * - *
- * The response message for the PublishChannelConnectionEvents method.
- * 
- * - * Protobuf type {@code google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} - */ -public final class PublishChannelConnectionEventsResponse - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) - PublishChannelConnectionEventsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use PublishChannelConnectionEventsResponse.newBuilder() to construct. - private PublishChannelConnectionEventsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PublishChannelConnectionEventsResponse() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PublishChannelConnectionEventsResponse(); - } - - @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.cloud.eventarc.publishing.v1.PublisherProto - .internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_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_PublishChannelConnectionEventsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.class, - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.Builder - .class); - } - - 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 { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - 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.PublishChannelConnectionEventsResponse)) { - return super.equals(obj); - } - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse other = - (com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) obj; - - 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 = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - 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.PublishChannelConnectionEventsResponse - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - 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.PublishChannelConnectionEventsResponse - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - 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.PublishChannelConnectionEventsResponse - 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.PublishChannelConnectionEventsResponse - 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.PublishChannelConnectionEventsResponse - 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.PublishChannelConnectionEventsResponse - 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.PublishChannelConnectionEventsResponse - 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.PublishChannelConnectionEventsResponse - 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.PublishChannelConnectionEventsResponse 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 response message for the PublishChannelConnectionEvents method.
-   * 
- * - * Protobuf type {@code - * google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.eventarc.publishing.v1.PublisherProto - .internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_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_PublishChannelConnectionEventsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.class, - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.Builder - .class); - } - - // Construct using - // com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - 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_PublishChannelConnectionEventsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - getDefaultInstanceForType() { - return com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse build() { - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - buildPartial() { - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse result = - new com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse(this); - onBuilt(); - return result; - } - - @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.PublishChannelConnectionEventsResponse) { - return mergeFrom( - (com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse other) { - if (other - == com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - .getDefaultInstance()) return this; - 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; - 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; - } - - @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.PublishChannelConnectionEventsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) - private static final com.google.cloud.eventarc.publishing.v1 - .PublishChannelConnectionEventsResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse(); - } - - public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponseOrBuilder.java b/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponseOrBuilder.java deleted file mode 100644 index 8a69f0096088..000000000000 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponseOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 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 - -package com.google.cloud.eventarc.publishing.v1; - -public interface PublishChannelConnectionEventsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequestOrBuilder.java b/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequestOrBuilder.java deleted file mode 100644 index 06fdddf512a2..000000000000 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequestOrBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2020 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 - -package com.google.cloud.eventarc.publishing.v1; - -public interface PublishEventsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.eventarc.publishing.v1.PublishEventsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.String getChannel(); - /** - * - * - *
-   * 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. - */ - com.google.protobuf.ByteString getChannelBytes(); - - /** - * - * - *
-   * The CloudEvents v1.0 events to publish. No other types are allowed.
-   * 
- * - * repeated .google.protobuf.Any events = 2; - */ - java.util.List getEventsList(); - /** - * - * - *
-   * The CloudEvents v1.0 events to publish. No other types are allowed.
-   * 
- * - * repeated .google.protobuf.Any events = 2; - */ - com.google.protobuf.Any getEvents(int index); - /** - * - * - *
-   * The CloudEvents v1.0 events to publish. No other types are allowed.
-   * 
- * - * repeated .google.protobuf.Any events = 2; - */ - int getEventsCount(); - /** - * - * - *
-   * The CloudEvents v1.0 events to publish. No other types are allowed.
-   * 
- * - * repeated .google.protobuf.Any events = 2; - */ - java.util.List getEventsOrBuilderList(); - /** - * - * - *
-   * The CloudEvents v1.0 events to publish. No other types are allowed.
-   * 
- * - * repeated .google.protobuf.Any events = 2; - */ - com.google.protobuf.AnyOrBuilder getEventsOrBuilder(int index); -} diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponseOrBuilder.java b/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponseOrBuilder.java deleted file mode 100644 index 1793774f8093..000000000000 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponseOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 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 - -package com.google.cloud.eventarc.publishing.v1; - -public interface PublishEventsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.eventarc.publishing.v1.PublishEventsResponse) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherProto.java b/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherProto.java deleted file mode 100644 index 6175fc326776..000000000000 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherProto.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright 2020 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 - -package com.google.cloud.eventarc.publishing.v1; - -public final class PublisherProto { - private PublisherProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/eventarc/publishing/v1/pu" - + "blisher.proto\022#google.cloud.eventarc.pub" - + "lishing.v1\032\034google/api/annotations.proto" - + "\032\027google/api/client.proto\032\031google/protob" - + "uf/any.proto\"i\n%PublishChannelConnection" - + "EventsRequest\022\032\n\022channel_connection\030\001 \001(" - + "\t\022$\n\006events\030\002 \003(\0132\024.google.protobuf.Any\"" - + "(\n&PublishChannelConnectionEventsRespons" - + "e\"M\n\024PublishEventsRequest\022\017\n\007channel\030\001 \001" - + "(\t\022$\n\006events\030\002 \003(\0132\024.google.protobuf.Any" - + "\"\027\n\025PublishEventsResponse2\320\004\n\tPublisher\022" - + "\230\002\n\036PublishChannelConnectionEvents\022J.goo" - + "gle.cloud.eventarc.publishing.v1.Publish" - + "ChannelConnectionEventsRequest\032K.google." - + "cloud.eventarc.publishing.v1.PublishChan" - + "nelConnectionEventsResponse\"]\202\323\344\223\002W\"R/v1" - + "/{channel_connection=projects/*/location" - + "s/*/channelConnections/*}:publishEvents:" - + "\001*\022\320\001\n\rPublishEvents\0229.google.cloud.even" - + "tarc.publishing.v1.PublishEventsRequest\032" - + ":.google.cloud.eventarc.publishing.v1.Pu" - + "blishEventsResponse\"H\202\323\344\223\002B\"=/v1/{channe" - + "l=projects/*/locations/*/channels/*}:pub" - + "lishEvents:\001*\032U\312A!eventarcpublishing.goo" - + "gleapis.com\322A.https://www.googleapis.com" - + "/auth/cloud-platformB\377\001\n\'com.google.clou" - + "d.eventarc.publishing.v1B\016PublisherProto" - + "P\001ZLgoogle.golang.org/genproto/googleapi" - + "s/cloud/eventarc/publishing/v1;publisher" - + "\252\002#Google.Cloud.Eventarc.Publishing.V1\312\002" - + "#Google\\Cloud\\Eventarc\\Publishing\\V1\352\002\'G" - + "oogle::Cloud::Eventarc::Publishing::V1b\006" - + "proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - }); - internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_descriptor, - new java.lang.String[] { - "ChannelConnection", "Events", - }); - internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_descriptor, - new java.lang.String[] { - "Channel", "Events", - }); - internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_descriptor, - new java.lang.String[] {}); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.oauthScopes); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherClient.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherClient.java similarity index 98% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherClient.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherClient.java index a4596bbb0eed..cb20dc43a770 100644 --- a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherClient.java +++ b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherClient.java @@ -62,6 +62,7 @@ * PublishChannelConnectionEventsRequest.newBuilder() * .setChannelConnection("channelConnection-1932021695") * .addAllEvents(new ArrayList()) + * .addAllTextEvents(new ArrayList()) * .build(); * PublishChannelConnectionEventsResponse response = * publisherClient.publishChannelConnectionEvents(request); @@ -202,6 +203,7 @@ public PublisherStub getStub() { * PublishChannelConnectionEventsRequest.newBuilder() * .setChannelConnection("channelConnection-1932021695") * .addAllEvents(new ArrayList()) + * .addAllTextEvents(new ArrayList()) * .build(); * PublishChannelConnectionEventsResponse response = * publisherClient.publishChannelConnectionEvents(request); @@ -233,6 +235,7 @@ public final PublishChannelConnectionEventsResponse publishChannelConnectionEven * PublishChannelConnectionEventsRequest.newBuilder() * .setChannelConnection("channelConnection-1932021695") * .addAllEvents(new ArrayList()) + * .addAllTextEvents(new ArrayList()) * .build(); * ApiFuture future = * publisherClient.publishChannelConnectionEventsCallable().futureCall(request); @@ -264,6 +267,7 @@ public final PublishChannelConnectionEventsResponse publishChannelConnectionEven * PublishEventsRequest.newBuilder() * .setChannel("channel738950403") * .addAllEvents(new ArrayList()) + * .addAllTextEvents(new ArrayList()) * .build(); * PublishEventsResponse response = publisherClient.publishEvents(request); * } @@ -293,6 +297,7 @@ public final PublishEventsResponse publishEvents(PublishEventsRequest request) { * PublishEventsRequest.newBuilder() * .setChannel("channel738950403") * .addAllEvents(new ArrayList()) + * .addAllTextEvents(new ArrayList()) * .build(); * ApiFuture future = * publisherClient.publishEventsCallable().futureCall(request); diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherSettings.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherSettings.java similarity index 99% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherSettings.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherSettings.java index f8c9046b893c..3421cdd37674 100644 --- a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherSettings.java +++ b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherSettings.java @@ -25,6 +25,7 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.eventarc.publishing.v1.stub.PublisherStubSettings; diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/gapic_metadata.json b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/gapic_metadata.json similarity index 100% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/gapic_metadata.json rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/gapic_metadata.json diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/package-info.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/package-info.java similarity index 98% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/package-info.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/package-info.java index 306671e57e64..52c80bacaec5 100644 --- a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/package-info.java +++ b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/package-info.java @@ -56,6 +56,7 @@ * PublishChannelConnectionEventsRequest.newBuilder() * .setChannelConnection("channelConnection-1932021695") * .addAllEvents(new ArrayList()) + * .addAllTextEvents(new ArrayList()) * .build(); * PublishChannelConnectionEventsResponse response = * publisherClient.publishChannelConnectionEvents(request); diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/GrpcPublisherCallableFactory.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/GrpcPublisherCallableFactory.java similarity index 100% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/GrpcPublisherCallableFactory.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/GrpcPublisherCallableFactory.java diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/GrpcPublisherStub.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/GrpcPublisherStub.java similarity index 99% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/GrpcPublisherStub.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/GrpcPublisherStub.java index 09f6c09a405c..79e463a351a5 100644 --- a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/GrpcPublisherStub.java +++ b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/GrpcPublisherStub.java @@ -31,6 +31,7 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/HttpJsonPublisherCallableFactory.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/HttpJsonPublisherCallableFactory.java similarity index 100% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/HttpJsonPublisherCallableFactory.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/HttpJsonPublisherCallableFactory.java diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/HttpJsonPublisherStub.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/HttpJsonPublisherStub.java similarity index 100% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/HttpJsonPublisherStub.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/HttpJsonPublisherStub.java diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/PublisherStub.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/PublisherStub.java similarity index 100% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/PublisherStub.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/PublisherStub.java diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/PublisherStubSettings.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/PublisherStubSettings.java similarity index 100% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/PublisherStubSettings.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/main/java/com/google/cloud/eventarc/publishing/v1/stub/PublisherStubSettings.java diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/MockPublisher.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/MockPublisher.java similarity index 100% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/MockPublisher.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/MockPublisher.java diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/MockPublisherImpl.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/MockPublisherImpl.java similarity index 100% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/MockPublisherImpl.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/MockPublisherImpl.java diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientHttpJsonTest.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientHttpJsonTest.java similarity index 96% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientHttpJsonTest.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientHttpJsonTest.java index 0ee976880785..4805d2542a5c 100644 --- a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientHttpJsonTest.java +++ b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientHttpJsonTest.java @@ -83,6 +83,7 @@ public void publishChannelConnectionEventsTest() throws Exception { .setChannelConnection( "projects/project-748/locations/location-748/channelConnections/channelConnection-748") .addAllEvents(new ArrayList()) + .addAllTextEvents(new ArrayList()) .build(); PublishChannelConnectionEventsResponse actualResponse = @@ -117,6 +118,7 @@ public void publishChannelConnectionEventsExceptionTest() throws Exception { .setChannelConnection( "projects/project-748/locations/location-748/channelConnections/channelConnection-748") .addAllEvents(new ArrayList()) + .addAllTextEvents(new ArrayList()) .build(); client.publishChannelConnectionEvents(request); Assert.fail("No exception raised"); @@ -134,6 +136,7 @@ public void publishEventsTest() throws Exception { PublishEventsRequest.newBuilder() .setChannel("projects/project-2616/locations/location-2616/channels/channel-2616") .addAllEvents(new ArrayList()) + .addAllTextEvents(new ArrayList()) .build(); PublishEventsResponse actualResponse = client.publishEvents(request); @@ -166,6 +169,7 @@ public void publishEventsExceptionTest() throws Exception { PublishEventsRequest.newBuilder() .setChannel("projects/project-2616/locations/location-2616/channels/channel-2616") .addAllEvents(new ArrayList()) + .addAllTextEvents(new ArrayList()) .build(); client.publishEvents(request); Assert.fail("No exception raised"); diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientTest.java b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientTest.java similarity index 93% rename from java-eventarc-publishing/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientTest.java rename to owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientTest.java index 15dafbd3d743..7e425614f985 100644 --- a/java-eventarc-publishing/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientTest.java +++ b/owl-bot-staging/java-eventarc-publishing/v1/google-cloud-eventarc-publishing/src/test/java/com/google/cloud/eventarc/publishing/v1/PublisherClientTest.java @@ -87,6 +87,7 @@ public void publishChannelConnectionEventsTest() throws Exception { PublishChannelConnectionEventsRequest.newBuilder() .setChannelConnection("channelConnection-1932021695") .addAllEvents(new ArrayList()) + .addAllTextEvents(new ArrayList()) .build(); PublishChannelConnectionEventsResponse actualResponse = @@ -100,6 +101,7 @@ public void publishChannelConnectionEventsTest() throws Exception { Assert.assertEquals(request.getChannelConnection(), actualRequest.getChannelConnection()); Assert.assertEquals(request.getEventsList(), actualRequest.getEventsList()); + Assert.assertEquals(request.getTextEventsList(), actualRequest.getTextEventsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -116,6 +118,7 @@ public void publishChannelConnectionEventsExceptionTest() throws Exception { PublishChannelConnectionEventsRequest.newBuilder() .setChannelConnection("channelConnection-1932021695") .addAllEvents(new ArrayList()) + .addAllTextEvents(new ArrayList()) .build(); client.publishChannelConnectionEvents(request); Assert.fail("No exception raised"); @@ -133,6 +136,7 @@ public void publishEventsTest() throws Exception { PublishEventsRequest.newBuilder() .setChannel("channel738950403") .addAllEvents(new ArrayList()) + .addAllTextEvents(new ArrayList()) .build(); PublishEventsResponse actualResponse = client.publishEvents(request); @@ -144,6 +148,7 @@ public void publishEventsTest() throws Exception { Assert.assertEquals(request.getChannel(), actualRequest.getChannel()); Assert.assertEquals(request.getEventsList(), actualRequest.getEventsList()); + Assert.assertEquals(request.getTextEventsList(), actualRequest.getTextEventsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -160,6 +165,7 @@ public void publishEventsExceptionTest() throws Exception { PublishEventsRequest.newBuilder() .setChannel("channel738950403") .addAllEvents(new ArrayList()) + .addAllTextEvents(new ArrayList()) .build(); client.publishEvents(request); Assert.fail("No exception raised"); diff --git a/java-eventarc-publishing/grpc-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherGrpc.java b/owl-bot-staging/java-eventarc-publishing/v1/grpc-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherGrpc.java similarity index 52% rename from java-eventarc-publishing/grpc-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherGrpc.java rename to owl-bot-staging/java-eventarc-publishing/v1/grpc-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherGrpc.java index a3fa42fc2adf..18744380c921 100644 --- a/java-eventarc-publishing/grpc-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherGrpc.java +++ b/owl-bot-staging/java-eventarc-publishing/v1/grpc-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherGrpc.java @@ -1,25 +1,8 @@ -/* - * Copyright 2020 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. - */ package com.google.cloud.eventarc.publishing.v1; import static io.grpc.MethodDescriptor.generateFullMethodName; /** - * - * *
  * Eventarc processes events generated by an event provider and delivers them to
  * a subscriber.
@@ -51,151 +34,113 @@ private PublisherGrpc() {}
   public static final String SERVICE_NAME = "google.cloud.eventarc.publishing.v1.Publisher";
 
   // Static method descriptors that strictly reflect the proto.
-  private static volatile io.grpc.MethodDescriptor<
-          com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest,
-          com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse>
-      getPublishChannelConnectionEventsMethod;
+  private static volatile io.grpc.MethodDescriptor getPublishChannelConnectionEventsMethod;
 
   @io.grpc.stub.annotations.RpcMethod(
       fullMethodName = SERVICE_NAME + '/' + "PublishChannelConnectionEvents",
-      requestType =
-          com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.class,
-      responseType =
-          com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.class,
+      requestType = com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.class,
+      responseType = com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.class,
       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
-  public static io.grpc.MethodDescriptor<
-          com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest,
-          com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse>
-      getPublishChannelConnectionEventsMethod() {
-    io.grpc.MethodDescriptor<
-            com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest,
-            com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse>
-        getPublishChannelConnectionEventsMethod;
-    if ((getPublishChannelConnectionEventsMethod =
-            PublisherGrpc.getPublishChannelConnectionEventsMethod)
-        == null) {
+  public static io.grpc.MethodDescriptor getPublishChannelConnectionEventsMethod() {
+    io.grpc.MethodDescriptor getPublishChannelConnectionEventsMethod;
+    if ((getPublishChannelConnectionEventsMethod = PublisherGrpc.getPublishChannelConnectionEventsMethod) == null) {
       synchronized (PublisherGrpc.class) {
-        if ((getPublishChannelConnectionEventsMethod =
-                PublisherGrpc.getPublishChannelConnectionEventsMethod)
-            == null) {
-          PublisherGrpc.getPublishChannelConnectionEventsMethod =
-              getPublishChannelConnectionEventsMethod =
-                  io.grpc.MethodDescriptor
-                      .
-                          newBuilder()
-                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
-                      .setFullMethodName(
-                          generateFullMethodName(SERVICE_NAME, "PublishChannelConnectionEvents"))
-                      .setSampledToLocalTracing(true)
-                      .setRequestMarshaller(
-                          io.grpc.protobuf.ProtoUtils.marshaller(
-                              com.google.cloud.eventarc.publishing.v1
-                                  .PublishChannelConnectionEventsRequest.getDefaultInstance()))
-                      .setResponseMarshaller(
-                          io.grpc.protobuf.ProtoUtils.marshaller(
-                              com.google.cloud.eventarc.publishing.v1
-                                  .PublishChannelConnectionEventsResponse.getDefaultInstance()))
-                      .setSchemaDescriptor(
-                          new PublisherMethodDescriptorSupplier("PublishChannelConnectionEvents"))
-                      .build();
+        if ((getPublishChannelConnectionEventsMethod = PublisherGrpc.getPublishChannelConnectionEventsMethod) == null) {
+          PublisherGrpc.getPublishChannelConnectionEventsMethod = getPublishChannelConnectionEventsMethod =
+              io.grpc.MethodDescriptor.newBuilder()
+              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PublishChannelConnectionEvents"))
+              .setSampledToLocalTracing(true)
+              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+                  com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.getDefaultInstance()))
+              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+                  com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.getDefaultInstance()))
+              .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("PublishChannelConnectionEvents"))
+              .build();
         }
       }
     }
     return getPublishChannelConnectionEventsMethod;
   }
 
-  private static volatile io.grpc.MethodDescriptor<
-          com.google.cloud.eventarc.publishing.v1.PublishEventsRequest,
-          com.google.cloud.eventarc.publishing.v1.PublishEventsResponse>
-      getPublishEventsMethod;
+  private static volatile io.grpc.MethodDescriptor getPublishEventsMethod;
 
   @io.grpc.stub.annotations.RpcMethod(
       fullMethodName = SERVICE_NAME + '/' + "PublishEvents",
       requestType = com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.class,
       responseType = com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.class,
       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
-  public static io.grpc.MethodDescriptor<
-          com.google.cloud.eventarc.publishing.v1.PublishEventsRequest,
-          com.google.cloud.eventarc.publishing.v1.PublishEventsResponse>
-      getPublishEventsMethod() {
-    io.grpc.MethodDescriptor<
-            com.google.cloud.eventarc.publishing.v1.PublishEventsRequest,
-            com.google.cloud.eventarc.publishing.v1.PublishEventsResponse>
-        getPublishEventsMethod;
+  public static io.grpc.MethodDescriptor getPublishEventsMethod() {
+    io.grpc.MethodDescriptor getPublishEventsMethod;
     if ((getPublishEventsMethod = PublisherGrpc.getPublishEventsMethod) == null) {
       synchronized (PublisherGrpc.class) {
         if ((getPublishEventsMethod = PublisherGrpc.getPublishEventsMethod) == null) {
-          PublisherGrpc.getPublishEventsMethod =
-              getPublishEventsMethod =
-                  io.grpc.MethodDescriptor
-                      .
-                          newBuilder()
-                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
-                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PublishEvents"))
-                      .setSampledToLocalTracing(true)
-                      .setRequestMarshaller(
-                          io.grpc.protobuf.ProtoUtils.marshaller(
-                              com.google.cloud.eventarc.publishing.v1.PublishEventsRequest
-                                  .getDefaultInstance()))
-                      .setResponseMarshaller(
-                          io.grpc.protobuf.ProtoUtils.marshaller(
-                              com.google.cloud.eventarc.publishing.v1.PublishEventsResponse
-                                  .getDefaultInstance()))
-                      .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("PublishEvents"))
-                      .build();
+          PublisherGrpc.getPublishEventsMethod = getPublishEventsMethod =
+              io.grpc.MethodDescriptor.newBuilder()
+              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PublishEvents"))
+              .setSampledToLocalTracing(true)
+              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+                  com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.getDefaultInstance()))
+              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+                  com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.getDefaultInstance()))
+              .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("PublishEvents"))
+              .build();
         }
       }
     }
     return getPublishEventsMethod;
   }
 
-  /** Creates a new async stub that supports all call types for the service */
+  /**
+   * Creates a new async stub that supports all call types for the service
+   */
   public static PublisherStub newStub(io.grpc.Channel channel) {
     io.grpc.stub.AbstractStub.StubFactory factory =
-        new io.grpc.stub.AbstractStub.StubFactory() {
-          @java.lang.Override
-          public PublisherStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
-            return new PublisherStub(channel, callOptions);
-          }
-        };
+      new io.grpc.stub.AbstractStub.StubFactory() {
+        @java.lang.Override
+        public PublisherStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+          return new PublisherStub(channel, callOptions);
+        }
+      };
     return PublisherStub.newStub(factory, channel);
   }
 
   /**
    * Creates a new blocking-style stub that supports unary and streaming output calls on the service
    */
-  public static PublisherBlockingStub newBlockingStub(io.grpc.Channel channel) {
+  public static PublisherBlockingStub newBlockingStub(
+      io.grpc.Channel channel) {
     io.grpc.stub.AbstractStub.StubFactory factory =
-        new io.grpc.stub.AbstractStub.StubFactory() {
-          @java.lang.Override
-          public PublisherBlockingStub newStub(
-              io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
-            return new PublisherBlockingStub(channel, callOptions);
-          }
-        };
+      new io.grpc.stub.AbstractStub.StubFactory() {
+        @java.lang.Override
+        public PublisherBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+          return new PublisherBlockingStub(channel, callOptions);
+        }
+      };
     return PublisherBlockingStub.newStub(factory, channel);
   }
 
-  /** Creates a new ListenableFuture-style stub that supports unary calls on the service */
-  public static PublisherFutureStub newFutureStub(io.grpc.Channel channel) {
+  /**
+   * Creates a new ListenableFuture-style stub that supports unary calls on the service
+   */
+  public static PublisherFutureStub newFutureStub(
+      io.grpc.Channel channel) {
     io.grpc.stub.AbstractStub.StubFactory factory =
-        new io.grpc.stub.AbstractStub.StubFactory() {
-          @java.lang.Override
-          public PublisherFutureStub newStub(
-              io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
-            return new PublisherFutureStub(channel, callOptions);
-          }
-        };
+      new io.grpc.stub.AbstractStub.StubFactory() {
+        @java.lang.Override
+        public PublisherFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+          return new PublisherFutureStub(channel, callOptions);
+        }
+      };
     return PublisherFutureStub.newStub(factory, channel);
   }
 
   /**
-   *
-   *
    * 
    * Eventarc processes events generated by an event provider and delivers them to
    * a subscriber.
@@ -216,64 +161,49 @@ public PublisherFutureStub newStub(
    * Publisher allows an event provider to publish events to Eventarc.
    * 
*/ - public abstract static class PublisherImplBase implements io.grpc.BindableService { + public static abstract class PublisherImplBase implements io.grpc.BindableService { /** - * - * *
      * Publish events to a ChannelConnection in a partner's project.
      * 
*/ - public void publishChannelConnectionEvents( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getPublishChannelConnectionEventsMethod(), responseObserver); + public void publishChannelConnectionEvents(com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPublishChannelConnectionEventsMethod(), responseObserver); } /** - * - * *
      * Publish events to a subscriber's channel.
      * 
*/ - public void publishEvents( - com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getPublishEventsMethod(), responseObserver); + public void publishEvents(com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPublishEventsMethod(), responseObserver); } - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getPublishChannelConnectionEventsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest, - com.google.cloud.eventarc.publishing.v1 - .PublishChannelConnectionEventsResponse>( - this, METHODID_PUBLISH_CHANNEL_CONNECTION_EVENTS))) + getPublishChannelConnectionEventsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest, + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse>( + this, METHODID_PUBLISH_CHANNEL_CONNECTION_EVENTS))) .addMethod( - getPublishEventsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.eventarc.publishing.v1.PublishEventsRequest, - com.google.cloud.eventarc.publishing.v1.PublishEventsResponse>( - this, METHODID_PUBLISH_EVENTS))) + getPublishEventsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.eventarc.publishing.v1.PublishEventsRequest, + com.google.cloud.eventarc.publishing.v1.PublishEventsResponse>( + this, METHODID_PUBLISH_EVENTS))) .build(); } } /** - * - * *
    * Eventarc processes events generated by an event provider and delivers them to
    * a subscriber.
@@ -295,54 +225,41 @@ public final io.grpc.ServerServiceDefinition bindService() {
    * 
*/ public static final class PublisherStub extends io.grpc.stub.AbstractAsyncStub { - private PublisherStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private PublisherStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected PublisherStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + protected PublisherStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PublisherStub(channel, callOptions); } /** - * - * *
      * Publish events to a ChannelConnection in a partner's project.
      * 
*/ - public void publishChannelConnectionEvents( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse> - responseObserver) { + public void publishChannelConnectionEvents(com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPublishChannelConnectionEventsMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getPublishChannelConnectionEventsMethod(), getCallOptions()), request, responseObserver); } /** - * - * *
      * Publish events to a subscriber's channel.
      * 
*/ - public void publishEvents( - com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void publishEvents(com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPublishEventsMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getPublishEventsMethod(), getCallOptions()), request, responseObserver); } } /** - * - * *
    * Eventarc processes events generated by an event provider and delivers them to
    * a subscriber.
@@ -363,9 +280,9 @@ public void publishEvents(
    * Publisher allows an event provider to publish events to Eventarc.
    * 
*/ - public static final class PublisherBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private PublisherBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + public static final class PublisherBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private PublisherBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -376,36 +293,27 @@ protected PublisherBlockingStub build( } /** - * - * *
      * Publish events to a ChannelConnection in a partner's project.
      * 
*/ - public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - publishChannelConnectionEvents( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request) { + public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse publishChannelConnectionEvents(com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPublishChannelConnectionEventsMethod(), getCallOptions(), request); } /** - * - * *
      * Publish events to a subscriber's channel.
      * 
*/ - public com.google.cloud.eventarc.publishing.v1.PublishEventsResponse publishEvents( - com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request) { + public com.google.cloud.eventarc.publishing.v1.PublishEventsResponse publishEvents(com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPublishEventsMethod(), getCallOptions(), request); } } /** - * - * *
    * Eventarc processes events generated by an event provider and delivers them to
    * a subscriber.
@@ -426,43 +334,36 @@ public com.google.cloud.eventarc.publishing.v1.PublishEventsResponse publishEven
    * Publisher allows an event provider to publish events to Eventarc.
    * 
*/ - public static final class PublisherFutureStub - extends io.grpc.stub.AbstractFutureStub { - private PublisherFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + public static final class PublisherFutureStub extends io.grpc.stub.AbstractFutureStub { + private PublisherFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected PublisherFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + protected PublisherFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PublisherFutureStub(channel, callOptions); } /** - * - * *
      * Publish events to a ChannelConnection in a partner's project.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse> - publishChannelConnectionEvents( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request) { + public com.google.common.util.concurrent.ListenableFuture publishChannelConnectionEvents( + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPublishChannelConnectionEventsMethod(), getCallOptions()), - request); + getChannel().newCall(getPublishChannelConnectionEventsMethod(), getCallOptions()), request); } /** - * - * *
      * Publish events to a subscriber's channel.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.eventarc.publishing.v1.PublishEventsResponse> - publishEvents(com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request) { + public com.google.common.util.concurrent.ListenableFuture publishEvents( + com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPublishEventsMethod(), getCallOptions()), request); } @@ -471,11 +372,11 @@ protected PublisherFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions private static final int METHODID_PUBLISH_CHANNEL_CONNECTION_EVENTS = 0; private static final int METHODID_PUBLISH_EVENTS = 1; - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { private final PublisherImplBase serviceImpl; private final int methodId; @@ -489,20 +390,12 @@ private static final class MethodHandlers public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_PUBLISH_CHANNEL_CONNECTION_EVENTS: - serviceImpl.publishChannelConnectionEvents( - (com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) - request, - (io.grpc.stub.StreamObserver< - com.google.cloud.eventarc.publishing.v1 - .PublishChannelConnectionEventsResponse>) - responseObserver); + serviceImpl.publishChannelConnectionEvents((com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_PUBLISH_EVENTS: - serviceImpl.publishEvents( - (com.google.cloud.eventarc.publishing.v1.PublishEventsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.eventarc.publishing.v1.PublishEventsResponse>) - responseObserver); + serviceImpl.publishEvents((com.google.cloud.eventarc.publishing.v1.PublishEventsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); @@ -520,9 +413,8 @@ public io.grpc.stub.StreamObserver invoke( } } - private abstract static class PublisherBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { + private static abstract class PublisherBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { PublisherBaseDescriptorSupplier() {} @java.lang.Override @@ -564,13 +456,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { synchronized (PublisherGrpc.class) { result = serviceDescriptor; if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new PublisherFileDescriptorSupplier()) - .addMethod(getPublishChannelConnectionEventsMethod()) - .addMethod(getPublishEventsMethod()) - .build(); + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PublisherFileDescriptorSupplier()) + .addMethod(getPublishChannelConnectionEventsMethod()) + .addMethod(getPublishEventsMethod()) + .build(); } } } diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequest.java b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequest.java similarity index 50% rename from java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequest.java rename to owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequest.java index c6357554e3a7..ad9e0fd790c8 100644 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequest.java +++ b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequest.java @@ -1,88 +1,64 @@ -/* - * Copyright 2020 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 package com.google.cloud.eventarc.publishing.v1; /** - * - * *
  * The request message for the PublishChannelConnectionEvents method.
  * 
* * Protobuf type {@code google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} */ -public final class PublishChannelConnectionEventsRequest - extends com.google.protobuf.GeneratedMessageV3 - implements +public final class PublishChannelConnectionEventsRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) PublishChannelConnectionEventsRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use PublishChannelConnectionEventsRequest.newBuilder() to construct. - private PublishChannelConnectionEventsRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PublishChannelConnectionEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private PublishChannelConnectionEventsRequest() { channelConnection_ = ""; events_ = java.util.Collections.emptyList(); + textEvents_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new PublishChannelConnectionEventsRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.eventarc.publishing.v1.PublisherProto - .internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_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_PublishChannelConnectionEventsRequest_fieldAccessorTable + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.class, - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.Builder - .class); + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.class, com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.Builder.class); } public static final int CHANNEL_CONNECTION_FIELD_NUMBER = 1; private volatile java.lang.Object channelConnection_; /** - * - * *
    * The channel_connection that the events are published from. For example:
    * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
    * 
* * string channel_connection = 1; - * * @return The channelConnection. */ @java.lang.Override @@ -91,30 +67,30 @@ public java.lang.String getChannelConnection() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); channelConnection_ = s; return s; } } /** - * - * *
    * The channel_connection that the events are published from. For example:
    * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
    * 
* * string channel_connection = 1; - * * @return The bytes for channelConnection. */ @java.lang.Override - public com.google.protobuf.ByteString getChannelConnectionBytes() { + public com.google.protobuf.ByteString + getChannelConnectionBytes() { java.lang.Object ref = channelConnection_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); channelConnection_ = b; return b; } else { @@ -125,10 +101,9 @@ public com.google.protobuf.ByteString getChannelConnectionBytes() { public static final int EVENTS_FIELD_NUMBER = 2; 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; @@ -138,23 +113,22 @@ 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() { + 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; @@ -164,10 +138,9 @@ 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; @@ -177,21 +150,87 @@ 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) { + public com.google.protobuf.AnyOrBuilder getEventsOrBuilder( + int index) { return events_.get(index); } - private byte memoizedIsInitialized = -1; + public static final int TEXT_EVENTS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList 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 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; @@ -203,13 +242,17 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelConnection_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelConnection_); } 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); } @@ -223,7 +266,16 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelConnection_); } for (int i = 0; i < events_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, events_.get(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; @@ -233,17 +285,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj - instanceof com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest)) { + if (!(obj instanceof com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest)) { return super.equals(obj); } - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest other = - (com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) obj; - - if (!getChannelConnection().equals(other.getChannelConnection())) return false; - if (!getEventsList().equals(other.getEventsList())) return false; + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest other = (com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) obj; + + if (!getChannelConnection() + .equals(other.getChannelConnection())) 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; } @@ -261,150 +315,139 @@ public int hashCode() { 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.PublishChannelConnectionEventsRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - - public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest 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.PublishChannelConnectionEventsRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - - public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest 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.PublishChannelConnectionEventsRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - - public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest 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.PublishChannelConnectionEventsRequest - 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.PublishChannelConnectionEventsRequest 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.PublishChannelConnectionEventsRequest - 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.PublishChannelConnectionEventsRequest 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.PublishChannelConnectionEventsRequest - 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.PublishChannelConnectionEventsRequest 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.PublishChannelConnectionEventsRequest - 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.PublishChannelConnectionEventsRequest 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.PublishChannelConnectionEventsRequest - 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.PublishChannelConnectionEventsRequest 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.PublishChannelConnectionEventsRequest - parseFrom( - com.google.protobuf.CodedInputStream 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.PublishChannelConnectionEventsRequest 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 Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest prototype) { + public static Builder newBuilder(com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * The request message for the PublishChannelConnectionEvents method.
    * 
* * Protobuf type {@code google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.eventarc.publishing.v1.PublisherProto - .internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_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_PublishChannelConnectionEventsRequest_fieldAccessorTable + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.class, - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.Builder - .class); + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.class, com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.Builder.class); } - // Construct using - // com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.newBuilder() - private Builder() {} + // Construct using com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.newBuilder() + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -417,26 +460,25 @@ public Builder clear() { eventsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); + textEvents_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); 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_PublishChannelConnectionEventsRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_descriptor; } @java.lang.Override - public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - getDefaultInstanceForType() { - return com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - .getDefaultInstance(); + public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest getDefaultInstanceForType() { + return com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.getDefaultInstance(); } @java.lang.Override public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest build() { - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest result = - buildPartial(); + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -444,10 +486,8 @@ public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsReq } @java.lang.Override - public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - buildPartial() { - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest result = - new com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest(this); + public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest buildPartial() { + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest result = new com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest(this); int from_bitField0_ = bitField0_; result.channelConnection_ = channelConnection_; if (eventsBuilder_ == null) { @@ -459,6 +499,11 @@ public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsReq } else { result.events_ = eventsBuilder_.build(); } + if (((bitField0_ & 0x00000002) != 0)) { + textEvents_ = textEvents_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.textEvents_ = textEvents_; onBuilt(); return result; } @@ -467,53 +512,46 @@ public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsReq public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + 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) { + 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) { + 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) { + 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) { + 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.PublishChannelConnectionEventsRequest) { - return mergeFrom( - (com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) other); + if (other instanceof com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) { + return mergeFrom((com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest other) { - if (other - == com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - .getDefaultInstance()) return this; + public Builder mergeFrom(com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest other) { + if (other == com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.getDefaultInstance()) return this; if (!other.getChannelConnection().isEmpty()) { channelConnection_ = other.channelConnection_; onChanged(); @@ -536,15 +574,24 @@ public Builder mergeFrom( eventsBuilder_ = null; events_ = other.events_; bitField0_ = (bitField0_ & ~0x00000001); - eventsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getEventsFieldBuilder() - : null; + eventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEventsFieldBuilder() : null; } else { eventsBuilder_.addAllMessages(other.events_); } } } + if (!other.textEvents_.isEmpty()) { + if (textEvents_.isEmpty()) { + textEvents_ = other.textEvents_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTextEventsIsMutable(); + textEvents_.addAll(other.textEvents_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -571,31 +618,36 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - channelConnection_ = input.readStringRequireUtf8(); + case 10: { + channelConnection_ = input.readStringRequireUtf8(); - 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 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + 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) { @@ -605,26 +657,23 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.lang.Object channelConnection_ = ""; /** - * - * *
      * The channel_connection that the events are published from. For example:
      * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
      * 
* * string channel_connection = 1; - * * @return The channelConnection. */ public java.lang.String getChannelConnection() { java.lang.Object ref = channelConnection_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); channelConnection_ = s; return s; @@ -633,22 +682,21 @@ public java.lang.String getChannelConnection() { } } /** - * - * *
      * The channel_connection that the events are published from. For example:
      * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
      * 
* * string channel_connection = 1; - * * @return The bytes for channelConnection. */ - public com.google.protobuf.ByteString getChannelConnectionBytes() { + public com.google.protobuf.ByteString + getChannelConnectionBytes() { java.lang.Object ref = channelConnection_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); channelConnection_ = b; return b; } else { @@ -656,89 +704,78 @@ public com.google.protobuf.ByteString getChannelConnectionBytes() { } } /** - * - * *
      * The channel_connection that the events are published from. For example:
      * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
      * 
* * string channel_connection = 1; - * * @param value The channelConnection to set. * @return This builder for chaining. */ - public Builder setChannelConnection(java.lang.String value) { + public Builder setChannelConnection( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + channelConnection_ = value; onChanged(); return this; } /** - * - * *
      * The channel_connection that the events are published from. For example:
      * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
      * 
* * string channel_connection = 1; - * * @return This builder for chaining. */ public Builder clearChannelConnection() { - + channelConnection_ = getDefaultInstance().getChannelConnection(); onChanged(); return this; } /** - * - * *
      * The channel_connection that the events are published from. For example:
      * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
      * 
* * string channel_connection = 1; - * * @param value The bytes for channelConnection to set. * @return This builder for chaining. */ - public Builder setChannelConnectionBytes(com.google.protobuf.ByteString value) { + public Builder setChannelConnectionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + channelConnection_ = value; onChanged(); return this; } - private java.util.List events_ = java.util.Collections.emptyList(); - + private java.util.List events_ = + java.util.Collections.emptyList(); private void ensureEventsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { events_ = new java.util.ArrayList(events_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, - com.google.protobuf.Any.Builder, - com.google.protobuf.AnyOrBuilder> - eventsBuilder_; + 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; @@ -751,10 +788,9 @@ public java.util.List getEventsList() { } } /** - * - * *
      * 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; @@ -767,10 +803,9 @@ public int getEventsCount() { } } /** - * - * *
      * 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; @@ -783,15 +818,15 @@ public com.google.protobuf.Any getEvents(int 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) { + public Builder setEvents( + int index, com.google.protobuf.Any value) { if (eventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -805,15 +840,15 @@ public Builder setEvents(int index, com.google.protobuf.Any 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) { + public Builder setEvents( + int index, com.google.protobuf.Any.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.set(index, builderForValue.build()); @@ -824,10 +859,9 @@ public Builder setEvents(int index, com.google.protobuf.Any.Builder builderForVa 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; @@ -846,15 +880,15 @@ public Builder addEvents(com.google.protobuf.Any 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) { + public Builder addEvents( + int index, com.google.protobuf.Any value) { if (eventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -868,15 +902,15 @@ public Builder addEvents(int index, com.google.protobuf.Any 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) { + public Builder addEvents( + com.google.protobuf.Any.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.add(builderForValue.build()); @@ -887,15 +921,15 @@ public Builder addEvents(com.google.protobuf.Any.Builder builderForValue) { 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) { + public Builder addEvents( + int index, com.google.protobuf.Any.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.add(index, builderForValue.build()); @@ -906,18 +940,19 @@ public Builder addEvents(int index, com.google.protobuf.Any.Builder builderForVa 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) { + public Builder addAllEvents( + java.lang.Iterable values) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, events_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, events_); onChanged(); } else { eventsBuilder_.addAllMessages(values); @@ -925,10 +960,9 @@ public Builder addAllEvents(java.lang.Iterable * 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; @@ -944,10 +978,9 @@ public Builder clearEvents() { 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; @@ -963,43 +996,42 @@ public Builder removeEvents(int 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) { + 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) { + public com.google.protobuf.AnyOrBuilder getEventsOrBuilder( + int index) { if (eventsBuilder_ == null) { - return events_.get(index); - } else { + 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() { + public java.util.List + getEventsOrBuilderList() { if (eventsBuilder_ != null) { return eventsBuilder_.getMessageOrBuilderList(); } else { @@ -1007,62 +1039,241 @@ public java.util.List getEventsOrBui } } /** - * - * *
      * 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()); + 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()); + 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() { + 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> + 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_ & 0x00000001) != 0), getParentForChildren(), isClean()); + eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + events_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); events_ = null; } return eventsBuilder_; } + private com.google.protobuf.LazyStringList textEvents_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTextEventsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + textEvents_ = new com.google.protobuf.LazyStringArrayList(textEvents_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * 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_.getUnmodifiableView(); + } + /** + *
+     * 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); + 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); + 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_); + 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.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + 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); + onChanged(); + return this; + } @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1072,44 +1283,41 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) } // @@protoc_insertion_point(class_scope:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) - private static final com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - DEFAULT_INSTANCE; - + private static final com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = - new com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest(); + DEFAULT_INSTANCE = new com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest(); } - public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - getDefaultInstance() { + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PublishChannelConnectionEventsRequest 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(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublishChannelConnectionEventsRequest 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; @@ -1121,8 +1329,9 @@ public com.google.protobuf.Parser getPars } @java.lang.Override - public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - getDefaultInstanceForType() { + public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequestOrBuilder.java b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequestOrBuilder.java new file mode 100644 index 000000000000..eedbe45205dc --- /dev/null +++ b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsRequestOrBuilder.java @@ -0,0 +1,137 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/eventarc/publishing/v1/publisher.proto + +package com.google.cloud.eventarc.publishing.v1; + +public interface PublishChannelConnectionEventsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The channel_connection that the events are published from. For example:
+   * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
+   * 
+ * + * string channel_connection = 1; + * @return The channelConnection. + */ + java.lang.String getChannelConnection(); + /** + *
+   * The channel_connection that the events are published from. For example:
+   * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
+   * 
+ * + * string channel_connection = 1; + * @return The bytes for channelConnection. + */ + com.google.protobuf.ByteString + getChannelConnectionBytes(); + + /** + *
+   * 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.util.List + getEventsList(); + /** + *
+   * 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; + */ + com.google.protobuf.Any getEvents(int 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; + */ + int getEventsCount(); + /** + *
+   * 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.util.List + getEventsOrBuilderList(); + /** + *
+   * 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; + */ + com.google.protobuf.AnyOrBuilder getEventsOrBuilder( + int 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; + * @return A list containing the textEvents. + */ + java.util.List + getTextEventsList(); + /** + *
+   * 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. + */ + int getTextEventsCount(); + /** + *
+   * 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. + */ + java.lang.String getTextEvents(int 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. + */ + com.google.protobuf.ByteString + getTextEventsBytes(int index); +} diff --git a/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponse.java b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponse.java new file mode 100644 index 000000000000..a6c79fd5dd0f --- /dev/null +++ b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponse.java @@ -0,0 +1,409 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/eventarc/publishing/v1/publisher.proto + +package com.google.cloud.eventarc.publishing.v1; + +/** + *
+ * The response message for the PublishChannelConnectionEvents method.
+ * 
+ * + * Protobuf type {@code google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} + */ +public final class PublishChannelConnectionEventsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) + PublishChannelConnectionEventsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use PublishChannelConnectionEventsResponse.newBuilder() to construct. + private PublishChannelConnectionEventsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PublishChannelConnectionEventsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PublishChannelConnectionEventsResponse(); + } + + @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.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_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_PublishChannelConnectionEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.class, com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.PublishChannelConnectionEventsResponse)) { + return super.equals(obj); + } + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse other = (com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse 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 response message for the PublishChannelConnectionEvents method.
+   * 
+ * + * Protobuf type {@code google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_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_PublishChannelConnectionEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.class, com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.Builder.class); + } + + // Construct using com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + 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_PublishChannelConnectionEventsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse getDefaultInstanceForType() { + return com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse build() { + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse buildPartial() { + com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse result = new com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse(this); + onBuilt(); + return result; + } + + @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.PublishChannelConnectionEventsResponse) { + return mergeFrom((com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse other) { + if (other == com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.getDefaultInstance()) return this; + 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; + 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; + } + @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.PublishChannelConnectionEventsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) + private static final com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse(); + } + + public static com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublishChannelConnectionEventsResponse 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.PublishChannelConnectionEventsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponseOrBuilder.java b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponseOrBuilder.java new file mode 100644 index 000000000000..86d1e157785d --- /dev/null +++ b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/eventarc/publishing/v1/publisher.proto + +package com.google.cloud.eventarc.publishing.v1; + +public interface PublishChannelConnectionEventsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequest.java b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequest.java similarity index 53% rename from java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequest.java rename to owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequest.java index 6e993494948a..e28c8f97e2d0 100644 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequest.java +++ b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequest.java @@ -1,85 +1,64 @@ -/* - * Copyright 2020 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 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 +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; +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.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new PublishEventsRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - 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; + 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 + 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); + 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; 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 @@ -88,30 +67,30 @@ public java.lang.String getChannel() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + 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() { + 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); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); channel_ = b; return b; } else { @@ -122,10 +101,9 @@ public com.google.protobuf.ByteString getChannelBytes() { public static final int EVENTS_FIELD_NUMBER = 2; 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; @@ -135,23 +113,22 @@ 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() { + 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; @@ -161,10 +138,9 @@ 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; @@ -174,21 +150,87 @@ 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) { + public com.google.protobuf.AnyOrBuilder getEventsOrBuilder( + int index) { return events_.get(index); } - private byte memoizedIsInitialized = -1; + public static final int TEXT_EVENTS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList 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 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; @@ -200,13 +242,17 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + 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); } @@ -220,7 +266,16 @@ public int getSerializedSize() { 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)); + 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; @@ -230,16 +285,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + 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; + 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; } @@ -257,142 +315,139 @@ public int hashCode() { 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 { + 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) + 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) + 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) + 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) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + 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) + 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) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + 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); + 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); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + 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) { + 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); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + 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 + 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; + 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 + 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); + 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() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -405,18 +460,19 @@ public Builder clear() { eventsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); + textEvents_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); 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; + 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() { + public com.google.cloud.eventarc.publishing.v1.PublishEventsRequest getDefaultInstanceForType() { return com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.getDefaultInstance(); } @@ -431,8 +487,7 @@ public com.google.cloud.eventarc.publishing.v1.PublishEventsRequest build() { @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); + com.google.cloud.eventarc.publishing.v1.PublishEventsRequest result = new com.google.cloud.eventarc.publishing.v1.PublishEventsRequest(this); int from_bitField0_ = bitField0_; result.channel_ = channel_; if (eventsBuilder_ == null) { @@ -444,6 +499,11 @@ public com.google.cloud.eventarc.publishing.v1.PublishEventsRequest buildPartial } else { result.events_ = eventsBuilder_.build(); } + if (((bitField0_ & 0x00000002) != 0)) { + textEvents_ = textEvents_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.textEvents_ = textEvents_; onBuilt(); return result; } @@ -452,39 +512,38 @@ public com.google.cloud.eventarc.publishing.v1.PublishEventsRequest buildPartial public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + 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) { + 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) { + 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) { + 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) { + 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); + return mergeFrom((com.google.cloud.eventarc.publishing.v1.PublishEventsRequest)other); } else { super.mergeFrom(other); return this; @@ -492,9 +551,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } 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 == com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.getDefaultInstance()) return this; if (!other.getChannel().isEmpty()) { channel_ = other.channel_; onChanged(); @@ -517,15 +574,24 @@ public Builder mergeFrom(com.google.cloud.eventarc.publishing.v1.PublishEventsRe eventsBuilder_ = null; events_ = other.events_; bitField0_ = (bitField0_ & ~0x00000001); - eventsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getEventsFieldBuilder() - : null; + eventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEventsFieldBuilder() : null; } else { eventsBuilder_.addAllMessages(other.events_); } } } + if (!other.textEvents_.isEmpty()) { + if (textEvents_.isEmpty()) { + textEvents_ = other.textEvents_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTextEventsIsMutable(); + textEvents_.addAll(other.textEvents_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -552,31 +618,36 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - channel_ = input.readStringRequireUtf8(); + case 10: { + channel_ = input.readStringRequireUtf8(); - 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 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + 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) { @@ -586,26 +657,23 @@ public Builder mergeFrom( } // 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; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); channel_ = s; return s; @@ -614,22 +682,21 @@ public java.lang.String getChannel() { } } /** - * - * *
      * 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() { + 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); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); channel_ = b; return b; } else { @@ -637,89 +704,78 @@ public com.google.protobuf.ByteString getChannelBytes() { } } /** - * - * *
      * 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) { + public Builder setChannel( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + channel_ = value; 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(); 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) { + public Builder setChannelBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + channel_ = value; onChanged(); return this; } - private java.util.List events_ = java.util.Collections.emptyList(); - + private java.util.List events_ = + java.util.Collections.emptyList(); private void ensureEventsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { events_ = new java.util.ArrayList(events_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, - com.google.protobuf.Any.Builder, - com.google.protobuf.AnyOrBuilder> - eventsBuilder_; + 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; @@ -732,10 +788,9 @@ public java.util.List getEventsList() { } } /** - * - * *
      * 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; @@ -748,10 +803,9 @@ public int getEventsCount() { } } /** - * - * *
      * 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; @@ -764,15 +818,15 @@ public com.google.protobuf.Any getEvents(int 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) { + public Builder setEvents( + int index, com.google.protobuf.Any value) { if (eventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -786,15 +840,15 @@ public Builder setEvents(int index, com.google.protobuf.Any 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) { + public Builder setEvents( + int index, com.google.protobuf.Any.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.set(index, builderForValue.build()); @@ -805,10 +859,9 @@ public Builder setEvents(int index, com.google.protobuf.Any.Builder builderForVa 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; @@ -827,15 +880,15 @@ public Builder addEvents(com.google.protobuf.Any 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) { + public Builder addEvents( + int index, com.google.protobuf.Any value) { if (eventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -849,15 +902,15 @@ public Builder addEvents(int index, com.google.protobuf.Any 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) { + public Builder addEvents( + com.google.protobuf.Any.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.add(builderForValue.build()); @@ -868,15 +921,15 @@ public Builder addEvents(com.google.protobuf.Any.Builder builderForValue) { 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) { + public Builder addEvents( + int index, com.google.protobuf.Any.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.add(index, builderForValue.build()); @@ -887,18 +940,19 @@ public Builder addEvents(int index, com.google.protobuf.Any.Builder builderForVa 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) { + public Builder addAllEvents( + java.lang.Iterable values) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, events_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, events_); onChanged(); } else { eventsBuilder_.addAllMessages(values); @@ -906,10 +960,9 @@ public Builder addAllEvents(java.lang.Iterable * 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; @@ -925,10 +978,9 @@ public Builder clearEvents() { 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; @@ -944,43 +996,42 @@ public Builder removeEvents(int 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) { + 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) { + public com.google.protobuf.AnyOrBuilder getEventsOrBuilder( + int index) { if (eventsBuilder_ == null) { - return events_.get(index); - } else { + 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() { + public java.util.List + getEventsOrBuilderList() { if (eventsBuilder_ != null) { return eventsBuilder_.getMessageOrBuilderList(); } else { @@ -988,62 +1039,241 @@ public java.util.List getEventsOrBui } } /** - * - * *
      * 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()); + 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()); + 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() { + 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> + 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_ & 0x00000001) != 0), getParentForChildren(), isClean()); + eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + events_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); events_ = null; } return eventsBuilder_; } + private com.google.protobuf.LazyStringList textEvents_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTextEventsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + textEvents_ = new com.google.protobuf.LazyStringArrayList(textEvents_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * 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_.getUnmodifiableView(); + } + /** + *
+     * 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); + 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); + 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_); + 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.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + 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); + onChanged(); + return this; + } @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1053,13 +1283,12 @@ public final Builder mergeUnknownFields( 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; - + private static final com.google.cloud.eventarc.publishing.v1.PublishEventsRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.eventarc.publishing.v1.PublishEventsRequest(); } @@ -1068,27 +1297,27 @@ public static com.google.cloud.eventarc.publishing.v1.PublishEventsRequest getDe 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(); - } - }; + 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; @@ -1103,4 +1332,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.eventarc.publishing.v1.PublishEventsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequestOrBuilder.java b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequestOrBuilder.java new file mode 100644 index 000000000000..6a5b0a611d91 --- /dev/null +++ b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsRequestOrBuilder.java @@ -0,0 +1,137 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/eventarc/publishing/v1/publisher.proto + +package com.google.cloud.eventarc.publishing.v1; + +public interface PublishEventsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.eventarc.publishing.v1.PublishEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.String getChannel(); + /** + *
+   * 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. + */ + com.google.protobuf.ByteString + getChannelBytes(); + + /** + *
+   * 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.util.List + getEventsList(); + /** + *
+   * 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; + */ + com.google.protobuf.Any getEvents(int 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; + */ + int getEventsCount(); + /** + *
+   * 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.util.List + getEventsOrBuilderList(); + /** + *
+   * 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; + */ + com.google.protobuf.AnyOrBuilder getEventsOrBuilder( + int 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; + * @return A list containing the textEvents. + */ + java.util.List + getTextEventsList(); + /** + *
+   * 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. + */ + int getTextEventsCount(); + /** + *
+   * 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. + */ + java.lang.String getTextEvents(int 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. + */ + com.google.protobuf.ByteString + getTextEventsBytes(int index); +} diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponse.java b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponse.java similarity index 62% rename from java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponse.java rename to owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponse.java index fa595a792084..c4a7132fd865 100644 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponse.java +++ b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponse.java @@ -1,72 +1,53 @@ -/* - * Copyright 2020 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 package com.google.cloud.eventarc.publishing.v1; /** - * - * *
  * The response message for the PublishEvents method.
  * 
* * Protobuf type {@code google.cloud.eventarc.publishing.v1.PublishEventsResponse} */ -public final class PublishEventsResponse extends com.google.protobuf.GeneratedMessageV3 - implements +public final class PublishEventsResponse extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.eventarc.publishing.v1.PublishEventsResponse) PublishEventsResponseOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use PublishEventsResponse.newBuilder() to construct. private PublishEventsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - - private PublishEventsResponse() {} + private PublishEventsResponse() { + } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new PublishEventsResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.eventarc.publishing.v1.PublisherProto - .internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_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_PublishEventsResponse_fieldAccessorTable + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.class, - com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.Builder.class); + com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.class, com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.Builder.class); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -78,7 +59,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { getUnknownFields().writeTo(output); } @@ -96,13 +78,12 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.eventarc.publishing.v1.PublishEventsResponse)) { return super.equals(obj); } - com.google.cloud.eventarc.publishing.v1.PublishEventsResponse other = - (com.google.cloud.eventarc.publishing.v1.PublishEventsResponse) obj; + com.google.cloud.eventarc.publishing.v1.PublishEventsResponse other = (com.google.cloud.eventarc.publishing.v1.PublishEventsResponse) obj; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -121,136 +102,129 @@ public int hashCode() { } public static com.google.cloud.eventarc.publishing.v1.PublishEventsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.eventarc.publishing.v1.PublishEventsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + 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.PublishEventsResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.eventarc.publishing.v1.PublishEventsResponse 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.PublishEventsResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.eventarc.publishing.v1.PublishEventsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + 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.PublishEventsResponse 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.PublishEventsResponse 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.PublishEventsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.eventarc.publishing.v1.PublishEventsResponse 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.PublishEventsResponse 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.PublishEventsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.eventarc.publishing.v1.PublishEventsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + 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.PublishEventsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.eventarc.publishing.v1.PublishEventsResponse prototype) { + public static Builder newBuilder(com.google.cloud.eventarc.publishing.v1.PublishEventsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * The response message for the PublishEvents method.
    * 
* * Protobuf type {@code google.cloud.eventarc.publishing.v1.PublishEventsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.eventarc.publishing.v1.PublishEventsResponse) com.google.cloud.eventarc.publishing.v1.PublishEventsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.eventarc.publishing.v1.PublisherProto - .internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_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_PublishEventsResponse_fieldAccessorTable + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.class, - com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.Builder.class); + com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.class, com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.Builder.class); } // Construct using com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -258,14 +232,13 @@ public Builder clear() { } @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_PublishEventsResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.eventarc.publishing.v1.PublisherProto.internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_descriptor; } @java.lang.Override - public com.google.cloud.eventarc.publishing.v1.PublishEventsResponse - getDefaultInstanceForType() { + public com.google.cloud.eventarc.publishing.v1.PublishEventsResponse getDefaultInstanceForType() { return com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.getDefaultInstance(); } @@ -280,8 +253,7 @@ public com.google.cloud.eventarc.publishing.v1.PublishEventsResponse build() { @java.lang.Override public com.google.cloud.eventarc.publishing.v1.PublishEventsResponse buildPartial() { - com.google.cloud.eventarc.publishing.v1.PublishEventsResponse result = - new com.google.cloud.eventarc.publishing.v1.PublishEventsResponse(this); + com.google.cloud.eventarc.publishing.v1.PublishEventsResponse result = new com.google.cloud.eventarc.publishing.v1.PublishEventsResponse(this); onBuilt(); return result; } @@ -290,39 +262,38 @@ public com.google.cloud.eventarc.publishing.v1.PublishEventsResponse buildPartia public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + 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) { + 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) { + 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) { + 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) { + 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.PublishEventsResponse) { - return mergeFrom((com.google.cloud.eventarc.publishing.v1.PublishEventsResponse) other); + return mergeFrom((com.google.cloud.eventarc.publishing.v1.PublishEventsResponse)other); } else { super.mergeFrom(other); return this; @@ -330,9 +301,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.eventarc.publishing.v1.PublishEventsResponse other) { - if (other - == com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.getDefaultInstance()) - return this; + if (other == com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -359,13 +328,12 @@ public Builder mergeFrom( case 0: done = true; break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + 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) { @@ -375,9 +343,9 @@ public Builder mergeFrom( } // finally return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -387,13 +355,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.eventarc.publishing.v1.PublishEventsResponse) } // @@protoc_insertion_point(class_scope:google.cloud.eventarc.publishing.v1.PublishEventsResponse) - private static final com.google.cloud.eventarc.publishing.v1.PublishEventsResponse - DEFAULT_INSTANCE; - + private static final com.google.cloud.eventarc.publishing.v1.PublishEventsResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.eventarc.publishing.v1.PublishEventsResponse(); } @@ -402,27 +369,27 @@ public static com.google.cloud.eventarc.publishing.v1.PublishEventsResponse getD return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PublishEventsResponse 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(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublishEventsResponse 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; @@ -437,4 +404,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.eventarc.publishing.v1.PublishEventsResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponseOrBuilder.java b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponseOrBuilder.java new file mode 100644 index 000000000000..b407f9693dae --- /dev/null +++ b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishEventsResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/eventarc/publishing/v1/publisher.proto + +package com.google.cloud.eventarc.publishing.v1; + +public interface PublishEventsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.eventarc.publishing.v1.PublishEventsResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherProto.java b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherProto.java new file mode 100644 index 000000000000..8074ec076791 --- /dev/null +++ b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublisherProto.java @@ -0,0 +1,125 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/eventarc/publishing/v1/publisher.proto + +package com.google.cloud.eventarc.publishing.v1; + +public final class PublisherProto { + private PublisherProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/eventarc/publishing/v1/pu" + + "blisher.proto\022#google.cloud.eventarc.pub" + + "lishing.v1\032\034google/api/annotations.proto" + + "\032\027google/api/client.proto\032\031google/protob" + + "uf/any.proto\"~\n%PublishChannelConnection" + + "EventsRequest\022\032\n\022channel_connection\030\001 \001(" + + "\t\022$\n\006events\030\002 \003(\0132\024.google.protobuf.Any\022" + + "\023\n\013text_events\030\003 \003(\t\"(\n&PublishChannelCo" + + "nnectionEventsResponse\"b\n\024PublishEventsR" + + "equest\022\017\n\007channel\030\001 \001(\t\022$\n\006events\030\002 \003(\0132" + + "\024.google.protobuf.Any\022\023\n\013text_events\030\003 \003" + + "(\t\"\027\n\025PublishEventsResponse2\320\004\n\tPublishe" + + "r\022\230\002\n\036PublishChannelConnectionEvents\022J.g" + + "oogle.cloud.eventarc.publishing.v1.Publi" + + "shChannelConnectionEventsRequest\032K.googl" + + "e.cloud.eventarc.publishing.v1.PublishCh" + + "annelConnectionEventsResponse\"]\202\323\344\223\002W\"R/" + + "v1/{channel_connection=projects/*/locati" + + "ons/*/channelConnections/*}:publishEvent" + + "s:\001*\022\320\001\n\rPublishEvents\0229.google.cloud.ev" + + "entarc.publishing.v1.PublishEventsReques" + + "t\032:.google.cloud.eventarc.publishing.v1." + + "PublishEventsResponse\"H\202\323\344\223\002B\"=/v1/{chan" + + "nel=projects/*/locations/*/channels/*}:p" + + "ublishEvents:\001*\032U\312A!eventarcpublishing.g" + + "oogleapis.com\322A.https://www.googleapis.c" + + "om/auth/cloud-platformB\377\001\n\'com.google.cl" + + "oud.eventarc.publishing.v1B\016PublisherPro" + + "toP\001ZLgoogle.golang.org/genproto/googlea" + + "pis/cloud/eventarc/publishing/v1;publish" + + "er\252\002#Google.Cloud.Eventarc.Publishing.V1" + + "\312\002#Google\\Cloud\\Eventarc\\Publishing\\V1\352\002" + + "\'Google::Cloud::Eventarc::Publishing::V1" + + "b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + }); + internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_descriptor, + new java.lang.String[] { "ChannelConnection", "Events", "TextEvents", }); + internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsResponse_descriptor, + new java.lang.String[] { }); + internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_eventarc_publishing_v1_PublishEventsRequest_descriptor, + new java.lang.String[] { "Channel", "Events", "TextEvents", }); + internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_eventarc_publishing_v1_PublishEventsResponse_descriptor, + new java.lang.String[] { }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/proto/google/cloud/eventarc/publishing/v1/publisher.proto b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/proto/google/cloud/eventarc/publishing/v1/publisher.proto similarity index 78% rename from java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/proto/google/cloud/eventarc/publishing/v1/publisher.proto rename to owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/proto/google/cloud/eventarc/publishing/v1/publisher.proto index ce4153bb99a0..b68f1ece8470 100644 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/proto/google/cloud/eventarc/publishing/v1/publisher.proto +++ b/owl-bot-staging/java-eventarc-publishing/v1/proto-google-cloud-eventarc-publishing-v1/src/main/proto/google/cloud/eventarc/publishing/v1/publisher.proto @@ -11,7 +11,6 @@ // 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. - syntax = "proto3"; package google.cloud.eventarc.publishing.v1; @@ -54,16 +53,17 @@ option ruby_package = "Google::Cloud::Eventarc::Publishing::V1"; // Publisher allows an event provider to publish events to Eventarc. service Publisher { option (google.api.default_host) = "eventarcpublishing.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Publish events to a ChannelConnection in a partner's project. - rpc PublishChannelConnectionEvents(PublishChannelConnectionEventsRequest) returns (PublishChannelConnectionEventsResponse) { + rpc PublishChannelConnectionEvents(PublishChannelConnectionEventsRequest) + returns (PublishChannelConnectionEventsResponse) { option (google.api.http) = { post: "/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents" body: "*" }; } - // Publish events to a subscriber's channel. rpc PublishEvents(PublishEventsRequest) returns (PublishEventsResponse) { option (google.api.http) = { @@ -72,33 +72,37 @@ service Publisher { }; } } - // The request message for the PublishChannelConnectionEvents method. message PublishChannelConnectionEventsRequest { // The channel_connection that the events are published from. For example: // `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. string channel_connection = 1; - // 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; + // 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; } - // The response message for the PublishChannelConnectionEvents method. -message PublishChannelConnectionEventsResponse { - -} - +message PublishChannelConnectionEventsResponse {} // The request message for the PublishEvents method. message PublishEventsRequest { // The full name of the channel to publish to. For example: // `projects/{project}/locations/{location}/channels/{channel-id}`. string channel = 1; - // 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; + // 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; } - // The response message for the PublishEvents method. -message PublishEventsResponse { - -} +message PublishEventsResponse {}